- bnc#688519: correct indention in xend-domain-lock.patch
OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=112
This commit is contained in:
parent
76fdecff9e
commit
be3eccd8df
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 20 17:50:04 CEST 2011 - ohering@suse.de
|
||||
|
||||
- bnc#688519: correct indention in xend-domain-lock.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 11 15:55:04 MDT 2011 - jfehlig@suse.de
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
---
|
||||
tools/examples/xend-config.sxp | 59 ++++++++++++++++++++++
|
||||
tools/hotplug/Linux/Makefile | 1
|
||||
tools/hotplug/Linux/domain-lock | 83 ++++++++++++++++++++++++++++++++
|
||||
tools/hotplug/Linux/vm-monitor | 41 +++++++++++++++
|
||||
tools/python/xen/xend/XendCheckpoint.py | 3 +
|
||||
tools/python/xen/xend/XendDomainInfo.py | 74 ++++++++++++++++++++++++++++
|
||||
tools/python/xen/xend/XendOptions.py | 29 +++++++++++
|
||||
7 files changed, 290 insertions(+)
|
||||
|
||||
Index: xen-4.1.0-testing/tools/examples/xend-config.sxp
|
||||
===================================================================
|
||||
--- xen-4.1.0-testing.orig/tools/examples/xend-config.sxp
|
||||
@ -68,74 +78,6 @@ Index: xen-4.1.0-testing/tools/examples/xend-config.sxp
|
||||
# If we have a very big scsi device configuration, start of xend is slow,
|
||||
# because xend scans all the device paths to build its internal PSCSI device
|
||||
# list. If we need only a few devices for assigning to a guest, we can reduce
|
||||
Index: xen-4.1.0-testing/tools/python/xen/xend/XendOptions.py
|
||||
===================================================================
|
||||
--- xen-4.1.0-testing.orig/tools/python/xen/xend/XendOptions.py
|
||||
+++ xen-4.1.0-testing/tools/python/xen/xend/XendOptions.py
|
||||
@@ -154,6 +154,17 @@ class XendOptions:
|
||||
use loose check automatically if necessary."""
|
||||
pci_dev_assign_strict_check_default = True
|
||||
|
||||
+ """Default for the flag indicating whether xend should create
|
||||
+ a lock file for domains when they are started."""
|
||||
+ xend_domain_lock = 'no'
|
||||
+
|
||||
+ """Default domain lock storage path."""
|
||||
+ xend_domain_lock_path_default = '/var/lib/xen/images/vm_locks'
|
||||
+
|
||||
+ """Default script to acquire/release domain lock"""
|
||||
+ xend_domain_lock_utility = auxbin.scripts_dir() + "/domain-lock"
|
||||
+
|
||||
+
|
||||
def __init__(self):
|
||||
self.configure()
|
||||
|
||||
@@ -401,6 +412,24 @@ class XendOptions:
|
||||
else:
|
||||
return None
|
||||
|
||||
+ def get_xend_domain_lock(self):
|
||||
+ """Get the flag indicating whether xend should create a lock file
|
||||
+ for domains when they are started."""
|
||||
+ return self.get_config_bool("xend-domain-lock", self.xend_domain_lock)
|
||||
+
|
||||
+ def get_xend_domain_lock_path(self):
|
||||
+ """ Get the path for domain lock storage
|
||||
+ """
|
||||
+ return self.get_config_string("xend-domain-lock-path", self.xend_domain_lock_path_default)
|
||||
+
|
||||
+ def get_xend_domain_lock_utility(self):
|
||||
+ s = self.get_config_string('xend-domain-lock-utility')
|
||||
+
|
||||
+ if s:
|
||||
+ return os.path.join(auxbin.scripts_dir(), s)
|
||||
+ else:
|
||||
+ return self.xend_domain_lock_utility
|
||||
+
|
||||
|
||||
def get_vnc_tls(self):
|
||||
return self.get_config_string('vnc-tls', self.xend_vnc_tls)
|
||||
Index: xen-4.1.0-testing/tools/python/xen/xend/XendCheckpoint.py
|
||||
===================================================================
|
||||
--- xen-4.1.0-testing.orig/tools/python/xen/xend/XendCheckpoint.py
|
||||
+++ xen-4.1.0-testing/tools/python/xen/xend/XendCheckpoint.py
|
||||
@@ -133,6 +133,8 @@ def save(fd, dominfo, network, live, dst
|
||||
dominfo.shutdown('suspend')
|
||||
dominfo.waitForSuspend()
|
||||
if line in ('suspend', 'suspended'):
|
||||
+ if checkpoint == False:
|
||||
+ dominfo.release_running_lock(domain_name)
|
||||
dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP2,
|
||||
domain_name)
|
||||
log.info("Domain %d suspended.", dominfo.getDomid())
|
||||
@@ -410,6 +412,7 @@ def restore(xd, fd, dominfo = None, paus
|
||||
if not paused:
|
||||
dominfo.unpause()
|
||||
|
||||
+ dominfo.acquire_running_lock()
|
||||
return dominfo
|
||||
except Exception, exn:
|
||||
dominfo.destroy()
|
||||
Index: xen-4.1.0-testing/tools/hotplug/Linux/Makefile
|
||||
===================================================================
|
||||
--- xen-4.1.0-testing.orig/tools/hotplug/Linux/Makefile
|
||||
@ -282,6 +224,27 @@ Index: xen-4.1.0-testing/tools/hotplug/Linux/vm-monitor
|
||||
+elif [ $0 = "$basedir/vm-monitor" ]; then
|
||||
+ monitor $*
|
||||
+fi
|
||||
Index: xen-4.1.0-testing/tools/python/xen/xend/XendCheckpoint.py
|
||||
===================================================================
|
||||
--- xen-4.1.0-testing.orig/tools/python/xen/xend/XendCheckpoint.py
|
||||
+++ xen-4.1.0-testing/tools/python/xen/xend/XendCheckpoint.py
|
||||
@@ -133,6 +133,8 @@ def save(fd, dominfo, network, live, dst
|
||||
dominfo.shutdown('suspend')
|
||||
dominfo.waitForSuspend()
|
||||
if line in ('suspend', 'suspended'):
|
||||
+ if checkpoint == False:
|
||||
+ dominfo.release_running_lock(domain_name)
|
||||
dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP2,
|
||||
domain_name)
|
||||
log.info("Domain %d suspended.", dominfo.getDomid())
|
||||
@@ -410,6 +412,7 @@ def restore(xd, fd, dominfo = None, paus
|
||||
if not paused:
|
||||
dominfo.unpause()
|
||||
|
||||
+ dominfo.acquire_running_lock()
|
||||
return dominfo
|
||||
except Exception, exn:
|
||||
dominfo.destroy()
|
||||
Index: xen-4.1.0-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
===================================================================
|
||||
--- xen-4.1.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
@ -381,3 +344,50 @@ Index: xen-4.1.0-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
def __str__(self):
|
||||
return '<domain id=%s name=%s memory=%s state=%s>' % \
|
||||
(str(self.domid), self.info['name_label'],
|
||||
Index: xen-4.1.0-testing/tools/python/xen/xend/XendOptions.py
|
||||
===================================================================
|
||||
--- xen-4.1.0-testing.orig/tools/python/xen/xend/XendOptions.py
|
||||
+++ xen-4.1.0-testing/tools/python/xen/xend/XendOptions.py
|
||||
@@ -154,6 +154,17 @@ class XendOptions:
|
||||
use loose check automatically if necessary."""
|
||||
pci_dev_assign_strict_check_default = True
|
||||
|
||||
+ """Default for the flag indicating whether xend should create
|
||||
+ a lock file for domains when they are started."""
|
||||
+ xend_domain_lock = 'no'
|
||||
+
|
||||
+ """Default domain lock storage path."""
|
||||
+ xend_domain_lock_path_default = '/var/lib/xen/images/vm_locks'
|
||||
+
|
||||
+ """Default script to acquire/release domain lock"""
|
||||
+ xend_domain_lock_utility = auxbin.scripts_dir() + "/domain-lock"
|
||||
+
|
||||
+
|
||||
def __init__(self):
|
||||
self.configure()
|
||||
|
||||
@@ -401,6 +412,24 @@ class XendOptions:
|
||||
else:
|
||||
return None
|
||||
|
||||
+ def get_xend_domain_lock(self):
|
||||
+ """Get the flag indicating whether xend should create a lock file
|
||||
+ for domains when they are started."""
|
||||
+ return self.get_config_bool("xend-domain-lock", self.xend_domain_lock)
|
||||
+
|
||||
+ def get_xend_domain_lock_path(self):
|
||||
+ """ Get the path for domain lock storage
|
||||
+ """
|
||||
+ return self.get_config_string("xend-domain-lock-path", self.xend_domain_lock_path_default)
|
||||
+
|
||||
+ def get_xend_domain_lock_utility(self):
|
||||
+ s = self.get_config_string('xend-domain-lock-utility')
|
||||
+
|
||||
+ if s:
|
||||
+ return os.path.join(auxbin.scripts_dir(), s)
|
||||
+ else:
|
||||
+ return self.xend_domain_lock_utility
|
||||
+
|
||||
|
||||
def get_vnc_tls(self):
|
||||
return self.get_config_string('vnc-tls', self.xend_vnc_tls)
|
||||
|
Loading…
Reference in New Issue
Block a user