Charmstore, releases takes a long time to appear?

I’m trying to upgrade nextcloud using my latest release, but charmstore seems no to find it.

Is there a delay for the release to be indexed?

$ juju upgrade-charm nextcloud --path=cs:~erik-lonroth/nextcloud-5
ERROR cannot resolve URL "cs:~erik-lonroth/nextcloud-5": charm or bundle not found
$ charm list
cs:~erik-lonroth/nextcloud-5
$ juju upgrade-charm nextcloud --path=cs:~erik-lonroth/nextcloud-5
ERROR cannot resolve URL "cs:~erik-lonroth/nextcloud-5": charm or bundle not found
$ juju upgrade-charm nextcloud --revision 5
ERROR cannot resolve URL "cs:~erik-lonroth/nextcloud-5": charm or bundle not found

The --path option is for pointing to a local filesystem path for the charm. You always need this if you’re upgrading a local copy of a charm, since Juju does not remember the local path like it does the charm store URL (since that info is stored in the controller), but it will not work if given a charm store URL.

If you’re just upgrading from one store revision of a charm to another, you just specify the application name and optionally the new revision:

$ juju upgrade-charm nextcloud --revision 5

If you’re switching from a local copy of the charm to a store copy, or from one store copy to another (say, the same charm from a different namespace), you can use the --switch option:

$ juju upgrade-charm nextcloud --switch cs:~erik-lonroth/nextcloud-5

If the charm shows up in charm list or charm show, then you should be able to deploy it right away.

I’ve tried all of the above:

$ juju upgrade-charm nextcloud --switch cs:~erik-lonroth/nextcloud-5
ERROR cannot resolve URL "cs:~erik-lonroth/nextcloud-5": charm or bundle not found

and

$ juju upgrade-charm nextcloud --revision 5
ERROR cannot resolve URL "cs:~erik-lonroth/nextcloud-5": charm or bundle not found

… and when running

$ charm list
cs:~erik-lonroth/nextcloud-5

The model contains the store charm version…

Could it be that the current revision is in the “edge” channel wheras this new release is in the stable ?

Aha!

$ juju upgrade-charm nextcloud --revision 5 --channel stable
Added charm "cs:~erik-lonroth/nextcloud-5" to the model.
Leaving endpoints in "alpha": mysql, postgres, website

That was non trivial to figure out. I found it through running the deploy with –debug and saw the url with the channel name.

I think this is a thing that can be improved as to indicate what channel contains what?

Wow, I had no idea that Juju tracked which channel a charm came from in the store. Absolutely that message should be improved. Probably worth filing a bug if there isn’t one already. This may be an area where work toward converging Juju’s channel / revision risk level model to snapd’s channel / track / branch model has begun in the background but introduced some edge cases like this which need to be addressed.

1 Like

Placed one here Bug #1880973 “juju wont tell you what channel a charm is on and ...” : Bugs : juju

2 Likes