upgrade-charm refuses to upgrade

Bug #1576534 reported by Stuart Bishop
50
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Richard Harding

Bug Description

I think there are some bogus checks lurking in upgrade-charm:

~/charms/postgresql/built$ juju deploy . testy
~/charms/postgresql/built$ juju upgrade-charm --path . testy
ERROR cannot upgrade "postgresql" to "."
~/charms/postgresql/built$ juju upgrade-charm testy
ERROR upgrading a local charm requires either --path or --switch
~/charms/postgresql/built$ juju upgrade-charm --path `pwd` testy
ERROR cannot upgrade "postgresql" to "built"

Similarly, without using a relative directory to confirm that this is different to Bug #1573020:

~/charms/postgresql/built$ juju deploy `pwd` testy2
~/charms/postgresql/built$ juju upgrade-charm --path `pwd` testy2
ERROR cannot upgrade "postgresql" to "built"

~/charms/postgresql/built$ grep name metadata.yaml
"name": "postgresql"

Revision history for this message
Stuart Bishop (stub) wrote :

Above is from 2.0-beta6

Revision history for this message
Cheryl Jennings (cherylj) wrote :

Is the path you're specifying for the upgrade different than the path used to upload the charm originally? If that's the case, you need to use --switch.

Changed in juju-core:
status: New → Incomplete
Revision history for this message
Stuart Bishop (stub) wrote :

No, the paths are character for character identical.

Changed in juju-core:
status: Incomplete → New
Revision history for this message
Stuart Bishop (stub) wrote :

I suspect the trigger is that upgrade-charm thinks the directory name should match the charm name, or something like that.

Ian Booth (wallyworld)
Changed in juju-core:
milestone: none → 2.0-beta7
importance: Undecided → High
status: New → Triaged
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta7 → 2.0-beta8
Changed in juju-core:
milestone: 2.0-beta8 → 2.0-rc1
Revision history for this message
Adam Israel (aisrael) wrote :

To add to what stub is seeing, we've also seen upgrade-charm fail with relative paths:

$ juju upgrade-charm layer-test --path=~/charms/trusty/layer-test
ERROR charm or bundle URL has invalid form: "~/charms/trusty/layer-test"

$ juju upgrade-charm layer-test --path ~/charms/trusty/layer-test/
ERROR cannot upgrade "layer-test" to ""

$ juju upgrade-charm layer-test --path ~/charms/trusty/layer-test
Added charm "local:trusty/layer-test-1" to the model.

Changed in juju-core:
milestone: 2.0-rc1 → 2.0.0
affects: juju-core → juju
Changed in juju:
milestone: 2.0.0 → none
milestone: none → 2.0.0
Changed in juju:
assignee: nobody → Richard Harding (rharding)
Revision history for this message
Stuart Bishop (stub) wrote :

I can no longer reproduce the second example, using an absolute path. The problem still occurs using a relative path.

Changed in juju:
milestone: 2.0.0 → 2.1.0
Revision history for this message
Brad Crittenden (bac) wrote :

This bug still appears for relative paths in 2.0.0-trusty-amd64. I get:

$ juju upgrade-charm horizon-juju --path .
ERROR cannot upgrade "horizon-juju" to "."

Rather than causing the user to endlessly guess what path Juju is asking you to provide, the error message could actually print it.

Error cannot upgrade "horizon-juju" from "." as it was originally deployed from
/home/bac/charms/horizon-juju-charm

Revision history for this message
Brad Crittenden (bac) wrote :

I can no longer reproduce this bug with 2.0.1-trusty-amd64 from juju/proposed.

Perhaps it is fixed.

Changed in juju:
status: Triaged → Fix Released
milestone: 2.1.0 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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