WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XEND] Fix paused state being overriden b

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEND] Fix paused state being overriden by refreshShutdown
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 02 Nov 2006 22:10:26 +0000
Delivery-date: Thu, 02 Nov 2006 21:45:21 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Alastair Tse <atse@xxxxxxxxxxxxx>
# Node ID 96ad1d72fccfae6795f1548b02626ba6e5cf5c82
# Parent  722cc2390021eadb162a3ffaf7f537125ee89618
[XEND] Fix paused state being overriden by refreshShutdown

Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py     |    9 ++-------
 tools/python/xen/xend/XendDomainInfo.py |    9 +++++++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diff -r 722cc2390021 -r 96ad1d72fccf tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Thu Nov 02 14:27:16 2006 +0000
+++ b/tools/python/xen/xend/XendConfig.py       Thu Nov 02 15:48:32 2006 +0000
@@ -608,8 +608,6 @@ class XendConfig(dict):
     def get_sxp(self, domain = None, ignore_devices = False, ignore = []):
         """ Get SXP representation of this config object.
 
-        Incompat: removed store_mfn, console_mfn
-
         @keyword domain: (optional) XendDomainInfo to get extra information
                          from such as domid and running devices.
         @type    domain: XendDomainInfo
@@ -647,13 +645,10 @@ class XendConfig(dict):
             sxpr.append(['up_time', str(uptime)])
             sxpr.append(['start_time', str(self['start_time'])])
 
-        sxpr.append(['on_xend_start', self.get('on_xend_start', 'ignore')])
-        sxpr.append(['on_xend_stop', self.get('on_xend_stop', 'ignore')])
-
         if domain:
-            sxpr.append(['status', domain.state])
+            sxpr.append(['status', str(domain.state)])
         else:
-            sxpr.append(['status', DOM_STATE_HALTED])
+            sxpr.append(['status', str(DOM_STATE_HALTED)])
 
         # For save/restore migration
         if domain:
diff -r 722cc2390021 -r 96ad1d72fccf tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Thu Nov 02 14:27:16 2006 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Thu Nov 02 15:48:32 2006 +0000
@@ -843,6 +843,8 @@ class XendDomainInfo:
         return self._readVm('xend/restart_count')
 
     def _refreshShutdown(self, xeninfo = None):
+        """ Checks the domain for whether a shutdown is required. """
+        
         # If set at the end of this method, a restart is required, with the
         # given reason.  This restart has to be done out of the scope of
         # refresh_shutdown_lock.
@@ -926,8 +928,11 @@ class XendDomainInfo:
             else:
                 # Domain is alive.  If we are shutting it down, then check
                 # the timeout on that, and destroy it if necessary.
-                self._stateSet(DOM_STATE_RUNNING)
-                
+                if xeninfo['paused']:
+                    self._stateSet(DOM_STATE_PAUSED)
+                else:
+                    self._stateSet(DOM_STATE_RUNNING)
+                    
                 if self.shutdownStartTime:
                     timeout = (SHUTDOWN_TIMEOUT - time.time() +
                                self.shutdownStartTime)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEND] Fix paused state being overriden by refreshShutdown, Xen patchbot-unstable <=