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

Bug #1805993 reported by Junien F
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
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

Revision history for this message
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.

Revision history for this message
Junien F (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

Revision history for this message
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.

Revision history for this message
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)
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
Revision history for this message
Anastasia (anastasia-macmood) wrote :

Removing from a milestone as this work will not be done in 2.5 series.

Changed in juju:
milestone: 2.5.9 → 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: High → 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.