From fb016548ad342d16dd0910983fdc3a6a61aab58f Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Wed, 22 Jun 2011 16:36:12 -0700 Subject: [PATCH] Wait for block device to show up in task rbd.dev_create. --- teuthology/task/rbd.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/teuthology/task/rbd.py b/teuthology/task/rbd.py index b9efb19d2471f..0b21760dea551 100644 --- a/teuthology/task/rbd.py +++ b/teuthology/task/rbd.py @@ -173,6 +173,11 @@ def dev_create(ctx, config): '-p', 'rbd', 'map', image, + run.Raw('&&'), + # wait for the symlink to be created by udev + 'while', 'test', '!', '-e', '/dev/rbd/rbd/{image}'.format(image=image), run.Raw(';'), 'do', + 'sleep', '1', run.Raw(';'), + 'done', ], ) try: -- 2.39.5