Series upgrade should be a no-op if there is nothing to do

Bug #1969858 reported by Peter Matulis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Medium
Unassigned

Bug Description

The series upgrade workflow is brittle and can lead to strange results if there is no upgrade candidate available.

$ juju set-series ceph-mon jammy
$ juju upgrade-series 0/lxd/0 prepare jammy
$ juju status ceph-mon

App Version Status Scale Charm Channel Rev Exposed Message
ceph-mon 17.1.0 blocked 3 ceph-mon quincy/edge 104 no Ready for do-release-upgrade and reboot. Set complete when finished.

Unit Workload Agent Machine Public address Ports Message
ceph-mon/0 blocked idle 0/lxd/0 10.246.114.72 Ready for do-release-upgrade and reboot. Set complete when finished.
ceph-mon/1 active idle 1/lxd/0 10.246.114.74 Unit is ready and clustered
ceph-mon/2* active idle 2/lxd/0 10.246.114.64 Unit is ready and clustered

$ juju ssh 0/lxd/0 sudo apt update
$ juju ssh 0/lxd/0 sudo apt full-upgrade
$ juju ssh 0/lxd/0 sudo do-release-upgrade

Checking for a new Ubuntu release
There is no development version of an LTS available.
To upgrade to the latest non-LTS development release
set Prompt=normal in /etc/update-manager/release-upgrades.
Connection to 10.246.114.72 closed.

What is a user supposed to do now?

I rebooted the machine but this did not change anything.

I then tried to "complete" the upgrade thinking it would bring me back to the starting point:

$ juju upgrade-series 0/lxd/0 complete

machine-0-lxd-0 complete phase started
machine-0-lxd-0 start units after series upgrade
ceph-mon/0 post-series-upgrade hook running
ceph-mon/0 post-series-upgrade completed
machine-0-lxd-0 series upgrade complete

Upgrade series for machine "0/lxd/0" has successfully completed

Now I have:

0/lxd/0 started 10.246.114.72 juju-997b4f-0-lxd-0 focal default series upgrade completed: success

===

Recommendation:

The `prepare` sub-command should CHECK to see whether there is something to do and report back to the user. For sure, there should be no operation if there is nothing to do (e.g. `juju status` should not report 'Ready for do-release-upgrade and reboot. Set complete when finished.').

Revision history for this message
Peter Matulis (petermatulis) wrote :

By the way, afterwards, this happened on machine '0':

$ juju add-machine -n 1 lxd:0 --constraints spaces=public-space
failed to create 1 machine
ERROR cannot add a new machine: machine 0 is locked for series upgrade

Revision history for this message
Harry Pidcock (hpidcock) wrote :

Sounds like the bug here is
`ERROR cannot add a new machine: machine 0 is locked for series upgrade`
after the upgrade is "complete".
If the solution is a `juju upgrade-series [machine] abort` command, then that would improve the workflow a bit. I am hesitant to add a precheck, as someone may well want to upgrade to a pre-release series.

Changed in juju:
importance: Undecided → Medium
milestone: none → 3.1-beta1
status: New → Triaged
Changed in juju:
assignee: nobody → Simon Richardson (simonrichardson)
Changed in juju:
milestone: 3.1-beta1 → none
assignee: Simon Richardson (simonrichardson) → nobody
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.