* [PATCH]: blktap2 : control function
@ 2010-05-21 16:51 eXeC001er
2010-05-21 17:38 ` Łukasz Oleś
2010-05-21 20:27 ` Pasi Kärkkäinen
0 siblings, 2 replies; 7+ messages in thread
From: eXeC001er @ 2010-05-21 16:51 UTC (permalink / raw)
To: Xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 1471 bytes --]
Hi.
I tried to create small patch for blktap2 : control function:
diff -r 840f269d95fb tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Wed May 19 22:59:52 2010 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py Fri May 21 20:17:15 2010 +0400
@@ -3292,6 +3292,7 @@
fn = BOOTLOADER_LOOPBACK_DEVICE
try:
+ time.sleep(5)
blcfg = bootloader(blexec, fn, self, False,
bootloader_args, kernel, ramdisk, args)
finally:
@@ -3299,7 +3300,7 @@
log.info("Unmounting %s from %s." %
(fn, BOOTLOADER_LOOPBACK_DEVICE))
- dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE)
+ dom0.destroyDevice(devtype, BOOTLOADER_LOOPBACK_DEVICE)
if blcfg is None:
msg = "Had a bootloader specified, but can't find disk"
With this patch DomU boot from VHD disk without error.
But i can not fix other bug:
if after DomU (boot disk is blktap2-type) stopped i can not start it again,
because i get error "raise VmError("Device %s is already connected." %
dev_str)" in "DevController.py".
but i found workaround:
stop blktap2_mount: echo 1 > /sys/class/blktap2/blktapX/remove
remove records from xenstore:
xenstore-rm /vm/00000000-0000-0000-0000-000000000000
xenstore-write /local/domain/0/vm ""
Now i can run my DomU again.
[-- Attachment #1.2: Type: text/html, Size: 2283 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH]: blktap2 : control function 2010-05-21 16:51 [PATCH]: blktap2 : control function eXeC001er @ 2010-05-21 17:38 ` Łukasz Oleś 2010-05-21 20:27 ` Pasi Kärkkäinen 1 sibling, 0 replies; 7+ messages in thread From: Łukasz Oleś @ 2010-05-21 17:38 UTC (permalink / raw) To: xen-devel On Friday 21 May 2010 18:51:12 eXeC001er wrote: > Hi. > > I tried to create small patch for blktap2 : control function: > > diff -r 840f269d95fb tools/python/xen/xend/XendDomainInfo.py > --- a/tools/python/xen/xend/XendDomainInfo.py Wed May 19 22:59:52 2010 > +0100 +++ b/tools/python/xen/xend/XendDomainInfo.py Fri May 21 20:17:15 > 2010 +0400 @@ -3292,6 +3292,7 @@ > fn = BOOTLOADER_LOOPBACK_DEVICE > > try: > + time.sleep(5) > blcfg = bootloader(blexec, fn, self, False, > bootloader_args, kernel, ramdisk, args) > finally: > @@ -3299,7 +3300,7 @@ > log.info("Unmounting %s from %s." % > (fn, BOOTLOADER_LOOPBACK_DEVICE)) > > - dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE) > + dom0.destroyDevice(devtype, > BOOTLOADER_LOOPBACK_DEVICE) > > if blcfg is None: > msg = "Had a bootloader specified, but can't find disk" > I have same error and I resolved it in similar way. It only happens when I'm using pygrub. > With this patch DomU boot from VHD disk without error. > > But i can not fix other bug: > > if after DomU (boot disk is blktap2-type) stopped i can not start it again, > because i get error "raise VmError("Device %s is already connected." % > dev_str)" in "DevController.py". > > but i found workaround: > > stop blktap2_mount: echo 1 > /sys/class/blktap2/blktapX/remove > remove records from xenstore: > xenstore-rm /vm/00000000-0000-0000-0000-000000000000 > xenstore-write /local/domain/0/vm "" > > Now i can run my DomU again. > I found it too, it's bug in script xen-hotplug-cleanup but I also doesn't know right way to solve it. regards, Łukasz Oleś ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH]: blktap2 : control function 2010-05-21 16:51 [PATCH]: blktap2 : control function eXeC001er 2010-05-21 17:38 ` Łukasz Oleś @ 2010-05-21 20:27 ` Pasi Kärkkäinen 2010-05-21 21:23 ` eXeC001er 1 sibling, 1 reply; 7+ messages in thread From: Pasi Kärkkäinen @ 2010-05-21 20:27 UTC (permalink / raw) To: eXeC001er; +Cc: Xen-devel On Fri, May 21, 2010 at 08:51:12PM +0400, eXeC001er wrote: > Hi. > I tried to create small patch for blktap2 : control function: > This patch is horribly broken at least for me.. It looks really weird. You might want to re-send it in a proper format.. .. Or if it works for others just forget about this rant:) -- Pasi > diff -r 840f269d95fb tools/python/xen/xend/XendDomainInfo.py > --- a/tools/python/xen/xend/XendDomainInfo.py Wed May 19 22:59:52 2010 > +0100 > +++ b/tools/python/xen/xend/XendDomainInfo.py Fri May 21 20:17:15 2010 > +0400 > @@ -3292,6 +3292,7 @@ >          fn = BOOTLOADER_LOOPBACK_DEVICE >  >        try: > +         time.sleep(5) >          blcfg = bootloader(blexec, fn, self, False, >                    bootloader_args, > kernel, ramdisk, args) >        finally: > @@ -3299,7 +3300,7 @@ >            [1]log.info("Unmounting %s from %s." % >                 (fn, > BOOTLOADER_LOOPBACK_DEVICE)) >  > -           dom0.destroyDevice('tap', > BOOTLOADER_LOOPBACK_DEVICE) > +           dom0.destroyDevice(devtype, > BOOTLOADER_LOOPBACK_DEVICE) >  >        if blcfg is None: >          msg = "Had a bootloader specified, but can't > find disk" > With this patch DomU boot from VHD disk without error. > But i can not fix other bug: > if after DomU (boot disk is blktap2-type) stopped i can not start it > again, because i get error "raise VmError("Device %s is already > connected." % dev_str)" in "DevController.py". > but i found workaround: > stop blktap2_mount: echo 1 > /sys/class/blktap2/blktapX/remove > remove records from xenstore: > xenstore-rm /vm/00000000-0000-0000-0000-000000000000 > xenstore-write /local/domain/0/vm "" > Now i can run my DomU again. > > References > > Visible links > 1. http://log.info/ > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH]: blktap2 : control function 2010-05-21 20:27 ` Pasi Kärkkäinen @ 2010-05-21 21:23 ` eXeC001er 2010-05-21 21:28 ` Pasi Kärkkäinen 0 siblings, 1 reply; 7+ messages in thread From: eXeC001er @ 2010-05-21 21:23 UTC (permalink / raw) To: Pasi Kärkkäinen; +Cc: Xen-devel [-- Attachment #1.1: Type: text/plain, Size: 2657 bytes --] resend. with additional 2010/5/22 Pasi Kärkkäinen <pasik@iki.fi> > On Fri, May 21, 2010 at 08:51:12PM +0400, eXeC001er wrote: > > Hi. > > I tried to create small patch for blktap2 : control function: > > > > This patch is horribly broken at least for me.. It looks really weird. > You might want to re-send it in a proper format.. > > .. Or if it works for others just forget about this rant:) > > -- Pasi > > > diff -r 840f269d95fb tools/python/xen/xend/XendDomainInfo.py > > --- a/tools/python/xen/xend/XendDomainInfo.py Wed May 19 22:59:52 > 2010 > > +0100 > > +++ b/tools/python/xen/xend/XendDomainInfo.py Fri May 21 20:17:15 > 2010 > > +0400 > > @@ -3292,6 +3292,7 @@ > >          fn = BOOTLOADER_LOOPBACK_DEVICE > >  > >        try: > > +         time.sleep(5) > >          blcfg = bootloader(blexec, fn, self, False, > >                    > bootloader_args, > > kernel, ramdisk, args) > >        finally: > > @@ -3299,7 +3300,7 @@ > >            [1]log.info("Unmounting %s from %s." > % > >                 (fn, > > BOOTLOADER_LOOPBACK_DEVICE)) > >  > > -           dom0.destroyDevice('tap', > > BOOTLOADER_LOOPBACK_DEVICE) > > +           dom0.destroyDevice(devtype, > > BOOTLOADER_LOOPBACK_DEVICE) > >  > >        if blcfg is None: > >          msg = "Had a bootloader specified, but can't > > find disk" > > With this patch DomU boot from VHD disk without error. > > But i can not fix other bug: > > if after DomU (boot disk is blktap2-type) stopped i can not start it > > again, because i get error "raise VmError("Device %s is already > > connected." % dev_str)" in "DevController.py". > > but i found workaround: > > stop blktap2_mount: echo 1 > /sys/class/blktap2/blktapX/remove > > remove records from xenstore: > > xenstore-rm /vm/00000000-0000-0000-0000-000000000000 > > xenstore-write /local/domain/0/vm "" > > Now i can run my DomU again. > > > > References > > > > Visible links > > 1. http://log.info/ > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > [-- Attachment #1.2: Type: text/html, Size: 3732 bytes --] [-- Attachment #2: blktap2_control_func.patch --] [-- Type: text/x-patch, Size: 1355 bytes --] diff -r d0420ab97345 tools/python/xen/util/blkif.py --- a/tools/python/xen/util/blkif.py Fri May 21 16:21:39 2010 +0100 +++ b/tools/python/xen/util/blkif.py Sat May 22 01:21:15 2010 +0400 @@ -87,7 +87,7 @@ fn = "/dev/%s" %(fn,) if typ in ("tap", "tap2"): - (taptype, fn) = fn.split(":", 1) + (taptype, fn) = fn.split(":", 2)[1:] return (fn, taptype) def blkdev_uname_to_file(uname): diff -r d0420ab97345 tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Fri May 21 16:21:39 2010 +0100 +++ b/tools/python/xen/xend/XendDomainInfo.py Sat May 22 01:21:15 2010 +0400 @@ -3292,6 +3292,7 @@ fn = BOOTLOADER_LOOPBACK_DEVICE try: + time.sleep(5) blcfg = bootloader(blexec, fn, self, False, bootloader_args, kernel, ramdisk, args) finally: @@ -3299,7 +3300,7 @@ log.info("Unmounting %s from %s." % (fn, BOOTLOADER_LOOPBACK_DEVICE)) - dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE) + dom0.destroyDevice(devtype, BOOTLOADER_LOOPBACK_DEVICE) if blcfg is None: msg = "Had a bootloader specified, but can't find disk" [-- Attachment #3: Type: text/plain, Size: 138 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH]: blktap2 : control function 2010-05-21 21:23 ` eXeC001er @ 2010-05-21 21:28 ` Pasi Kärkkäinen 2010-05-22 1:01 ` Jeremy Fitzhardinge 0 siblings, 1 reply; 7+ messages in thread From: Pasi Kärkkäinen @ 2010-05-21 21:28 UTC (permalink / raw) To: eXeC001er; +Cc: Xen-devel On Sat, May 22, 2010 at 01:23:46AM +0400, eXeC001er wrote: > resend. > with additional > Now it's OK. Hopefully someone familiar with the code can review it.. -- Pasi > 2010/5/22 Pasi KÀrkkÀinen <[1]pasik@iki.fi> > > On Fri, May 21, 2010 at 08:51:12PM +0400, eXeC001er wrote: > >   Hi. > >   I tried to create small patch forÃ* blktap2 : control function: > > > > This patch is horribly broken at least for me.. It looks really weird. > You might want to re-send it in a proper format.. > > .. Or if it works for others just forget about this rant:) > > -- Pasi > >   diff -r 840f269d95fb tools/python/xen/xend/XendDomainInfo.py > >   --- a/tools/python/xen/xend/XendDomainInfo.py  Wed May 19 > 22:59:52 2010 > >   +0100 > >   +++ b/tools/python/xen/xend/XendDomainInfo.py  Fri May 21 > 20:17:15 2010 > >   +0400 > >   @@ -3292,6 +3292,7 @@ > >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  fn = > BOOTLOADER_LOOPBACK_DEVICE > >   Ã* > >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  try: > >   + Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã* time.sleep(5) > >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  blcfg = > bootloader(blexec, fn, self, False, > >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã* >  Ã*  Ã*  Ã*  Ã*  Ã* bootloader_args, > >   kernel, ramdisk, args) > >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  finally: > >   @@ -3299,7 +3300,7 @@ > >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã* >  [1][2]log.info("Unmounting %s from %s." % > >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã* >  Ã*  Ã* (fn, > >   BOOTLOADER_LOOPBACK_DEVICE)) > >   Ã* > >   - Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã* > dom0.destroyDevice('tap', > >   BOOTLOADER_LOOPBACK_DEVICE) > >   + Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã* > dom0.destroyDevice(devtype, > >   BOOTLOADER_LOOPBACK_DEVICE) > >   Ã* > >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  if blcfg is None: > >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  msg = "Had a > bootloader specified, but can't > >   find disk" > >   With this patch DomU boot from VHD disk without error. > >   But i can not fix other bug: > >   if after DomU (boot disk is blktap2-type) stopped i can not > startÃ* it > >   again, because i get error "raise VmError("Device %s is already > >   connected." % dev_str)" in "DevController.py". > >   but i found workaround: > >   stop blktap2_mount: echo 1 >Ã* /sys/class/blktap2/blktapX/remove > >   remove records from xenstore:Ã* > >   xenstore-rm /vm/00000000-0000-0000-0000-000000000000 > >   xenstore-write /local/domain/0/vm "" > >   Now i can run my DomU again. > > > > References > > > >   Visible links > >   1. [3]http://log.info/ > > > _______________________________________________ > > Xen-devel mailing list > > [4]Xen-devel@lists.xensource.com > > [5]http://lists.xensource.com/xen-devel > > References > > Visible links > 1. mailto:pasik@iki.fi > 2. http://log.info/ > 3. http://log.info/ > 4. mailto:Xen-devel@lists.xensource.com > 5. http://lists.xensource.com/xen-devel > diff -r d0420ab97345 tools/python/xen/util/blkif.py > --- a/tools/python/xen/util/blkif.py Fri May 21 16:21:39 2010 +0100 > +++ b/tools/python/xen/util/blkif.py Sat May 22 01:21:15 2010 +0400 > @@ -87,7 +87,7 @@ > fn = "/dev/%s" %(fn,) > > if typ in ("tap", "tap2"): > - (taptype, fn) = fn.split(":", 1) > + (taptype, fn) = fn.split(":", 2)[1:] > return (fn, taptype) > > def blkdev_uname_to_file(uname): > diff -r d0420ab97345 tools/python/xen/xend/XendDomainInfo.py > --- a/tools/python/xen/xend/XendDomainInfo.py Fri May 21 16:21:39 2010 +0100 > +++ b/tools/python/xen/xend/XendDomainInfo.py Sat May 22 01:21:15 2010 +0400 > @@ -3292,6 +3292,7 @@ > fn = BOOTLOADER_LOOPBACK_DEVICE > > try: > + time.sleep(5) > blcfg = bootloader(blexec, fn, self, False, > bootloader_args, kernel, ramdisk, args) > finally: > @@ -3299,7 +3300,7 @@ > log.info("Unmounting %s from %s." % > (fn, BOOTLOADER_LOOPBACK_DEVICE)) > > - dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE) > + dom0.destroyDevice(devtype, BOOTLOADER_LOOPBACK_DEVICE) > > if blcfg is None: > msg = "Had a bootloader specified, but can't find disk" ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH]: blktap2 : control function 2010-05-21 21:28 ` Pasi Kärkkäinen @ 2010-05-22 1:01 ` Jeremy Fitzhardinge 2010-05-22 8:05 ` eXeC001er 0 siblings, 1 reply; 7+ messages in thread From: Jeremy Fitzhardinge @ 2010-05-22 1:01 UTC (permalink / raw) To: Pasi Kärkkäinen; +Cc: Xen-devel, eXeC001er On 05/21/2010 02:28 PM, Pasi Kärkkäinen wrote: > On Sat, May 22, 2010 at 01:23:46AM +0400, eXeC001er wrote: > >> resend. >> with additional >> >> > Now it's OK. > Hopefully someone familiar with the code can review it.. > The sleep(5) is almost certainly not the correct fix. J > -- Pasi > > >> 2010/5/22 Pasi KÀrkkÀinen <[1]pasik@iki.fi> >> >> On Fri, May 21, 2010 at 08:51:12PM +0400, eXeC001er wrote: >> >   Hi. >> >   I tried to create small patch forÃ* blktap2 : control function: >> > >> >> This patch is horribly broken at least for me.. It looks really weird. >> You might want to re-send it in a proper format.. >> >> .. Or if it works for others just forget about this rant:) >> >> -- Pasi >> >   diff -r 840f269d95fb tools/python/xen/xend/XendDomainInfo.py >> >   --- a/tools/python/xen/xend/XendDomainInfo.py  Wed May 19 >> 22:59:52 2010 >> >   +0100 >> >   +++ b/tools/python/xen/xend/XendDomainInfo.py  Fri May 21 >> 20:17:15 2010 >> >   +0400 >> >   @@ -3292,6 +3292,7 @@ >> >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  fn = >> BOOTLOADER_LOOPBACK_DEVICE >> >   Ã* >> >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  try: >> >   + Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã* time.sleep(5) >> >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  blcfg = >> bootloader(blexec, fn, self, False, >> >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã* >>  Ã*  Ã*  Ã*  Ã*  Ã* bootloader_args, >> >   kernel, ramdisk, args) >> >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  finally: >> >   @@ -3299,7 +3300,7 @@ >> >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã* >>  [1][2]log.info("Unmounting %s from %s." % >> >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã* >>  Ã*  Ã* (fn, >> >   BOOTLOADER_LOOPBACK_DEVICE)) >> >   Ã* >> >   - Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã* >> dom0.destroyDevice('tap', >> >   BOOTLOADER_LOOPBACK_DEVICE) >> >   + Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã* >> dom0.destroyDevice(devtype, >> >   BOOTLOADER_LOOPBACK_DEVICE) >> >   Ã* >> >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  if blcfg is None: >> >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  msg = "Had a >> bootloader specified, but can't >> >   find disk" >> >   With this patch DomU boot from VHD disk without error. >> >   But i can not fix other bug: >> >   if after DomU (boot disk is blktap2-type) stopped i can not >> startÃ* it >> >   again, because i get error "raise VmError("Device %s is already >> >   connected." % dev_str)" in "DevController.py". >> >   but i found workaround: >> >   stop blktap2_mount: echo 1 >Ã* /sys/class/blktap2/blktapX/remove >> >   remove records from xenstore:Ã* >> >   xenstore-rm /vm/00000000-0000-0000-0000-000000000000 >> >   xenstore-write /local/domain/0/vm "" >> >   Now i can run my DomU again. >> > >> > References >> > >> >   Visible links >> >   1. [3]http://log.info/ >> >> > _______________________________________________ >> > Xen-devel mailing list >> > [4]Xen-devel@lists.xensource.com >> > [5]http://lists.xensource.com/xen-devel >> >> References >> >> Visible links >> 1. mailto:pasik@iki.fi >> 2. http://log.info/ >> 3. http://log.info/ >> 4. mailto:Xen-devel@lists.xensource.com >> 5. http://lists.xensource.com/xen-devel >> > >> diff -r d0420ab97345 tools/python/xen/util/blkif.py >> --- a/tools/python/xen/util/blkif.py Fri May 21 16:21:39 2010 +0100 >> +++ b/tools/python/xen/util/blkif.py Sat May 22 01:21:15 2010 +0400 >> @@ -87,7 +87,7 @@ >> fn = "/dev/%s" %(fn,) >> >> if typ in ("tap", "tap2"): >> - (taptype, fn) = fn.split(":", 1) >> + (taptype, fn) = fn.split(":", 2)[1:] >> return (fn, taptype) >> >> def blkdev_uname_to_file(uname): >> diff -r d0420ab97345 tools/python/xen/xend/XendDomainInfo.py >> --- a/tools/python/xen/xend/XendDomainInfo.py Fri May 21 16:21:39 2010 +0100 >> +++ b/tools/python/xen/xend/XendDomainInfo.py Sat May 22 01:21:15 2010 +0400 >> @@ -3292,6 +3292,7 @@ >> fn = BOOTLOADER_LOOPBACK_DEVICE >> >> try: >> + time.sleep(5) >> blcfg = bootloader(blexec, fn, self, False, >> bootloader_args, kernel, ramdisk, args) >> finally: >> @@ -3299,7 +3300,7 @@ >> log.info("Unmounting %s from %s." % >> (fn, BOOTLOADER_LOOPBACK_DEVICE)) >> >> - dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE) >> + dom0.destroyDevice(devtype, BOOTLOADER_LOOPBACK_DEVICE) >> >> if blcfg is None: >> msg = "Had a bootloader specified, but can't find disk" >> > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH]: blktap2 : control function 2010-05-22 1:01 ` Jeremy Fitzhardinge @ 2010-05-22 8:05 ` eXeC001er 0 siblings, 0 replies; 7+ messages in thread From: eXeC001er @ 2010-05-22 8:05 UTC (permalink / raw) To: Jeremy Fitzhardinge; +Cc: Xen-devel [-- Attachment #1.1: Type: text/plain, Size: 6403 bytes --] without this 'sleep' bootloader return error: 'Disk isn't accessible' from this block: XendBootloader.py : def bootloader (....) if not os.access(disk, os.R_OK): msg = "Disk isn't accessible" log.error(msg) raise VmError(msg) 2010/5/22 Jeremy Fitzhardinge <jeremy@goop.org> > On 05/21/2010 02:28 PM, Pasi Kärkkäinen wrote: > > On Sat, May 22, 2010 at 01:23:46AM +0400, eXeC001er wrote: > > > >> resend. > >> with additional > >> > >> > > Now it's OK. > > Hopefully someone familiar with the code can review it.. > > > > The sleep(5) is almost certainly not the correct fix. > > J > > > -- Pasi > > > > > >> 2010/5/22 Pasi KÀrkkÀinen <[1]pasik@iki.fi> > >> > >> On Fri, May 21, 2010 at 08:51:12PM +0400, eXeC001er wrote: > >> >   Hi. > >> >   I tried to create small patch forÃ* blktap2 : control > function: > >> > > >> > >> This patch is horribly broken at least for me.. It looks really > weird. > >> You might want to re-send it in a proper format.. > >> > >> .. Or if it works for others just forget about this rant:) > >> > >> -- Pasi > >> >   diff -r 840f269d95fb tools/python/xen/xend/XendDomainInfo.py > >> >   --- a/tools/python/xen/xend/XendDomainInfo.py  Wed May 19 > >> 22:59:52 2010 > >> >   +0100 > >> >   +++ b/tools/python/xen/xend/XendDomainInfo.py  Fri May 21 > >> 20:17:15 2010 > >> >   +0400 > >> >   @@ -3292,6 +3292,7 @@ > >> >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  fn = > >> BOOTLOADER_LOOPBACK_DEVICE > >> >   Ã* > >> >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  try: > >> >   + Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã* time.sleep(5) > >> >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  blcfg = > >> bootloader(blexec, fn, self, False, > >> >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã* >  Ã* > >>  Ã*  Ã*  Ã*  Ã*  Ã* bootloader_args, > >> >   kernel, ramdisk, args) > >> >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  finally: > >> >   @@ -3299,7 +3300,7 @@ > >> >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã* > >>  [1][2]log.info("Unmounting %s from %s." % > >> >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã* >  Ã* > >>  Ã*  Ã* (fn, > >> >   BOOTLOADER_LOOPBACK_DEVICE)) > >> >   Ã* > >> >   - Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã* > >> dom0.destroyDevice('tap', > >> >   BOOTLOADER_LOOPBACK_DEVICE) > >> >   + Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã* > >> dom0.destroyDevice(devtype, > >> >   BOOTLOADER_LOOPBACK_DEVICE) > >> >   Ã* > >> >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  if blcfg is None: > >> >   Ã* Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  Ã*  msg = "Had a > >> bootloader specified, but can't > >> >   find disk" > >> >   With this patch DomU boot from VHD disk without error. > >> >   But i can not fix other bug: > >> >   if after DomU (boot disk is blktap2-type) stopped i can not > >> startÃ* it > >> >   again, because i get error "raise VmError("Device %s is > already > >> >   connected." % dev_str)" in "DevController.py". > >> >   but i found workaround: > >> >   stop blktap2_mount: echo 1 >Ã* > /sys/class/blktap2/blktapX/remove > >> >   remove records from xenstore:Ã* > >> >   xenstore-rm /vm/00000000-0000-0000-0000-000000000000 > >> >   xenstore-write /local/domain/0/vm "" > >> >   Now i can run my DomU again. > >> > > >> > References > >> > > >> >   Visible links > >> >   1. [3]http://log.info/ > >> > >> > _______________________________________________ > >> > Xen-devel mailing list > >> > [4]Xen-devel@lists.xensource.com > >> > [5]http://lists.xensource.com/xen-devel > >> > >> References > >> > >> Visible links > >> 1. mailto:pasik@iki.fi > >> 2. http://log.info/ > >> 3. http://log.info/ > >> 4. mailto:Xen-devel@lists.xensource.com > >> 5. http://lists.xensource.com/xen-devel > >> > > > >> diff -r d0420ab97345 tools/python/xen/util/blkif.py > >> --- a/tools/python/xen/util/blkif.py Fri May 21 16:21:39 2010 +0100 > >> +++ b/tools/python/xen/util/blkif.py Sat May 22 01:21:15 2010 +0400 > >> @@ -87,7 +87,7 @@ > >> fn = "/dev/%s" %(fn,) > >> > >> if typ in ("tap", "tap2"): > >> - (taptype, fn) = fn.split(":", 1) > >> + (taptype, fn) = fn.split(":", 2)[1:] > >> return (fn, taptype) > >> > >> def blkdev_uname_to_file(uname): > >> diff -r d0420ab97345 tools/python/xen/xend/XendDomainInfo.py > >> --- a/tools/python/xen/xend/XendDomainInfo.py Fri May 21 16:21:39 > 2010 +0100 > >> +++ b/tools/python/xen/xend/XendDomainInfo.py Sat May 22 01:21:15 > 2010 +0400 > >> @@ -3292,6 +3292,7 @@ > >> fn = BOOTLOADER_LOOPBACK_DEVICE > >> > >> try: > >> + time.sleep(5) > >> blcfg = bootloader(blexec, fn, self, False, > >> bootloader_args, kernel, ramdisk, > args) > >> finally: > >> @@ -3299,7 +3300,7 @@ > >> log.info("Unmounting %s from %s." % > >> (fn, BOOTLOADER_LOOPBACK_DEVICE)) > >> > >> - dom0.destroyDevice('tap', > BOOTLOADER_LOOPBACK_DEVICE) > >> + dom0.destroyDevice(devtype, > BOOTLOADER_LOOPBACK_DEVICE) > >> > >> if blcfg is None: > >> msg = "Had a bootloader specified, but can't find disk" > >> > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > > > > > [-- Attachment #1.2: Type: text/html, Size: 9286 bytes --] [-- Attachment #2: Type: text/plain, Size: 138 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-05-22 8:05 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-05-21 16:51 [PATCH]: blktap2 : control function eXeC001er 2010-05-21 17:38 ` Łukasz Oleś 2010-05-21 20:27 ` Pasi Kärkkäinen 2010-05-21 21:23 ` eXeC001er 2010-05-21 21:28 ` Pasi Kärkkäinen 2010-05-22 1:01 ` Jeremy Fitzhardinge 2010-05-22 8:05 ` eXeC001er
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.