different behaviour between upgrading to a local charm and to a charmstore charm

Bug #1805993 reported by Junien Fridrick on 2018-11-30
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju
High
Unassigned

Bug Description

Hi,

juju 2.4.5. Currently, an old nrpe-external-master charm is deployed in the "nrpe" app.

If I download cs:nrpe locally, unzip it and try to upgrade-charm --switch to it, I have a failure message :

$ juju upgrade-charm --debug --switch /path/to/nrpe nrpe
[...]
github.com/juju/juju/cmd/juju/application/upgradecharm.go:513: cannot upgrade "nrpe-external-master" to "nrpe"

However, I can upgrade to cs:nrpe without problem :
$ juju upgrade-charm --debug --switch cs:nrpe nrpe
Added charm "cs:nrpe-52" to the model.

And then I can switch to the local version without problem either :
$ juju upgrade-charm --debug --switch /path/to/nrpe nrpe
Added charm "local:trusty/nrpe-0" to the model.

What could be causing this ?

Thanks

Richard Harding (rharding) wrote :

Did the charm change name? I'm trying to see how it works after the upgrade-charm to the later store version and wonder if something in the metadata changed that allowed it to pass through. It looks like it's named "nrpe-external-master" but then you say it works after upgrade with just nrpe? Were these two different tests?

Thanks for the additional details on the different scenarios.

Junien Fridrick (axino) wrote :

> Did the charm change name ?

Do you mean after the first upgrade-charm (that upgrades to cs:nrpe) ?

I'm not sure I understand your questions - as far as I can see, all the answers are in the bug report. Can you please elaborate ?

Thanks

Stuart Bishop (stub) wrote :

The charm changed name. The original charm name was 'nrpe-external-master' ('name: nrpe-external-master' in its metadata.yaml). The upgrade-charm --switch was attempting to change it to a charm named 'nrpe'.

The upgrade using the 'nrpe' charm on the local filesystem failed. The upgrade using cs:nrpe from the charm store worked.

Anastasia (anastasia-macmood) wrote :

This is the check that fails - https://github.com/juju/juju/blob/2.4/cmd/juju/application/upgradecharm.go#L513

I am not sure why it is there and what it safeguards...? Maybe we can remove it?

Changed in juju:
status: New → Triaged
importance: Undecided → High
milestone: none → 2.5.1
Ian Booth (wallyworld) on 2019-01-28
Changed in juju:
milestone: 2.5.1 → 2.5.2
Changed in juju:
milestone: 2.5.2 → 2.5.3
Changed in juju:
milestone: 2.5.3 → 2.5.4
Changed in juju:
milestone: 2.5.4 → 2.5.5
Changed in juju:
milestone: 2.5.6 → 2.5.8
Changed in juju:
milestone: 2.5.8 → 2.5.9
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers