[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH]: blktap2 : control function
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@xxxxxx> > > 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@xxxxxxxxxxxxxxxxxxx > > [5]http://lists.xensource.com/xen-devel > > References > > Visible links > 1. mailto:pasik@xxxxxx > 2. http://log.info/ > 3. http://log.info/ > 4. mailto:Xen-devel@xxxxxxxxxxxxxxxxxxx > 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@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |