Merge lp://qastaging/~free.ekanayaka/landscape-charm/dont-restart-when-leader-is-deposed into lp://qastaging/~landscape/landscape-charm/trunk
Status: | Merged |
---|---|
Approved by: | Free Ekanayaka |
Approved revision: | 370 |
Merged at revision: | 368 |
Proposed branch: | lp://qastaging/~free.ekanayaka/landscape-charm/dont-restart-when-leader-is-deposed |
Merge into: | lp://qastaging/~landscape/landscape-charm/trunk |
Diff against target: |
125 lines (+79/-3) 2 files modified
lib/callbacks/scripts.py (+47/-1) lib/callbacks/tests/test_scripts.py (+32/-2) |
To merge this branch: | bzr merge lp://qastaging/~free.ekanayaka/landscape-charm/dont-restart-when-leader-is-deposed |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Adam Collard (community) | Approve | ||
🤖 Landscape Builder | test results | Approve | |
Данило Шеган (community) | Approve | ||
Review via email:
|
Commit message
This branch fixes hook errors happening when removing the
leader unit. The errors happen in the "leader-
hook, which is fired before any other hook and that fails
to restart services because in the meantime the postgresql
charm has already changed its configuration to not accept
connections from the leader unit.
Description of the change
This branch fixes hook errors happening when removing the
leader unit. The errors happen in the "leader-
hook, which is fired before any other hook and that fails
to restart services because in the meantime the postgresql
charm has already changed its configuration to not accept
connections from the leader unit.
The fix is somehow a workaround, as explained in the code. The
best approach would be to not have singletons services at all
(or in case we really need to, use the hacluster charm).
Testing instructions:
I created a 2-unit deployment and removed the leader unit, it
all worked, contrary to trunk.
Command: make ci-test /ci.lscape. net/job/ latch-test/ 10281/
Result: Success
Revno: 368
Branch: lp:~free.ekanayaka/landscape-charm/dont-restart-when-leader-is-deposed
Jenkins: https:/