[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [XEND] Start cleanly even with bad xml state files
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |