Merge lp://staging/~danilo/landscape-charm/enable-cronscripts into lp://staging/~landscape/landscape-charm/trunk

Proposed by Данило Шеган
Status: Merged
Approved by: Данило Шеган
Approved revision: 243
Merged at revision: 241
Proposed branch: lp://staging/~danilo/landscape-charm/enable-cronscripts
Merge into: lp://staging/~landscape/landscape-charm/trunk
Diff against target: 123 lines (+47/-4)
5 files modified
hooks/lib/services.py (+5/-3)
hooks/lib/tests/test_services.py (+4/-1)
hooks/lib/tests/test_templates.py (+27/-0)
templates/landscape-server (+5/-0)
templates/service.conf (+6/-0)
To merge this branch: bzr merge lp://staging/~danilo/landscape-charm/enable-cronscripts
Reviewer Review Type Date Requested Status
Benji York (community) Approve
Free Ekanayaka (community) Approve
🤖 Landscape Builder test results Approve
Review via email: mp+255116@code.staging.launchpad.net

Commit message

Enable cronscripts to run on the leader unit.

All other units will have RUN_CRON=no in their /etc/default/landscape-server

Description of the change

This will enable cronscripts to run on the leader unit.

All other units will have RUN_CRON=no in their /etc/default/landscape-server

However, due to permissions problem, this was never really sourced in landscape-env.sh (even in quickstart package), since it checked for RUN_CRON==no (everything else, including empty, was considered "yes"). Thus, I modify ownership of that file to ~landscape.

To test drive, grab juju-deployer config from https://pastebin.canonical.com/128901/ and deploy with

  juju-deployer -vdW -w180 -c landscape.yaml landscape

Check out if scripts run (eg. update-alerts by looking at /var/log/landscape-server/update-alerts.log) by juju ssh-ing to that machine.

Add another unit

  juju add-unit landscape-server

Scripts should not be running here (iow, exiting early, no "start" and "end" messages for scripts).

To post a comment you must log in.
242. By Данило Шеган

Update the test for file ownership.

Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :

Command: make ci-test
Result: Success
Revno: 242
Branch: lp:~danilo/landscape-charm/enable-cronscripts
Jenkins: https://ci.lscape.net/job/latch-test/394/

review: Approve (test results)
Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

+1 with a little observation.

review: Approve
Revision history for this message
Benji York (benji) wrote :

This branch looks good. I had one question/suggestion inline.

review: Approve
Revision history for this message
Данило Шеган (danilo) wrote :

Thanks with your reviews, agree with both points.

243. By Данило Шеган

Address review comments.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches