]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk: run partprobe after zap
authorLoic Dachary <loic-201408@dachary.org>
Thu, 9 Oct 2014 16:52:17 +0000 (18:52 +0200)
committerLoic Dachary <ldachary@redhat.com>
Tue, 18 Nov 2014 11:20:01 +0000 (12:20 +0100)
Not running partprobe after zapping a device can lead to the following:

* ceph-disk prepare /dev/loop2
* links are created in /dev/disk/by-partuuid
* ceph-disk zap /dev/loop2
* links are not removed from /dev/disk/by-partuuid
* ceph-disk prepare /dev/loop2
* some links are not created in /dev/disk/by-partuuid

This is assuming there is a bug in the way udev events are handled by
the operating system.

http://tracker.ceph.com/issues/9665 Fixes: #9665

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
src/ceph-disk

index 0334c92b5fa452d187411a0db8fd65cba1f558c3..f76c315201505a88299000b6b9128b19573e4fc2 100755 (executable)
@@ -1031,6 +1031,9 @@ def zap(dev):
                 dev,
             ],
         )
+
+        update_partition('-d', dev, 'zapped')
+
     except subprocess.CalledProcessError as e:
         raise Error(e)