Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-changelog

[Xen-changelog] [xen-3.0.5-testing] [XEND] Start cleanly even with bad x

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.0.5-testing] [XEND] Start cleanly even with bad xml state files
From: "Xen patchbot-3.0.5-testing" <patchbot-3.0.5-testing@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 28 Apr 2007 10:50:43 -0700
Delivery-date: Sat, 28 Apr 2007 11:52:43 -0700
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 Tom Wilkie <tom.wilkie@xxxxxxxxx>
# Date 1177667051 -3600
# Node ID 80c458bb1b6d0eaa1456514fe134b14271fb4e16
# Parent  c8e01cc58cb16c48ba7465f4d3dfa8a211af081d
[XEND] Start cleanly even with bad xml state files

signed-off-by: Tom Wilkie <tom.wilkie@xxxxxxxxx>
---
 tools/python/xen/xend/XendNode.py |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff -r c8e01cc58cb1 -r 80c458bb1b6d tools/python/xen/xend/XendNode.py
--- a/tools/python/xen/xend/XendNode.py Fri Apr 27 10:24:09 2007 +0100
+++ b/tools/python/xen/xend/XendNode.py Fri Apr 27 10:44:11 2007 +0100
@@ -141,7 +141,10 @@ class XendNode:
         saved_networks = self.state_store.load_state('network')
         if saved_networks:
             for net_uuid, network in saved_networks.items():
-                XendNetwork.recreate(network, net_uuid)
+                try:
+                    XendNetwork.recreate(network, net_uuid)
+                except CreateUnspecifiedAttributeError:
+                    log.warn("Error recreating network %s", net_uuid)
                 
         # Next discover any existing bridges and check
         # they are not already configured
@@ -161,8 +164,11 @@ class XendNode:
         saved_pifs = self.state_store.load_state('pif')
         if saved_pifs:
             for pif_uuid, pif in saved_pifs.items():
-                XendPIF.recreate(pif, pif_uuid)
- 
+                try:
+                    XendPIF.recreate(pif, pif_uuid)
+                except CreateUnspecifiedAttributeError:
+                    log.warn("Error recreating PIF %s", pif_uuid)
+        
         # Next discover any existing PIFs and check
         # they are not already configured
         configured_pifs = [XendAPIStore.get(
@@ -217,7 +223,10 @@ class XendNode:
         saved_pbds = self.state_store.load_state('pbd')
         if saved_pbds:
             for pbd_uuid, pbd_cfg in saved_pbds.items():
-                XendPBD.recreate(pbd_uuid, pbd_cfg)
+                try:
+                    XendPBD.recreate(pbd_uuid, pbd_cfg)
+                except CreateUnspecifiedAttributeError:
+                    log.warn("Error recreating PBD %s", pbd_uuid) 
 
 ##    def network_destroy(self, net_uuid):
  ##       del self.networks[net_uuid]

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.0.5-testing] [XEND] Start cleanly even with bad xml state files, Xen patchbot-3.0.5-testing <=