From xen-devel-bounces@lists.xen.org Wed Feb 05 12:26:40 2014 Received: (at maildrop) by bugs.xenproject.org; 5 Feb 2014 12:26:40 +0000 Received: from lists.xen.org ([50.57.142.19]) by bugs.xenproject.org with esmtp (Exim 4.80) (envelope-from ) id 1WB1Yu-0007UN-Tr for xen-devel-maildrop-Eithu9ie@bugs.xenproject.org; Wed, 05 Feb 2014 12:26:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WB1TW-0004lr-P7; Wed, 05 Feb 2014 12:21:06 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WB1TU-0004li-KA for xen-devel@lists.xen.org; Wed, 05 Feb 2014 12:21:05 +0000 Received: from [85.158.137.68:34817] by server-1.bemta-3.messagelabs.com id DC/D5-17293-FAC22F25; Wed, 05 Feb 2014 12:21:03 +0000 X-Env-Sender: Andrew.Cooper3@citrix.com X-Msg-Ref: server-7.tower-31.messagelabs.com!1391602861!13563646!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 14552 invoked from network); 5 Feb 2014 12:21:02 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-7.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 5 Feb 2014 12:21:02 -0000 X-IronPort-AV: E=Sophos;i="4.95,786,1384300800"; d="scan'208";a="98170864" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 05 Feb 2014 12:21:01 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Wed, 5 Feb 2014 07:21:00 -0500 Received: from andrewcoop.uk.xensource.com ([10.80.2.18]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1WB1TQ-0004qd-Ci; Wed, 05 Feb 2014 12:21:00 +0000 Message-ID: <52F22CAC.3050003@citrix.com> Date: Wed, 5 Feb 2014 12:21:00 +0000 From: Andrew Cooper User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 MIME-Version: 1.0 To: George Dunlap References: <20140204181023.GA5293@citrix.com> <1391592179.6497.73.camel@kazak.uk.xensource.com> <52F2253B.9000000@eu.citrix.com> In-Reply-To: <52F2253B.9000000@eu.citrix.com> X-Enigmail-Version: 1.6 X-DLP: MIA2 Cc: Ian Campbell , Joby Poriyath , xen-devel@lists.xen.org Subject: Re: [Xen-devel] [PATCH v4] xen/pygrub: grub2/grub.cfg from RHEL 7 has new commands in menuentry X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org On 05/02/14 11:49, George Dunlap wrote: > On 02/05/2014 09:22 AM, Ian Campbell wrote: >> On Tue, 2014-02-04 at 18:10 +0000, Joby Poriyath wrote: >>> menuentry in grub2/grub.cfg uses linux16 and initrd16 commands >>> instead of linux and initrd. Due to this RHEL 7 (beta) guest failed to >>> boot after the installation. >>> >>> In addition to this, RHEL 7 menu entries have two different >>> single-quote >>> delimited strings on the same line, and the greedy grouping for >>> menuentry >>> parsing gets both strings, and the options inbetween. > > So you're saying that adding the '?' just happens to change the match > because of a quirk in the algorithms in the python library? No - it is well specified regex syntax. Skimming the xend code, it gets moderate use. It is even already used in pygrub itself: "bootfsgroup = re.findall('zfs-bootfs=(.*?)[\s\,\"]', bootfsargs)" > That seems more like a hack than a proper fix; there may be other > versions of python (future versions, for instance) where the new > regexp will have the same effect as the old one, and we'll have > another regression. > > Even if the behavior described is part of the defined interface, I'd > be wary of using this because future developers may not realize what > it's for, or how to modify it properly to retain the properties it has > now. That is a matter of opinion, but I would disagree. I personally use lazy matching quite often, and encounter it moderately frequently in others code. ~Andrew > >>> >>> Signed-off-by: Joby Poriyath >>> Reviewed-by: Andrew Cooper >>> Cc: george.dunlap@citrix.com >> Acked-by: Ian Campbell >> >> IMHO this can go into 4.4, unless George objects today I shall commit. > > I'm a bit on the fence about this one. If this had been sent a month > ago, it would be a no-brainer. It certainly looks like it should work > just fine. On the other hand, pygrub is an important bit of > functionality, and I'm not sure how much testing it gets. But of > course the XenServer XenRT tests probably exercise it fairly well (or > else they wouldn't be submitting this patch). > > The Register seems to think that RHEL will be released "in the first > half of 2014", which would certainly be before 4.5. But we should > have another point release before then, with enough time to do better > testing and (possibly) come up with a better solution to the regexp > problem above (assuming my interpretation is correct). > > I'm wondering though whether it would make more sense to save this for > 4.4.1. > > -George _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel