[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] Avoid said the /dev/xvd* is already defined after



commit 1dcf1850e45c0069e7a9d6199f883aa9d88114da
Author:     Yi Li <peteryili@xxxxxxxxxxx>
AuthorDate: Wed Mar 19 22:54:16 2014 +0800
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Thu Mar 27 15:03:15 2014 +0000

    Avoid said the /dev/xvd* is already defined after
    
    open a vhd file failed
    
    For example:
    [root@dom0_134_103 ~]# xm block-attach 0
    tap2:tapdisk:vhd:/root/liyi***.vhd /dev/xvdz  w
    Error: ('create', '-avhd:/root/liyi***.vhd') failed (512  )
    Usage: xm block-attach <Domain> <BackDev> <FrontDev> <Mode> [BackDomain]
    Create a new virtual block device.
    
    [root@dom0_134_103 ~]# xm block-attach 0
    tap2:tapdisk:vhd:/root/liyi.vhd /dev/xvdz  w
    Error: The device "/dev/xvdz" is already defined
    Usage: xm block-attach <Domain> <BackDev> <FrontDev> <Mode> [BackDomain]
    
    Create a new virtual block device.
    
    Signed-off-by: Yi Li <peteryili@xxxxxxxxxxx>
    Acked-by: Matt Wilson <msw@xxxxxxxxxx>
---
 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']:
--
generated by git-patchbot for /home/xen/git/xen.git#master

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.