xen/xend-xm-reboot-fix.patch
Charles Arnold e09562d587 - Update to Xen 4.4.0 RC1 c/s 28233
- Drop 32bit support from spec file
- Dropped 520d417d-xen-Add-stdbool.h-workaround-for-BSD.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=282
2014-01-02 19:09:07 +00:00

26 lines
1.0 KiB
Diff

References: bnc#840997
Index: xen-4.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-4.4.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -435,7 +435,17 @@ class XendDomainInfo:
if i != 0:
self.vmpath = self.vmpath + '-' + str(i)
try:
- if self._readVm("uuid"):
+ # On reboot, the old VM may not be completely gone causing
+ # duplicate VMs to appear one of which has '-1' appended to
+ # the uuid. This can lead to VM corruption.
+ timeout = 0
+ while timeout < 5:
+ if self._readVm("uuid"):
+ time.sleep(0.1)
+ timeout += 1
+ else:
+ break
+ if timeout >= 5:
self.vmpath = None
i = i + 1
except: