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

Re: [Xen-devel] [PATCH]: blktap2 : control function


  • To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
  • From: eXeC001er <execooler@xxxxxxxxx>
  • Date: Sat, 22 May 2010 12:05:25 +0400
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Sat, 22 May 2010 01:06:25 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=fnIO2PYYEmzz1K4u7Vu2CkOQ9GeF7cvwkZTVNLGQ1RZ3Dti97XlVJq8t07P6HCiq8Y A7FMhLFsMEGnbbVd+ZQsIPizXu/y/00tQYpSpgK3nCsppZWoG0fzPPBMRKsiXibSXT3C TqbZ+UW61Y/2DWsIq8AaLOQtgeJhAeeq2q0dE=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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@xxxxxxxx>
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@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 mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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