From: Alfredo Deza Date: Wed, 8 Nov 2017 16:56:36 +0000 (-0500) Subject: ceph-volume systemd.systemctl masking ceph-disk needs to be done by directly symlinki... X-Git-Tag: v13.0.1~256^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cda47c247b929401a7dce3f1ef70371ea80eeceb;p=ceph.git ceph-volume systemd.systemctl masking ceph-disk needs to be done by directly symlinking to dev/null Signed-off-by: Alfredo Deza --- diff --git a/src/ceph-volume/ceph_volume/systemd/systemctl.py b/src/ceph-volume/ceph_volume/systemd/systemctl.py index 651ed3acf5fa..d8d29279c0a3 100644 --- a/src/ceph-volume/ceph_volume/systemd/systemctl.py +++ b/src/ceph-volume/ceph_volume/systemd/systemctl.py @@ -44,10 +44,14 @@ def enable_volume(id_, fsid, device_type='lvm'): return enable(volume_unit % (device_type, id_, fsid)) -def mask_ceph_disk(instance='*'): - # ``instance`` will probably be '*' all the time, because ceph-volume will - # want all instances disabled at once, not just one - return mask(ceph_disk_unit % instance) +def mask_ceph_disk(): + # systemctl allows using a glob like '*' for masking, but there was a bug + # in that it wouldn't allow this for service templates. This means that + # masking ceph-disk@* will not work, so we must link the service directly. + # /etc/systemd takes precendence regardless of the location of the unit + process.run( + ['sudo', 'ln', '-s', '/dev/null', '/etc/systemd/system/ceph-disk@.service'] + ) #