[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] xen: handle TapdiskException when xm block-attach failed
From 7a4b67d235569d81307095ad1366bc03bae5b812 Mon Sep 17 00:00:00 2001
From: Yi Li <peteryili@xxxxxxxxxxx> Date: Thu, 20 Mar 2014 09:15:45 +0800 Subject: [PATCH] xen: handle TapdiskException when xm block-attach failed Maybe we should handle the TapdiskException for the command below 'xm block-attach 0 tap2:tapdisk:vhd:/root/a.vhd /dev/xvdz w' or /dev/xvdz said it is already defined. Signed-off-by: Yi Li <peteryili@xxxxxxxxxxx> --- Âtools/python/xen/xend/XendDomainInfo.py | 4 ++-- Â1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 8d4ff5c..2270ab1 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -65,7 +65,7 @@ from xen.xend.XendConstants import * Âfrom xen.xend.XendAPIConstants import * Âfrom xen.xend.XendCPUPool import XendCPUPool Âfrom xen.xend.server.DevConstants import xenbusState -from xen.xend.server.BlktapController import TapdiskController +from xen.xend.server.BlktapController import TapdiskController, TapdiskException Âfrom xen.xend.XendVMMetrics import XendVMMetrics @@ -861,7 +861,7 @@ class XendDomainInfo:  # blktap1  dev_type = self.getBlockDeviceClass(devid)  self._waitForDevice(dev_type, devid) - except VmError, ex: + except (VmError, TapdiskException), ex:  del self.info['devices'][dev_uuid]  if dev_type == 'pci':  for dev in dev_config_dict['devs']: -- 1.7.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |