Resuming a non-leader unit doesn't work
Bug #1522389 reported by
Björn Tillenius
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Charm |
Fix Released
|
High
|
Björn Tillenius |
Bug Description
If you have at least two landscape-server units and pause a non-leader one, it won't be possible to resume that unit with the resume action.
The reason for this is that the 'resume' action checks for the presence of the maintenance.txt file, which is created when stopping the cron jobs. However, since cron is running only on the leader, only the leader will have the maintenance.txt file.
We should probably take this opportunity to use workload status and use that instead of the maintenance.txt file to determine whether we're in maintenance mode.
Related branches
lp:~bjornt/landscape-charm/workload-status
- Chris Glass (community): Approve
- 🤖 Landscape Builder: Approve (test results)
- Free Ekanayaka (community): Approve
-
Diff: 530 lines (+240/-52)12 files modifiedlib/action.py (+16/-14)
lib/callbacks/scripts.py (+12/-0)
lib/callbacks/tests/test_scripts.py (+47/-0)
lib/pause.py (+2/-0)
lib/resume.py (+6/-0)
lib/tests/stubs.py (+8/-0)
lib/tests/test_action.py (+34/-11)
lib/tests/test_migrate_schema.py (+5/-5)
lib/tests/test_pause.py (+14/-0)
lib/tests/test_resume.py (+72/-15)
lib/tests/test_upgrade.py (+4/-6)
tests/basic/test_actions.py (+20/-1)
Changed in landscape-charm: | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Björn Tillenius (bjornt) |
tags: | added: kanban |
tags: | removed: kanban |
Changed in landscape-charm: | |
status: | In Progress → Fix Committed |
Changed in landscape-charm: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I've tested r340 (current lp:landscape-charm trunk tip), and resume is working properly for non-leader landscape-server units (for leader units as well, fwiw). lsctl reports services are back up and workload-status goes from maintenance to active. It's green to go.