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] Protect self.domid from being empty

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Protect self.domid from being empty
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Feb 2007 12:15:09 -0800
Delivery-date: Fri, 16 Feb 2007 12:15:05 -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 Wim Colgate <wim@xxxxxxxxxxxxx>
# Date 1171484312 28800
# Node ID 82f66bc01da2cb14062c0651a63dbf7286cfd1e7
# Parent  f8030a56981185361c523c8261b639a711ee064b
    Protect self.domid from being empty
---
 tools/python/xen/xend/XendDomainInfo.py |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff -r f8030a569811 -r 82f66bc01da2 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Wed Feb 14 19:17:41 2007 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Wed Feb 14 12:18:32 2007 -0800
@@ -1569,16 +1569,17 @@ class XendDomainInfo:
         # get associated devices to destroy
         # build list of phantom devices to be removed after normal devices
         plist = []
-        from xen.xend.xenstore.xstransact import xstransact
-        t = xstransact("%s/device/vbd" % GetDomainPath(self.domid))
-        for dev in t.list():
-            backend_phantom_vbd = 
xstransact.Read("%s/device/vbd/%s/phantom_vbd" \
-                                  % (self.dompath, dev))
-            if backend_phantom_vbd is not None:
-                frontend_phantom_vbd =  xstransact.Read("%s/frontend" \
-                                  % backend_phantom_vbd)
-                plist.append(backend_phantom_vbd)
-                plist.append(frontend_phantom_vbd)
+        if self.domid is not None:
+            from xen.xend.xenstore.xstransact import xstransact
+            t = xstransact("%s/device/vbd" % GetDomainPath(self.domid))
+            for dev in t.list():
+                backend_phantom_vbd = 
xstransact.Read("%s/device/vbd/%s/phantom_vbd" \
+                                      % (self.dompath, dev))
+                if backend_phantom_vbd is not None:
+                    frontend_phantom_vbd =  xstransact.Read("%s/frontend" \
+                                      % backend_phantom_vbd)
+                    plist.append(backend_phantom_vbd)
+                    plist.append(frontend_phantom_vbd)
         return plist
 
     def _cleanup_phantom_devs(self, plist):

_______________________________________________
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] Protect self.domid from being empty, Xen patchbot-unstable <=