Start hook executed erroneously during series upgrade.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Achilleas Anagnostopoulos |
Bug Description
During upgrade-series, no hooks should be run between pre-series-upgrade and post-series-
Reproducer (assuming running from the juju source for 2.8.1 release):
juju bootstrap lxd series-test
juju deploy ./acceptancetes
juju deploy ./acceptancetes
juju relate dummy-sink dummy-subordinate
juju config dummy-subordinate token=canonical
watch -c juju status --color
juju upgrade-series 0 prepare bionic
juju run --machine 0 'sudo shutdown -r now'
Then ssh'ed to machine 0
/var/log/juju$ cat machine-lock.log
[snip]
2020-08-07 04:30:47 unit-dummy-
2020-08-07 04:30:47 unit-dummy-sink-0: uniter (run pre-series-upgrade hook), waited 0s, held 0s
2020-08-07 04:31:31 === agent unit-dummy-
2020-08-07 04:31:32 unit-dummy-
2020-08-07 04:31:31 === agent unit-dummy-sink-0 started ===
2020-08-07 04:31:32 unit-dummy-sink-0: uniter (run start hook), waited 0s, held 0s
When the unit was rebooted, since the uniter was in an upgrade-series state, it shouldn't be running the start hook.
I ran the `sudo do-release-upgrade -f DistUpgradeView
After the machine agent came up, I ran 'juju upgrade-series 0 complete'
$ juju upgrade-series 0 complete
machine-0 complete phase started
machine-0 started unit agents after series upgrade
dummy-sink/0 post-series-upgrade hook running
dummy-sink/0 post-series-upgrade completed
dummy-subordinate/0 post-series-upgrade hook running
dummy-subordinate/0 post-series-upgrade hook not found, skipping
Upgrade series for machine "0" has successfully completed
You can see from the machine lock output that the start hook was called again after the reboot, but before the post-series-upgrade hook.
2020-08-07 04:42:00 === agent unit-dummy-sink-0 started ===
2020-08-07 04:42:01 unit-dummy-sink-0: uniter (run start hook), waited 0s, held 1s
2020-08-07 04:42:00 === agent unit-dummy-
2020-08-07 04:42:01 unit-dummy-
2020-08-07 04:42:50 unit-dummy-sink-0: uniter (run post-series-upgrade hook), waited 0s, held 0s
2020-08-07 04:42:50 unit-dummy-
2020-08-07 04:47:25 unit-dummy-sink-0: uniter (run update-status hook), waited 0s, held 0s
2020-08-07 04:47:25 unit-dummy-
Changed in juju: | |
assignee: | nobody → Achilleas Anagnostopoulos (achilleasa) |
Changed in juju: | |
status: | Triaged → In Progress |
Changed in juju: | |
milestone: | 2.8-next → 2.8.2 |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
PR https:/ /github. com/juju/ juju/pull/ 11887 includes a fix for 2.8