Merge lp:~free.ekanayaka/landscape-charm/enable-juju-sync into lp:~landscape/landscape-charm/trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Free Ekanayaka | ||||
Approved revision: | 248 | ||||
Merged at revision: | 243 | ||||
Proposed branch: | lp:~free.ekanayaka/landscape-charm/enable-juju-sync | ||||
Merge into: | lp:~landscape/landscape-charm/trunk | ||||
Prerequisite: | lp:~danilo/landscape-charm/enable-cronscripts | ||||
Diff against target: |
469 lines (+281/-5) 11 files modified
hooks/hosted-relation-changed (+9/-0) hooks/lib/callbacks/filesystem.py (+32/-0) hooks/lib/callbacks/tests/test_filesystem.py (+29/-0) hooks/lib/relations/hosted.py (+37/-0) hooks/lib/relations/tests/test_hosted.py (+61/-0) hooks/lib/services.py (+8/-1) hooks/lib/tests/sample.py (+4/-0) hooks/lib/tests/test_services.py (+38/-3) hooks/lib/tests/test_templates.py (+58/-1) templates/landscape-server (+4/-0) templates/service.conf (+1/-0) |
||||
To merge this branch: | bzr merge lp:~free.ekanayaka/landscape-charm/enable-juju-sync | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alberto Donato (community) | Approve | ||
Adam Collard (community) | Approve | ||
🤖 Landscape Builder | test results | Approve | |
Review via email: mp+255182@code.launchpad.net |
Commit message
This branch enables the juju-sync process on the leader unit, if
the deployment is a standalone deployment.
In order to fix the main bug, I also had to fix a side bug, i.e. handling
the relation with the landscape-hosted charm, so we know which deployment
mode we're deployed with (and hence whether to fire juju-sync or not). Since
the final branch is not too big, I'm pushing everything in one go.
Description of the change
This branch enables the juju-sync process on the leader unit, if
the deployment is a standalone deployment.
In order to fix the main bug, I also had to fix a side bug, i.e. handling
the relation with the landscape-hosted charm, so we know which deployment
mode we're deployed with (and hence whether to fire juju-sync or not). Since
the final branch is not too big, I'm pushing everything in one go.
To test this branch grab the juju-deployer config from
https:/
and deploy with
juju-deployer -vdW -w180 -c landscape.yaml landscape
You'll see that the landscape-server unit has RUN_JUJU_SYNC=yes in
its /etc/default/
process is actually running on it.
If you now run "juju add-unit landscape-server" and wait, the new
unit won't be running juju-sync, as it's not the leader.
Furthermore if you grab the landscape-hosted charm (lp:landscape-hosted-charm),
deploy it and relate it to landscape-server you'll see that the
leader unit no longer runs juju-sync.
Command: make ci-test /ci.lscape. net/job/ latch-test/ 398/
Result: Success
Revno: 243
Branch: lp:~free.ekanayaka/landscape-charm/enable-juju-sync
Jenkins: https:/