From 0fd7cb594e5482d78fed8a026a24c4e1c8dac3bc Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Sun, 12 Sep 2010 07:37:03 -0700 Subject: auto all and start all exceptions should be ignored --- nova/volume/driver.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/nova/volume/driver.py b/nova/volume/driver.py index a9ea5caa3..7d5db4ab0 100644 --- a/nova/volume/driver.py +++ b/nova/volume/driver.py @@ -103,8 +103,18 @@ class AOEDriver(object): @defer.inlineCallbacks def ensure_exports(self): """Runs all existing exports""" - yield self._try_execute("sudo vblade-persist auto all") - yield self._try_execute("sudo vblade-persist start all") + # NOTE(vish): The standard _try_execute does not work here + # because these methods throw errors if other + # volumes on this host are in the process of + # being created. The good news is the command + # still works for the other volumes, so we + # just wait a bit for the current volume to + # be ready and ignore any errors. + yield self._execute("sleep 2") + yield self._execute("sudo vblade-persist auto all", + check_exit_code=False) + yield self._execute("sudo vblade-persist start all", + check_exit_code=False) class FakeAOEDriver(AOEDriver): -- cgit