Hello community,

here is the log from the commit of package xen for openSUSE:Factory
checked in at Thu Apr 21 12:07:52 CEST 2011.



--------
--- xen/xen.changes     2011-04-12 00:31:35.000000000 +0200
+++ /mounts/work_src_done/STABLE/xen/xen.changes        2011-04-20 
18:02:15.000000000 +0200
@@ -1,0 +2,5 @@
+Wed Apr 20 17:50:04 CEST 2011 - [email protected]
+
+- bnc#688519: correct indention in xend-domain-lock.patch
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xen.spec ++++++
--- /var/tmp/diff_new_pack.gllhVL/_old  2011-04-21 12:07:14.000000000 +0200
+++ /var/tmp/diff_new_pack.gllhVL/_new  2011-04-21 12:07:14.000000000 +0200
@@ -80,7 +80,7 @@
 BuildRequires:  kernel-source kernel-syms module-init-tools xorg-x11
 %endif
 Version:        4.1.0_01
-Release:        7
+Release:        9
 License:        GPLv2+
 Group:          System/Kernel
 AutoReqProv:    on


++++++ xend-domain-lock.patch ++++++
--- /var/tmp/diff_new_pack.gllhVL/_old  2011-04-21 12:07:16.000000000 +0200
+++ /var/tmp/diff_new_pack.gllhVL/_new  2011-04-21 12:07:16.000000000 +0200
@@ -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 @@
  # 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 @@
 +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
@@ -299,10 +262,10 @@
              self._stateSet(DOM_STATE_HALTED)
              self.domid = None  # Do not push into _stateSet()!
 +
-+             try:
-+                 self.release_running_lock()
-+             except:
-+                 log.exception("Failed to release domain lock.")
++            try:
++                self.release_running_lock()
++            except:
++                log.exception("Failed to release domain lock.")
          finally:
              self.refresh_shutdown_lock.release()
  
@@ -310,74 +273,121 @@
      def has_device(self, dev_class, dev_uuid):
          return (dev_uuid in self.info['%s_refs' % dev_class.lower()])
  
-+     # Return name of host contained in lock file.
-+     def get_lock_host(self, path):
-+         fin = os.popen(xoptions.get_xend_domain_lock_utility() + \
-+                        ' -s ' + path, 'r')
-+         hostname = "unknown"
-+
-+         try:
-+             tokens = fin.readline().split()
-+             for token in tokens:
-+                 item = token.split('=')
-+                 if item[0] == 'host':
-+                     hostname = item[1]
-+             return hostname
-+         finally:
-+             fin.close()
++    # Return name of host contained in lock file.
++    def get_lock_host(self, path):
++        fin = os.popen(xoptions.get_xend_domain_lock_utility() + \
++                       ' -s ' + path, 'r')
++        hostname = "unknown"
++
++        try:
++            tokens = fin.readline().split()
++            for token in tokens:
++                item = token.split('=')
++                if item[0] == 'host':
++                    hostname = item[1]
++            return hostname
++        finally:
++            fin.close()
 +
 +     # Acquire a lock for the domain.  No-op if domain locking is turned off.
-+     def acquire_running_lock(self):
-+         if not xoptions.get_xend_domain_lock():
-+             return
-+
-+         log.debug("Acquiring lock for domain %s" % self.info['name_label'])
-+         path = xoptions.get_xend_domain_lock_path()
-+         path = os.path.join(path, self.get_uuid())
-+
-+         try:
-+             if not os.path.exists(path):
-+                 mkdir.parents(path, stat.S_IRWXU)
-+         except:
-+             log.exception("%s could not be created." % path)
-+             raise XendError("%s could not be created." % path)
-+
-+         status = os.system('%s -l -p %s -n %s -i %s %s' % \
-+                            (xoptions.get_xend_domain_lock_utility(), \
-+                             XendNode.instance().get_name(), \
-+                             self.info['name_label'], \
-+                             self.info['uuid'], \
-+                             path))
-+         if status != 0:
-+             log.debug("Failed to aqcuire lock: status = %d" % status)
-+             raise XendError("The VM is locked and appears to be running on 
host %s." % self.get_lock_host(path))
-+
-+     # Release lock for domain.  No-op if domain locking is turned off.
-+     def release_running_lock(self, name = None):
-+         if not xoptions.get_xend_domain_lock():
-+             return
-+
-+         dom_name = self.info['name_label']
-+         if name:
-+             dom_name = name
-+         log.debug("Releasing lock for domain %s" % dom_name)
-+
-+         path = xoptions.get_xend_domain_lock_path()
-+         path = os.path.join(path, self.get_uuid())
-+         status = os.system('%s -u -p %s -n %s -i %s %s' % \
-+                            (xoptions.get_xend_domain_lock_utility(), \
-+                             XendNode.instance().get_name(), \
-+                             dom_name, \
-+                             self.info['uuid'], \
-+                             path))
-+         if status != 0:
-+             log.exception("Failed to release lock: status = %s" % status)
-+         try:
-+             if len(os.listdir(path)) == 0:
-+                 shutil.rmtree(path)
-+         except:
-+             log.exception("Failed to remove unmanaged directory %s." % path)
++    def acquire_running_lock(self):
++        if not xoptions.get_xend_domain_lock():
++            return
++
++        log.debug("Acquiring lock for domain %s" % self.info['name_label'])
++        path = xoptions.get_xend_domain_lock_path()
++        path = os.path.join(path, self.get_uuid())
++
++        try:
++            if not os.path.exists(path):
++                mkdir.parents(path, stat.S_IRWXU)
++        except:
++            log.exception("%s could not be created." % path)
++            raise XendError("%s could not be created." % path)
++
++        status = os.system('%s -l -p %s -n %s -i %s %s' % \
++                           (xoptions.get_xend_domain_lock_utility(), \
++                            XendNode.instance().get_name(), \
++                            self.info['name_label'], \
++                            self.info['uuid'], \
++                            path))
++        if status != 0:
++            log.debug("Failed to aqcuire lock: status = %d" % status)
++            raise XendError("The VM is locked and appears to be running on 
host %s." % self.get_lock_host(path))
++
++    # Release lock for domain.  No-op if domain locking is turned off.
++    def release_running_lock(self, name = None):
++        if not xoptions.get_xend_domain_lock():
++            return
++
++        dom_name = self.info['name_label']
++        if name:
++            dom_name = name
++        log.debug("Releasing lock for domain %s" % dom_name)
++
++        path = xoptions.get_xend_domain_lock_path()
++        path = os.path.join(path, self.get_uuid())
++        status = os.system('%s -u -p %s -n %s -i %s %s' % \
++                           (xoptions.get_xend_domain_lock_utility(), \
++                            XendNode.instance().get_name(), \
++                            dom_name, \
++                            self.info['uuid'], \
++                            path))
++        if status != 0:
++            log.exception("Failed to release lock: status = %s" % status)
++        try:
++            if len(os.listdir(path)) == 0:
++                shutil.rmtree(path)
++        except:
++            log.exception("Failed to remove unmanaged directory %s." % path)
 +
      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)


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to