]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: ceph-volume: disallow concurrent execution 34423/head
authorSage Weil <sage@redhat.com>
Tue, 31 Mar 2020 13:16:25 +0000 (08:16 -0500)
committerNathan Cutler <ncutler@suse.com>
Mon, 6 Apr 2020 15:06:30 +0000 (17:06 +0200)
Fixes: https://tracker.ceph.com/issues/44820
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit eae20a70738f20738b3754e464b8a4922912e58a)

src/cephadm/cephadm

index baccd7c050514e5385cab8f8af7d5f7636424dd6..4d71bc6ed51372fcf2ed2a0e084404387c4c24fb 100755 (executable)
@@ -2635,6 +2635,9 @@ def command_ceph_volume():
     if args.fsid:
         make_log_dir(args.fsid)
 
+    l = FileLock(args.fsid)
+    l.acquire()
+
     (uid, gid) = (0, 0) # ceph-volume runs as root
     mounts = get_container_mounts(args.fsid, 'osd', None)