Bug 861536 - pygrub command cannot process argument "--entry=0" correctly
pygrub command cannot process argument "--entry=0" correctly
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen (Show other bugs)
5.9
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Miroslav Rezanina
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-28 23:08 EDT by Wei Shi
Modified: 2014-03-10 02:13 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-03-10 02:13:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Wei Shi 2012-09-28 23:08:02 EDT
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 Product and Program Management 2013-05-01 02:40:01 EDT
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 Product and Program Management 2014-02-24 19:15:47 EST
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 Product and Program Management 2014-03-07 08:33:43 EST
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-09 22:04:40 EDT
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 02:13:43 EDT
Thanks for clarification, Wei. Closing.

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