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/
Home Products Support Community News


[Xen-changelog] [xen-unstable] Don't send the old state string for halte

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Don't send the old state string for halted domains -- it doesn't make any
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 28 Nov 2006 13:40:26 +0000
Delivery-date: Tue, 28 Nov 2006 05:41:35 -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 Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID 1c09d1d195e7f7249a622c4fd77fe58c524d8db9
# Parent  ca01484e4e8c921f7016d9ffbf3ea39156759f20
Don't send the old state string for halted domains -- it doesn't make any
sense, and we don't want to see state flags linger.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
 tools/python/xen/xend/XendConfig.py |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff -r ca01484e4e8c -r 1c09d1d195e7 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Mon Nov 27 14:47:23 2006 +0000
+++ b/tools/python/xen/xend/XendConfig.py       Mon Nov 27 14:48:38 2006 +0000
@@ -685,15 +685,15 @@ class XendConfig(dict):
         # TODO: domid/dom is the same thing but called differently
         #       depending if it is from xenstore or sxpr.
-        if domain.getDomid() != None:
+        if domain.getDomid() is not None:
             sxpr.append(['domid', domain.getDomid()])
         for cfg, typefunc in ROUNDTRIPPING_CONFIG_ENTRIES:
             if cfg in self:
-                if self[cfg] != None:
+                if self[cfg] is not None:
                     sxpr.append([cfg, self[cfg]])
-        if 'image' in self and self['image'] != None:
+        if 'image' in self and self['image'] is not None:
             sxpr.append(['image', self['image']])
         if 'security' in self and self['security']:
             sxpr.append(['security', self['security']])
@@ -714,7 +714,9 @@ class XendConfig(dict):
             sxpr.append(['status', str(DOM_STATE_HALTED)])
-        sxpr.append(['state', self._get_old_state_string()])
+        if domain.getDomid() is not None:
+            sxpr.append(['state', self._get_old_state_string()])
         sxpr.append(['memory_dynamic_max', self.get('memory_dynamic_max',

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Don't send the old state string for halted domains -- it doesn't make any, Xen patchbot-unstable <=