Merge lp:~free.ekanayaka/landscape-charm/handle-config-changes into lp:~landscape/landscape-charm/trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Free Ekanayaka | ||||
Approved revision: | 278 | ||||
Merged at revision: | 275 | ||||
Proposed branch: | lp:~free.ekanayaka/landscape-charm/handle-config-changes | ||||
Merge into: | lp:~landscape/landscape-charm/trunk | ||||
Diff against target: |
550 lines (+185/-74) 14 files modified
Makefile (+2/-2) hooks/config-changed (+2/-2) lib/callbacks/apt.py (+6/-9) lib/callbacks/scripts.py (+17/-0) lib/callbacks/tests/test_apt.py (+11/-27) lib/callbacks/tests/test_scripts.py (+30/-2) lib/services.py (+26/-5) lib/tests/sample.py (+7/-2) lib/tests/test_services.py (+33/-5) tests/02-sslcert (+0/-16) tests/assets.py (+14/-1) tests/basic/test_sslcert.py (+3/-3) tests/helpers.py (+16/-0) tests/layers.py (+18/-0) |
||||
To merge this branch: | bzr merge lp:~free.ekanayaka/landscape-charm/handle-config-changes | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
🤖 Landscape Builder | test results | Approve | |
Adam Collard (community) | Approve | ||
Данило Шеган (community) | Approve | ||
Review via email: mp+259034@code.launchpad.net |
Commit message
This branch turns the config-changed hook into a regular hook managed by the service framework, meaning that if configuration values get changed, then proper actions will be taken (such as rewriting configuration files and/or restarting services).
The code of the former config-changed hook that used to handle changes in the APT source has basically become a regular callback (under lib/callbacks/
There also a couple of special cases:
1) if the only config value that has changed is the APT source, there's no need to restart services
2) if the SSL certificate config changes we want to notify the haproxy service and retrigger the HAProxyProvider
Finally, the standalone tests/02-sslcert test has been merged into the regular tests/01-basic test, since all we need is to set the SSL configuration and make sure it's correctly propagated to haproxy.
Description of the change
This branch turns the config-changed hook into a regular hook managed by the service framework, meaning that if configuration values get changed, then proper actions will be taken (such as rewriting configuration files and/or restarting services).
The code of the former config-changed hook that used to handle changes in the APT source has basically become a regular callback (under lib/callbacks/
There also a couple of special cases:
1) if the only config value that has changed is the APT source, there's no need to restart services
2) if the SSL certificate config changes we want to notify the haproxy service and retrigger the HAProxyProvider
Finally, the standalone tests/02-sslcert test has been merged into the regular tests/01-basic test, since all we need is to set the SSL configuration and make sure it's correctly propagated to haproxy. This is enough to test the integration point between the haproxy charm and the landscape-server charm (iow there's now no need to bootstrap a separate environment in order to exercise this behavior).
Command: make ci-test /ci.lscape. net/job/ latch-test/ 932/
Result: Success
Revno: 276
Branch: lp:~free.ekanayaka/landscape-charm/handle-config-changes
Jenkins: https:/