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:
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.