ia64/xen-unstable

changeset 2398:4f6933bb7358

bitkeeper revision 1.1159.1.114 (4136e932LBZ1uaMs2kLCvyBHOfuxTQ)

Trap vifctl errors and warn.
author mjw@wray-m-3.hpl.hp.com
date Thu Sep 02 09:34:42 2004 +0000 (2004-09-02)
parents daf585a98004
children 2f8e399738c1
files tools/python/xen/xend/XendVnet.py
line diff
     1.1 --- a/tools/python/xen/xend/XendVnet.py	Thu Sep 02 09:34:07 2004 +0000
     1.2 +++ b/tools/python/xen/xend/XendVnet.py	Thu Sep 02 09:34:42 2004 +0000
     1.3 @@ -53,8 +53,11 @@ class XendVnetInfo:
     1.4          return vnet_cmd(['vnet.del', self.id])
     1.5  
     1.6      def vifctl(self, op, vif, vmac):
     1.7 -        fn = self.vifctl_ops[op]
     1.8 -        return vnet_cmd([fn, ['vif', vif], ['vmac', vmac]])
     1.9 +        try:
    1.10 +            fn = self.vifctl_ops[op]
    1.11 +            return vnet_cmd([fn, ['vif', vif], ['vmac', vmac]])
    1.12 +        except XendError:
    1.13 +            log.warning("vifctl failed: op=%s vif=%s mac=%s", op, vif, vmac)
    1.14  
    1.15  class XendVnet:
    1.16      """Index of all vnets. Singleton.
    1.17 @@ -72,8 +75,8 @@ class XendVnet:
    1.18              self.vnet[info.id] = info
    1.19              try:
    1.20                  info.configure()
    1.21 -            except:
    1.22 -                log.exception("Error configuring vnet")
    1.23 +            except XendError, ex:
    1.24 +                log.warning("Failed to configure vnet %s: %s", str(info.id), str(ex))
    1.25  
    1.26      def vnet_of_bridge(self, bridge):
    1.27          """Get the vnet for a bridge (if any).