Bug 509448 - kernel-xen update via RHN doesn't retain xen kernel options in grub.conf
kernel-xen update via RHN doesn't retain xen kernel options in grub.conf
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: mkinitrd (Show other bugs)
5.3
x86_64 Linux
low Severity medium
: rc
: ---
Assigned To: Brian Lane
Release Test Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-02 16:16 EDT by Bryce Pier
Modified: 2011-02-23 17:14 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-02-23 17:14:53 EST
Type: ---
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 Bryce Pier 2009-07-02 16:16:53 EDT
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b4) Gecko/20090427 Fedora/3.5-0.20.beta4.fc11 Firefox/3.5b4

When RHN was used to push the kernel-xen-2.6.18-128.1.14.el5 update to a RHEL 5.3 server, the xen kernel options from the previous xen kernel line are not copied to the new xen kernel line in grub.conf.

The new kernel line only contains "kernel /xen.gz-2.6.18-128.1.14.el5" and is missing "com2=57600,8n1 console=tty0 console=com2 crashkernel=128M@16M dom0_mem=1G" from the previous xen kernel entry.

Here is the resultant grub.conf file:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/lxvg/vol_root
#          initrd /initrd-version.img
#boot=/dev/sda
default=1
timeout=5
serial --unit=1 --speed=57600
terminal --timeout=10 console serial
#splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-128.1.14.el5xen)
       root (hd0,0)
       kernel /xen.gz-2.6.18-128.1.14.el5
       module /vmlinuz-2.6.18-128.1.14.el5xen ro root=/dev/lxvg/vol_root pci=bfsort console=xvc xencons=xvc
       module /initrd-2.6.18-128.1.14.el5xen.img
title Red Hat Enterprise Linux Server (2.6.18-128.1.14.el5)
       root (hd0,0)
       kernel /xen.gz-2.6.18-128.1.14.el5
       module /vmlinuz-2.6.18-128.1.14.el5xen ro root=/dev/lxvg/vol_root pci=bfsort console=xvc xencons=xvc
       module /initrd-2.6.18-128.1.14.el5xen.img
title Red Hat Enterprise Linux Server (2.6.18-128.1.14.el5)
       root (hd0,0)
       kernel /vmlinuz-2.6.18-128.1.14.el5 ro root=/dev/lxvg/vol_root pci=bfsort console=xvc xencons=xvc
       initrd /initrd-2.6.18-128.1.14.el5.img
title Red Hat Enterprise Linux Server (2.6.18-128.1.10.el5xen)
       root (hd0,0)
       kernel /xen.gz-2.6.18-128.1.10.el5 com2=57600,8n1 console=tty0 console=com2 crashkernel=128M@16M dom0_mem=1G
       module /vmlinuz-2.6.18-128.1.10.el5xen ro root=/dev/lxvg/vol_root pci=bfsort console=xvc xencons=xvc
       module /initrd-2.6.18-128.1.10.el5xen.img
title Red Hat Enterprise Linux Server (2.6.18-128.el5)
       root (hd0,0)
       kernel /vmlinuz-2.6.18-128.el5 ro root=/dev/lxvg/vol_root pci=bfsort rhgb quiet console=tty1 console=ttyS1,57600 crashkernel=128M@16M
       initrd /initrd-2.6.18-128.el5.img


Reproducible: Always

Steps to Reproduce:
1. Add xen kernel options to grub.conf on a system running kernel-xen-2.6.18-128.1.10.el5
2. Register system with RHN
3.Use RHN to specify packages to update including kernel-xen-2.6.18-128.1.14.el5 & kernel-2.6.18-128.1.14.el5
4. Let system check-in with RHN and install selected updates
Actual Results:  
No xen kernel options are copied from the previous xen kernel line in grub.conf

Expected Results:  
It should copy the xen kernel options from the xen kernel line of the previously installed xen kernel.
Comment 4 Peter Jones 2009-07-14 14:11:09 EDT
This doesn't appear to be operating incorrectly.  Options are copied from the kernel specified as default, which in this case has means "ro root=/dev/lxvg/vol_root pci=bfsort console=xvc xencons=xvc" are the options that get copied.
Comment 5 Bill Burns 2009-07-14 14:56:51 EDT
I think the complaint is about the "kernel" line for Xen, which is the hypervisor.
Realize that booting Xen loads the Xen hypervisor which is specified on the "kernel" line, then the Xen version of the Linux kernel as specified on the first "module" line. Both the Xen hypervisor and the Xen kernel can have options.
Comment 6 Peter Jones 2009-07-14 16:33:23 EDT
The current version copies both lines, but it can't copy something from an entry that doesn't include it.  The entry it appears to be copying from in your example doesn't have any more options on that line.  When I try it on an entry that does have options there, they are copied.
Comment 7 Chris Lalancette 2009-07-15 04:39:54 EDT
Let's forget about the above example.  Let's take the following example, which is becoming more common because of KVM and Xen.

On my machine, I have both the kernel and the kernel-xen kernels installed, like so:

default=1
timeout=10
serial --unit=1 --speed=115200
terminal --timeout=10 serial console
title Red Hat Enterprise Linux Server (2.6.18-92.el5xen)
	root (hd0,0)
	kernel /xen.gz-2.6.18-92.el5 com2=115200,8n1 console=com2L
	module /vmlinuz-2.6.18-92.el5xen ro root=/dev/VolGroup00/LogVol00 console=tty0 console=ttyS0,115200
	module /initrd-2.6.18-92.el5xen.img
title Red Hat Enterprise Linux Server (2.6.18-92.el5)
	root (hd0,0)
	kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/VolGroup00/LogVol00 console=tty0 console=ttyS1,115200
	initrd /initrd-2.6.18-92.el5.img

(note that this is a perfectly valid configuration for a machine with serial on ttyS1)  I'm booted into the 2.6.18-92.el5 (non-xen) kernel.  I update to the RHEL-5.3 kernel, and now my grub.conf looks like:

default=1
timeout=10
#splashimage=(hd0,0)/grub/splash.xpm.gz
#hiddenmenu
serial --unit=0 --speed=115200
terminal --timeout=10 serial console
title Red Hat Enterprise Linux Server (2.6.18-128.el5xen)
        root (hd0,0)
        kernel /xen.gz-2.6.18-128.el5
        module /vmlinuz-2.6.18-128.el5xen ro root=/dev/VolGroup00/LogVol00 console=tty0 console=ttyS1,115200
        module /initrd-2.6.18-128.el5xen.img
title Red Hat Enterprise Linux Server (2.6.18-128.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-128.el5 ro root=/dev/VolGroup00/LogVol00 console=tty0 console=ttyS1,115200
        initrd /initrd-2.6.18-128.el5.img
title Red Hat Enterprise Linux Server (2.6.18-92.el5xen)
        root (hd0,0)
        kernel /xen.gz-2.6.18-92.el5 com1=115200,8n1
        module /vmlinuz-2.6.18-92.el5xen ro root=/dev/VolGroup00/LogVol00 console=tty0 console=ttyS0,115200
        module /initrd-2.6.18-92.el5xen.img
title Red Hat Enterprise Linux Server (2.6.18-92.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/VolGroup00/LogVol00 console=tty0 console=ttyS1,115200
        initrd /initrd-2.6.18-92.el5.img

So what happened is that because my default kernel was the non-xen one, when I updated the xen one, it didn't carry over the hypervisor options.  In point of fact, it also carried over the *wrong* kernel options; it should have carried over the console=ttyS0 instead of the console=ttyS1, but it didn't.

This is probably the case for the reporter, and also what I've seen.  Looked at from that point of view, it's not a regression; it's something that's always been there.

That being said, from the principle of least surprise, the right thing to do here is probably to copy the options from the newest xen hypervisor and kernel (if it exists) to the xen hypervisor kernel that is currently being installed.  While you still may get it wrong, I would say that you have a much better chance of getting it right than we currently have.

Chris Lalancette
Comment 10 RHEL Product and Program Management 2011-02-23 17:14:53 EST
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.

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