upgrade-charm --force-units fails if already latest
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Expired
|
Medium
|
Unassigned |
Bug Description
If you mistakenly run 'juju upgrade-charm' against an application with a failing hook, then the upgrade will not run. However, the latest version of the charm is uploaded to the controller and deployed on other units. Running 'juju upgrade-charm --force-units' to result the problem then fails, because the application already has the latest version of the charm, so there is no way to push out the latest version to the failing unit to stop it failing.
Work around is to fake an update (annoying if you are deploying from the charm store), or to ssh into the unit and manually fix things.
juju upgrade-charm --force-units should push out the latest version of the charm to all units, even if the latest version already exists on the controller and there is no need to refresh it there.
It is also possible to 'juju resolved --no-retry' the unit until the original upgrade-charm hook has had a chance to run, but this would still be better resolved by 'juju upgrade-charm --force-units' doing what it is told and forcing an upgrade onto the units.