Running 2.6.10, Xenial.
I ran juju upgrade-series 12 prepare bionic, which looked to have completed the hooks but then hung for 20+ mins. I ended up ctrl-c'ing the command.
This left a lock behind, preventing retry of the prepare, and preventing complete:
https://pastebin.canonical.com/p/9ptW9CX9Yy/
Fixed with:
db.machineUpgradeSeriesLocks.update({ "_id" : "55ab2ebd-6e66-4d23-8549-aee9f03fae13:12" }, { $set: { "machine-status" : "prepare completed" } } )
Is there a better way to do this? Two things come to mind - firstly, don't ctrl-c, I should have spent more time digging into what was hanging. Second, we could do with a retry or a force option, in case I wasn't running this in a tmux and lost my session to the controller (which happens when we work remotely).
Affected by a similar behavior. While doing series upgrade from xenial to bionic running the complete action at the end one of the units hanged execution for a long time. I had to ctrl+c as nothing was happening for 30+ minutes.
Afterwards I finished running the post-series-upgrade on the remaining units, then tried to add a lxd to one of the hosts and I got
ERROR acquiring machine to host unit <UNIT> machine "X" is locked for series upgrade
Then I checked mongodb and found out that all machines were in "complete started" machine-status.
Fixed it manually by updating the "complete started" to "completed" for all machines (all were affected by this):
db.machineUpgra deSeriesLocks. update( {}, { $set: { "machine-status" : "completed" } } )
Tried to re-do the series upgrade or complete actions but juju did not allow it.