]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: ceph-volume: disallow concurrent execution 34320/head
authorSage Weil <sage@redhat.com>
Tue, 31 Mar 2020 13:16:25 +0000 (08:16 -0500)
committerSage Weil <sage@redhat.com>
Tue, 31 Mar 2020 13:16:25 +0000 (08:16 -0500)
Fixes: https://tracker.ceph.com/issues/44820
Signed-off-by: Sage Weil <sage@redhat.com>
src/cephadm/cephadm

index fabadab0c00d36c95e9c3a63582272d2818e7b6e..7d257a65447b6c2087d77023f46bf2bb96e33a42 100755 (executable)
@@ -2637,6 +2637,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)