From: Josh Durgin Date: Thu, 23 Jun 2011 00:32:10 +0000 (-0700) Subject: Wait for rbd devices to be removed before removing the module. X-Git-Tag: v0.94.10~27^2^2~364^2~1688 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=122ed286385f8641e2952a018dad02d4f12ccfd9;p=ceph.git Wait for rbd devices to be removed before removing the module. --- diff --git a/teuthology/task/rbd.py b/teuthology/task/rbd.py index c288821d5743..66500c03f333 100644 --- a/teuthology/task/rbd.py +++ b/teuthology/task/rbd.py @@ -201,6 +201,13 @@ def dev_create(ctx, config): '-p', 'rbd', 'unmap', '/dev/rbd/rbd/{imgname}'.format(imgname=image), + run.Raw('&&'), + # wait for the symlink to be deleted by udev + 'while', 'test', '-e', '/dev/rbd/rbd/{image}'.format(image=image), + run.Raw(';'), + 'do', + 'sleep', '1', run.Raw(';'), + 'done', ], ) remote.run(