]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume systemd.systemctl masking ceph-disk needs to be done by directly symlinki...
authorAlfredo Deza <adeza@redhat.com>
Wed, 8 Nov 2017 16:56:36 +0000 (11:56 -0500)
committerAlfredo Deza <adeza@redhat.com>
Thu, 9 Nov 2017 17:02:15 +0000 (12:02 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
src/ceph-volume/ceph_volume/systemd/systemctl.py

index 651ed3acf5fa195b02ce1d7b01876a953c11201b..d8d29279c0a381e2dd9634de7c18278758113346 100644 (file)
@@ -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']
+    )
 
 
 #