summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-06-24 14:58:36 +0000
committerGerrit Code Review <review@openstack.org>2013-06-24 14:58:36 +0000
commitedcd837d060254f0d95ca2e2744a1a1208c91fd4 (patch)
tree7b8ba0ccdec57f8c7fcaffeb9e0f3e7388c04a03
parent3cfb2c7f51967c850fd4fc93a84a7943d32459b8 (diff)
parentee1accfe0328c648344cc59b7b54302ba9a687f0 (diff)
downloadnova-edcd837d060254f0d95ca2e2744a1a1208c91fd4.tar.gz
nova-edcd837d060254f0d95ca2e2744a1a1208c91fd4.tar.xz
nova-edcd837d060254f0d95ca2e2744a1a1208c91fd4.zip
Merge "Fix xenstore-rm race condition"
-rwxr-xr-xplugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py
index 9c86b7cb7..a12704248 100755
--- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py
+++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py
@@ -159,7 +159,13 @@ def delete_record(self, arg_dict):
VM and the specified path from xenstore.
"""
cmd = ["xenstore-rm", "/local/domain/%(dom_id)s/%(path)s" % arg_dict]
- ret, result = _run_command(cmd)
+ try:
+ ret, result = _run_command(cmd)
+ except XenstoreError, e:
+ if 'could not remove path' in e.stderr:
+ # Entry already gone. We're good to go.
+ return ''
+ raise
return result