Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 696971

Summary: grubby not updating arguments for all kernels when --update-kernel=ALL is used
Product: Red Hat Enterprise Linux 5 Reporter: Christian Horn <chorn>
Component: mkinitrdAssignee: Brian Lane <bcl>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.5CC: atodorov, ddumas, gasmith, jstodola, vincent
Target Milestone: rc   
Target Release: 5.8   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: mkinitrd-5.1.19.6-73 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-21 05:34:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 668957, 719046, 726828, 758797    
Attachments:
Description Flags
Patch
none
Test patch none

Description Christian Horn 2011-04-15 13:05:35 UTC
Description of problem: 
   grubby does not not update the arguments for all kernels 
   when --update-kernel=ALL is used

Version-Release number of selected component (if applicable):
   grubby-7.0.15-2.el6 (earlier and later versions show the same behaviour)

How reproducible:
   always

Steps to Reproduce:
1. cat >grubtest<<EOT
default=0
timeout=5
title Red Hat Enterprise Linux (2.6.32-71.el6.x86_64)
 root (hd0,0)
 kernel /vmlinuz-2.6.32-71.el6.x86_64 ro root=/dev/mapper/vg_rhel6-lv_root
 initrd /initramfs-2.6.32-71.el6.x86_64.img
title Red Hat Enterprise Linux (2.6.50-71.el6.x86_64)
 root (hd0,0)
 kernel /vmlinuz-2.6.50-71.el6.x86_64 ro root=/dev/mapper/vg_rhel6-lv_root
 initrd /initramfs-2.6.50-71.el6.x86_64.img
EOT

2. # setting an attribute initially for all kernels works
   grubby -c grubtest --update-kernel=ALL --args='option=0'
3. # changing the attribute now works only for the first kernel
   grubby -c grubtest --update-kernel=ALL --args='option=1'
4. grubby -c grubtest --info=ALL|grep ^args

Actual results:
args="ro option=1"
args="ro option=0"

Expected results:
args="ro option=1"
args="ro option=1"


Additional info:

Comment 1 Brian Lane 2011-04-18 20:36:08 UTC
Created attachment 493002 [details]
Patch

Comment 2 Brian Lane 2011-04-18 20:36:39 UTC
Created attachment 493003 [details]
Test patch

Comment 3 Christian Horn 2011-04-19 07:40:40 UTC
Verified the patch, fixes the problem

Comment 4 RHEL Program Management 2011-08-05 12:32:04 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 6 Jan Stodola 2012-01-02 09:57:22 UTC
Test:
[root@chicken ~]# cat >grubtest<<EOT
> default=0
> timeout=5
> title Red Hat Enterprise Linux (2.6.32-71.el6.x86_64)
>  root (hd0,0)
>  kernel /vmlinuz-2.6.32-71.el6.x86_64 ro root=/dev/mapper/vg_rhel6-lv_root
>  initrd /initramfs-2.6.32-71.el6.x86_64.img
> title Red Hat Enterprise Linux (2.6.50-71.el6.x86_64)
>  root (hd0,0)
>  kernel /vmlinuz-2.6.50-71.el6.x86_64 ro root=/dev/mapper/vg_rhel6-lv_root
>  initrd /initramfs-2.6.50-71.el6.x86_64.img
> EOT
[root@chicken ~]# grubby -c grubtest --update-kernel=ALL --args='option=0'
[root@chicken ~]# grubby -c grubtest --update-kernel=ALL --args='option=1'
[root@chicken ~]# grubby -c grubtest --info=ALL|grep ^args


Results with RHEL-5.7 (mkinitrd-5.1.19.6-71.el5):
args="ro option=1"
args="ro option=0"

Correct results with RHEL-5.8 Snapshot 2 (mkinitrd-5.1.19.6-75.el5):
args="ro option=1"
args="ro option=1"


Moving to VERIFIED

Comment 7 errata-xmlrpc 2012-02-21 05:34:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0157.html