Try to be nicer to the DB when destroying a libvirt instance.

This commit is contained in:
Josh Kearney 2011-04-13 22:03:11 +00:00 committed by Tarmac
commit a9e628ba88
1 changed files with 3 additions and 0 deletions

View File

@ -372,6 +372,9 @@ class LibvirtConnection(driver.ComputeDriver):
instance['id'], state)
if state == power_state.SHUTOFF:
break
# Let's not hammer on the DB
time.sleep(1)
except Exception as ex:
msg = _("Error encountered when destroying instance '%(id)s': "
"%(ex)s") % {"id": instance["id"], "ex": ex}