upgrade-charm --switch doesn't work with local charms

Bug #1666904 reported by Chris MacNaughton
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

$ juju upgrade-charm --switch ./ceph-mon ceph
ERROR cannot upgrade "ceph" to "ceph-mon"
$ juju upgrade-charm --switch cs:ceph-mon ceph
Added charm "cs:ceph-mon-7" to the model.
$ juju --version
2.0.2-yakkety-amd64

Changed in juju:
status: New → Triaged
importance: Undecided → High
tags: added: charm charmers upgrade-charm
Changed in juju:
milestone: none → 2.3.0
Tim Penhey (thumper)
Changed in juju:
importance: High → Medium
milestone: 2.3.0 → 2.4-beta1
Revision history for this message
Laurent Sesquès (sajoupa) wrote :

Hi,

FYI, I had the same issue:
$ juju upgrade-charm --switch /[...]/charms/xenial/ubuntu infra
ERROR cannot upgrade "ubuntu" to "ubuntu-basenode"
$ cat /[...]/charms/xenial/ubuntu/metadata.yaml
name: ubuntu-basenode
[...]

$ juju --version
2.3.1-xenial-amd64

Model and controller version: 2.2.9

Thanks.

Revision history for this message
Haw Loeung (hloeung) wrote :

Hmm, don't we need '--path' instead for local charms?

Revision history for this message
Laurent Sesquès (sajoupa) wrote :

We need --switch because:
"The --switch flag allows you to replace the charm with an entirely different one.
The new charm's URL and revision are inferred as they would be when running a
deploy command."

and can't use --path because
"--switch and --path are mutually exclusive."

Revision history for this message
Felipe Reyes (freyes) wrote :

I want to switch a deployed application from the charmstore to a local branch and I'm getting this problem. here is a copy of my terminal

$ juju status glance-simplestreams-sync
Model Controller Cloud/Region Version SLA
keystone-v3 c2 stsstack/stsstack 2.4-beta1 unsupported

App Version Status Scale Charm Store Rev OS Notes
glance-simplestreams-sync unknown 1 glance-simplestreams-sync jujucharms 11 ubuntu

Unit Workload Agent Machine Public address Ports Message
glance-simplestreams-sync/0* unknown idle 2 10.1.2.3

Machine State DNS Inst id Series AZ Message
2 started 10.1.2.3 ea74622b-39d9-410d-9540-d57818948675 xenial nova ACTIVE

Relation provider Requirer Interface Type Message
keystone:identity-service glance-simplestreams-sync:identity-service keystone regular

$ juju upgrade-charm --force-units --switch local:xenial/glance-simplestreams-sync glance-simplestreams-syncERROR unknown schema for charm URL "local:xenial/glance-simplestreams-sync"
$ juju upgrade-charm --force-units --switch ./glance-simplestreams-sync glance-simplestreams-sync
ERROR cannot parse URL "./glance-simplestreams-sync": series name "." not valid
$ juju upgrade-charm --force-units --switch xenial/glance-simplestreams-sync glance-simplestreams-sync
ERROR already running latest charm "cs:glance-simplestreams-sync-11"

Felipe Reyes (freyes)
tags: added: sts
Revision history for this message
Tim Penhey (thumper) wrote :

At least with Juju 2.3.5 you can do a charm upgrade from a charmstore charm to a local charm by doing:

  juju upgrade-charm --path <location> <app>

and switching from local to charmstore, or from one charmstore to another from the charmstore with

  juju upgrade-charm --switch <charm> <app>

Changed in juju:
milestone: 2.4-beta1 → none
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

Changed in juju:
importance: Medium → Low
tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.