All of lore.kernel.org
 help / color / mirror / Atom feed
* Avoid said the /dev/xvd* is already defined after open a vhd file failed
@ 2014-03-19 15:12 李义
  2014-03-19 15:22 ` Fwd: " 李义
  2014-03-24 11:52 ` George Dunlap
  0 siblings, 2 replies; 7+ messages in thread
From: 李义 @ 2014-03-19 15:12 UTC (permalink / raw)
  To: jbeulich, ian.jackson, ian.campbell; +Cc: xen-devel

Hi Guys,

can you do me a favor to check it. Thanks.

>From 9f45c734af00a1af71f7cd69f0473474bcd739da Mon Sep 17 00:00:00 2001
From: Yi Li <peteryili@tencent.com>
Date: Wed, 19 Mar 2014 22:54:16 +0800
Subject: [PATCH] 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@tencent.com>
---
 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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Fwd: Avoid said the /dev/xvd* is already defined after open a vhd file failed
  2014-03-19 15:12 Avoid said the /dev/xvd* is already defined after open a vhd file failed 李义
@ 2014-03-19 15:22 ` 李义
  2014-03-24 11:52 ` George Dunlap
  1 sibling, 0 replies; 7+ messages in thread
From: 李义 @ 2014-03-19 15:22 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 2005 bytes --]

Hi Guys,

can you do me a favor to check it. Thanks.

>From 9f45c734af00a1af71f7cd69f0473474bcd739da Mon Sep 17 00:00:00 2001
From: Yi Li <peteryili@tencent.com>
Date: Wed, 19 Mar 2014 22:54:16 +0800
Subject: [PATCH] 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@tencent.com>
---
 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

[-- Attachment #1.2: Type: text/html, Size: 2715 bytes --]

[-- Attachment #2: 0001-Avoid-said-the-dev-xvd-is-already-defined-after-open.patch --]
[-- Type: application/octet-stream, Size: 1954 bytes --]

From 9f45c734af00a1af71f7cd69f0473474bcd739da Mon Sep 17 00:00:00 2001
From: Yi Li <peteryili@tencent.com>
Date: Wed, 19 Mar 2014 22:54:16 +0800
Subject: [PATCH] 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@tencent.com>
---
 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


[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: Avoid said the /dev/xvd* is already defined after open a vhd file failed
  2014-03-19 15:12 Avoid said the /dev/xvd* is already defined after open a vhd file failed 李义
  2014-03-19 15:22 ` Fwd: " 李义
@ 2014-03-24 11:52 ` George Dunlap
  2014-03-25  8:05   ` Matt Wilson
  1 sibling, 1 reply; 7+ messages in thread
From: George Dunlap @ 2014-03-24 11:52 UTC (permalink / raw)
  To: 李义
  Cc: Matt Wilson, Ian Jackson, Ian Campbell, Jan Beulich, xen-devel

On Wed, Mar 19, 2014 at 3:12 PM, 李义 <yilikernel@gmail.com> wrote:
> Hi Guys,
>
> can you do me a favor to check it. Thanks.

CC'ing the xend maintainer...

 -George

>
> From 9f45c734af00a1af71f7cd69f0473474bcd739da Mon Sep 17 00:00:00 2001
> From: Yi Li <peteryili@tencent.com>
> Date: Wed, 19 Mar 2014 22:54:16 +0800
> Subject: [PATCH] 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@tencent.com>
> ---
>  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@lists.xen.org
> http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Avoid said the /dev/xvd* is already defined after open a vhd file failed
  2014-03-24 11:52 ` George Dunlap
@ 2014-03-25  8:05   ` Matt Wilson
  2014-03-27 16:46     ` Ian Campbell
  0 siblings, 1 reply; 7+ messages in thread
From: Matt Wilson @ 2014-03-25  8:05 UTC (permalink / raw)
  To: George Dunlap
  Cc: 李义,
	Ian Campbell, Ian Jackson, xen-devel, Jan Beulich, Matt Wilson

On Mon, Mar 24, 2014 at 11:52:56AM +0000, George Dunlap wrote:
> On Wed, Mar 19, 2014 at 3:12 PM, 李义 <yilikernel@gmail.com> wrote:
> > Hi Guys,
> >
> > can you do me a favor to check it. Thanks.
> 
> CC'ing the xend maintainer...

Thanks, George.

>  -George
> 
> >
> > From 9f45c734af00a1af71f7cd69f0473474bcd739da Mon Sep 17 00:00:00 2001
> > From: Yi Li <peteryili@tencent.com>
> > Date: Wed, 19 Mar 2014 22:54:16 +0800
> > Subject: [PATCH] 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@tencent.com>

Acked-by: Matt Wilson <msw@amazon.com>

> > ---
> >  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']:

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Avoid said the /dev/xvd* is already defined after open a vhd file failed
  2014-03-25  8:05   ` Matt Wilson
@ 2014-03-27 16:46     ` Ian Campbell
  2014-03-28  6:02       ` 李义
  0 siblings, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2014-03-27 16:46 UTC (permalink / raw)
  To: Matt Wilson
  Cc: 李义,
	Matt Wilson, George Dunlap, Ian Jackson, xen-devel, Jan Beulich

On Tue, 2014-03-25 at 10:05 +0200, Matt Wilson wrote:
> > > From 9f45c734af00a1af71f7cd69f0473474bcd739da Mon Sep 17 00:00:00 2001
> > > From: Yi Li <peteryili@tencent.com>
> > > Date: Wed, 19 Mar 2014 22:54:16 +0800
> > > Subject: [PATCH] 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@tencent.com>
> 
> Acked-by: Matt Wilson <msw@amazon.com>

The patch was whitespace damanged, I think I've applied the correct
thing. Please check.

Ian.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Avoid said the /dev/xvd* is already defined after open a vhd file failed
  2014-03-27 16:46     ` Ian Campbell
@ 2014-03-28  6:02       ` 李义
  2014-03-28  9:52         ` Ian Campbell
  0 siblings, 1 reply; 7+ messages in thread
From: 李义 @ 2014-03-28  6:02 UTC (permalink / raw)
  To: Ian Campbell
  Cc: George Dunlap, Matt Wilson, Ian Jackson, Matt Wilson, xen-devel

On Fri, Mar 28, 2014 at 12:46 AM, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Tue, 2014-03-25 at 10:05 +0200, Matt Wilson wrote:
>> > > From 9f45c734af00a1af71f7cd69f0473474bcd739da Mon Sep 17 00:00:00 2001
>> > > From: Yi Li <peteryili@tencent.com>
>> > > Date: Wed, 19 Mar 2014 22:54:16 +0800
>> > > Subject: [PATCH] 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@tencent.com>
>>
>> Acked-by: Matt Wilson <msw@amazon.com>
>
> The patch was whitespace damanged, I think I've applied the correct
> thing. Please check.
i have check it, and using  the subject:
 [PATCH v2] Xend: handle TapdiskException when creat device

>
> Ian.
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Avoid said the /dev/xvd* is already defined after open a vhd file failed
  2014-03-28  6:02       ` 李义
@ 2014-03-28  9:52         ` Ian Campbell
  0 siblings, 0 replies; 7+ messages in thread
From: Ian Campbell @ 2014-03-28  9:52 UTC (permalink / raw)
  To: 李义
  Cc: George Dunlap, Matt Wilson, Ian Jackson, Matt Wilson, xen-devel

On Fri, 2014-03-28 at 14:02 +0800, 李义 wrote:
> On Fri, Mar 28, 2014 at 12:46 AM, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> > On Tue, 2014-03-25 at 10:05 +0200, Matt Wilson wrote:
> >> > > From 9f45c734af00a1af71f7cd69f0473474bcd739da Mon Sep 17 00:00:00 2001
> >> > > From: Yi Li <peteryili@tencent.com>
> >> > > Date: Wed, 19 Mar 2014 22:54:16 +0800
> >> > > Subject: [PATCH] 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@tencent.com>
> >>
> >> Acked-by: Matt Wilson <msw@amazon.com>
> >
> > The patch was whitespace damanged, I think I've applied the correct
> > thing. Please check.
> i have check it, and using  the subject:
>  [PATCH v2] Xend: handle TapdiskException when creat device

Sorry, but I had no way to know that that was a follow up to this one,
and neither did Matt I suppose.

Anyway, I've applied this one, if the contents is wrong please let us
know by sending a follow up patch or by requesting a revert and pointing
to the correct patch.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-03-28  9:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-19 15:12 Avoid said the /dev/xvd* is already defined after open a vhd file failed 李义
2014-03-19 15:22 ` Fwd: " 李义
2014-03-24 11:52 ` George Dunlap
2014-03-25  8:05   ` Matt Wilson
2014-03-27 16:46     ` Ian Campbell
2014-03-28  6:02       ` 李义
2014-03-28  9:52         ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.