Merge lp://staging/~adam-collard/charm-helpers/systemd-mask-not-disable into lp://staging/charm-helpers

Proposed by Adam Collard
Status: Merged
Merged at revision: 733
Proposed branch: lp://staging/~adam-collard/charm-helpers/systemd-mask-not-disable
Merge into: lp://staging/charm-helpers
Diff against target: 43 lines (+4/-4)
2 files modified
charmhelpers/core/host.py (+2/-2)
tests/core/test_host.py (+2/-2)
To merge this branch: bzr merge lp://staging/~adam-collard/charm-helpers/systemd-mask-not-disable
Reviewer Review Type Date Requested Status
Chris Glass (community) Approve
Review via email: mp+322357@code.staging.launchpad.net

Description of the change

The service_pause implementation for SystemD machines will call "service foo disable" which in turn calls "systemctl disable foo", which /kinda/ disables the service. If the service is started again (by say, calling "service foo start") then it will still run, which is what the service_pause is supposed to prevent.

Instead we should call "service foo mask" as per https://fedoraproject.org/wiki/Systemd#How_do_I_start.2Fstop_or_enable.2Fdisable_services.3F

The reverse case is also true, where we should "unmask" instead of "enable"

To post a comment you must log in.
Revision history for this message
Chris Glass (tribaal) wrote :

That looks good. I am surprised this wasn't caught before, but at least this is should fix the problem.

+1

review: Approve

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