summaryrefslogtreecommitdiffstats
path: root/plugins/xenserver
diff options
context:
space:
mode:
authorRick Harris <rconradharris@gmail.com>2012-07-30 15:49:02 +0000
committerRick Harris <rconradharris@gmail.com>2012-07-30 15:49:02 +0000
commit40a84de65ae870c363587b3cacb1c1308eee069e (patch)
tree942735377218d1f5cd96cd85c55177a869c805f1 /plugins/xenserver
parent7047d854f13f25f306968aa1b068848eea67d71f (diff)
downloadnova-40a84de65ae870c363587b3cacb1c1308eee069e.tar.gz
nova-40a84de65ae870c363587b3cacb1c1308eee069e.tar.xz
nova-40a84de65ae870c363587b3cacb1c1308eee069e.zip
Xen: VHD sequence validation should handle swap.
The VHD sequence validation code was erroneously counting `swap.vhd`, which caused it to raise an exception when a corresponding numbered VHD was not found. The fix is to simply ignore the `swap.vhd` file. Other unknown VHDs will generate an exception, but from a sanity-checking perspective, this is a Good Thing(tm). Fixes bug 1030939 Change-Id: Ic82ae27a4af7ea8f7669fd006aea1a310b691218
Diffstat (limited to 'plugins/xenserver')
-rw-r--r--plugins/xenserver/xenapi/etc/xapi.d/plugins/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/utils.py b/plugins/xenserver/xenapi/etc/xapi.d/plugins/utils.py
index bd9286658..37de1ecff 100644
--- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/utils.py
+++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/utils.py
@@ -219,6 +219,9 @@ def _validate_sequenced_vhds(staging_path):
if not filename.endswith('.vhd'):
continue
+ if filename == "swap.vhd":
+ continue
+
vhd_path = os.path.join(staging_path, "%d.vhd" % seq_num)
if not os.path.exists(vhd_path):
raise Exception("Corrupt image. Expected seq number: %d. Files: %s"