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

Re: [Xen-devel] pygrub, installed with Python 3, doesn't boot Xen DomU-s


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: "YOUNG, MICHAEL A." <m.a.young@xxxxxxxxxxxx>
  • Date: Mon, 22 Jul 2019 19:43:40 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=durham.ac.uk;dmarc=pass action=none header.from=durham.ac.uk;dkim=pass header.d=durham.ac.uk;arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5XSIFn52P0F+7kXgYO8nG47HreIbA01tyJr3+dr5v28=; b=lk02iGkdUv/+3DaBqB09I3va6dmhlFBf5KzNbBYqMLGZeCrZU6/oE2R/qjU2EsrnbgWVOqJbQTVtHRtzp+VioxQqOJCYvakAF5TM7vf0/eK7XzIT3Zd4iZe5M65vKXDObOLCqLyYQ75+HRbb6/c5XyBce7j2uRFdV+O9NhHIk9ZOmY775NcVuyg2/gTTNxi6XsZMQPhBcZ9xBsmcAxFGJdhEocOoI0k97jM19E7uRJhCFEgiRD8gPzyzZX0XiTmMkkbV7HZlR3ov+1OLoG+8zxI5dA3onlAcxDlEzxf7SPYA08lpcg3lI9IVq4Rewrz2oGpUMWPiWTFV35zAekETgw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KPg1L5gjmvRiMUyf5QqktgmPmlT004zREPHnujGYv3TBHjIZiNbu2FHfVSgrH6LqsgmpqtXLNgvr9Cv7iGQFZUqUrDdj3nXgGvLxUed2UD+KjcuFvSjsaryMdNW745YSrtaVbJhYvc2yg5ma4l3etJrK1yWKnRgH40eEn+A3ZTZ6u/YqQyO5PqqgPqOlhbVVV1LbwI7W3zkOkI0kDGtXjnbVQKSa/l3q330mpayEbcSAjgNko5f0Pip8BGo5OISCYIxLHyLBudNimMchvrfScb7w1TZLhd+K/JV6DmDEyTULfZO4kLszOUxLRmBpCLZinWa+H6c5trPeno1jro/Orw==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=m.a.young@xxxxxxxxxxxx;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Kevin Buckley <kevin.buckley.ecs.vuw.ac.nz@xxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Mon, 22 Jul 2019 19:43:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVQIyzovlJtaJUH0OBUd+8+cCUIabXCmiA
  • Thread-topic: [Xen-devel] pygrub, installed with Python 3, doesn't boot Xen DomU-s

On Mon, 22 Jul 2019, Andrew Cooper wrote:

> On 22/07/2019 03:57, Kevin Buckley wrote:
>> bash-5.0# /usr/lib/xen/bin/pygrub --debug --offset=1048576
>> --list-entries /dev/vg_xen_vbds/lv_4g_02
>> Using <class 'grub.GrubConf.Grub2ConfigFile'> to parse /boot/grub/grub.cfg
>> Traceback (most recent call last):
>>   File "/usr/lib/xen/bin/pygrub", line 907, in <module>
>>     chosencfg = run_grub(file, entry, fs, incfg["args"])
>>   File "/usr/lib/xen/bin/pygrub", line 625, in run_grub
>>     g = Grub(file, fs)
>>   File "/usr/lib/xen/bin/pygrub", line 249, in __init__
>>     self.read_config(file, fs)
>>   File "/usr/lib/xen/bin/pygrub", line 460, in read_config
>>     self.cf.parse(buf)
>>   File "/usr/lib/python3.7/site-packages/grub/GrubConf.py", line 376, in 
>> parse
>>     lines = buf.split("\n")
>> TypeError: a bytes-like object is required, not 'str'
>>
>> ...
>>
>> Ok, so then I went hunting around for the cause of the error
>> I was seeing on the LFS system and got pointed towards the
>> cause being a Pythin2->3 issue, with the way 3 now differentiates
>> between strings and bytes.
>
> Yes - this looks like a Py 2/3 compatibility issue.  This particular one
> is related to
> https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=ff915c8cacc264ae1380d51fea07267b8308d7ba
>
> However, I can't explain why python is complaining at str.split(). 
> split() is a string operation, not a bytes operation.

It looks like you are missing the above patch and I think you also need
https://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=485079e816788d70169f45579e1f5a8f909dc1b3
https://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=767ba397d34848c7e0c4e9cdfc5efa4e0cb61442
and perhaps
https://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=a57a1b26ec0ae31f924cf2bbcf479637d007be44
if you build with ocaml. Actually the first of these 3 patches is optional 
as it is just an error message change but should allow the second patch to 
apply cleanly.

        Michael Young
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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