From: Loic Dachary Date: Thu, 9 Oct 2014 16:52:17 +0000 (+0200) Subject: ceph-disk: run partprobe after zap X-Git-Tag: v0.90~66^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fed3b06c47a5ef22cb3514c7647544120086d1e7;p=ceph.git ceph-disk: run partprobe after zap 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 --- diff --git a/src/ceph-disk b/src/ceph-disk index 0334c92b5fa4..f76c31520150 100755 --- a/src/ceph-disk +++ b/src/ceph-disk @@ -1031,6 +1031,9 @@ def zap(dev): dev, ], ) + + update_partition('-d', dev, 'zapped') + except subprocess.CalledProcessError as e: raise Error(e)