From: Loic Dachary Date: Sun, 20 Sep 2015 11:54:05 +0000 (+0200) Subject: ceph-disk: systemd must not kill a running ceph-disk X-Git-Tag: v9.1.0~89^2^2~19 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f0a47578c7c4521d7cf50e9419620ddb629736f5;p=ceph.git ceph-disk: systemd must not kill a running ceph-disk When activating a device, ceph-disk trigger restarts the ceph-disk systemd service. Two consecutive udev add on the same device will restart the ceph-disk systemd service and the second one may kill the first one, leaving the device half activated. The ceph-disk systemd service is instructed to not kill an existing process when restarting. The second run waits (via flock) for the second one to complete before running so that they do not overlap. http://tracker.ceph.com/issues/13160 Fixes: #13160 Signed-off-by: Loic Dachary --- diff --git a/systemd/ceph-disk@.service b/systemd/ceph-disk@.service index 88e4aef44160..cff7e9fbc4a2 100644 --- a/systemd/ceph-disk@.service +++ b/systemd/ceph-disk@.service @@ -3,6 +3,6 @@ Description=Ceph disk activation: %f [Service] Type=oneshot -RemainAfterExit=yes -ExecStart=/usr/sbin/ceph-disk --verbose --log-stdout trigger --sync %f +KillMode=none +ExecStart=/bin/flock /var/lock/ceph-disk -c '/usr/sbin/ceph-disk --verbose --log-stdout trigger --sync %f' TimeoutSec=0