Bug 861536 - pygrub command cannot process argument "--entry=0" correctly
Summary: pygrub command cannot process argument "--entry=0" correctly
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen
Version: 5.9
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Rezanina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-29 03:08 UTC by Wei Shi
Modified: 2014-03-10 06:13 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-10 06:13:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Wei Shi 2012-09-29 03:08:02 UTC
Description of problem:
file:xen/tools/pygrub/src/pygrub has a wrong condition judgement at line 796.

        if idx is not None and idx > 0 and idx < len(g.cf.images):

The idx variable should be greater and equal with 0, because array item 0 store the first grub entry.
This cause the sel variable set to the default value due to previous codes.

    if interactive:
        curses.wrapper(run_main)
    else:
        sel = g.cf.default

Version-Release number of selected component (if applicable):
xen-3.0.3-141.el5
Host: rhel5.8 (kernel 341, xen 141)
Guest:rhel5.9(with grub < 1.0) snapshot1 PV i386(kernel 341, xen 141)

How reproducible:
100%

Steps to Reproduce:
1. prepare a pv guest with at latest 3 grub entry(not test grub2), let default entry not equal with 0 on /boot/grub/grub.cfg
2. # pygrub --entry=0 [image_name]
3. 
  
Actual results:
the output display the default entry

Expected results:
the output display the entry 0

Additional info:

Comment 2 RHEL Program Management 2013-05-01 06:40:01 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 3 RHEL Program Management 2014-02-25 00:15:47 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 4 RHEL Program Management 2014-03-07 13:33:43 UTC
This bug/component is not included in scope for RHEL-5.11.0 which is the last RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX (at the end of RHEL5.11 development phase (Apr 22, 2014)). Please contact your account manager or support representative in case you need to escalate this bug.

Comment 5 Wei Shi 2014-03-10 02:04:40 UTC
Only PV guests launched through tool(pygrub) with specify arguements are affected.
Won't have severe customer impact.
Closed as WONTFIX is OK to me.

Comment 6 Miroslav Rezanina 2014-03-10 06:13:43 UTC
Thanks for clarification, Wei. Closing.


Note You need to log in before you can comment on or make changes to this bug.