RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 624741 - When upgrading, grub entry for old version is not created
Summary: When upgrading, grub entry for old version is not created
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ovirt-node
Version: 6.0
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Mike Burns
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-17 16:04 UTC by Mike Burns
Modified: 2016-04-26 15:46 UTC (History)
4 users (show)

Fixed In Version: ovirt-node-1.9.3-9.git8ecebef.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-11 14:52:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch (3.69 KB, patch)
2010-08-24 14:25 UTC, Mike Burns
no flags Details | Diff

Description Mike Burns 2010-08-17 16:04:09 UTC
Description of problem:
The entry for the old version of RHEV should be kept in the grub.conf for the case of a failed upgrade.  The system is designed to automatically roll back to the old version if the boot of the new version fails.  Without the entry, that won't work correctly causing it to keep trying the new version.  This would probably force a reinstall of the system.

Version-Release number of selected component (if applicable):
6.0-11

How reproducible:
Always when not using iscsi shared root 

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Mike Burns 2010-08-17 16:04:55 UTC
This can be fixed with this patch:

diff --git a/scripts/ovirt-config-boot b/scripts/ovirt-config-boot
index ed7ee87..7574247 100755
--- a/scripts/ovirt-config-boot
+++ b/scripts/ovirt-config-boot
 -172,9 +172,9 @@ ovirt_boot_setup() {

     local oldtitle
     if [ "$candidate" = "Root" ]; then
-        oldtitle=$(grep ^title /boot/grub/grub.conf|tail -n1|cut -c7-)
+        oldtitle=$(grep ^title ${grub_dir}/grub.conf|tail -n1|cut -c7-)
     else
-        oldtitle="BACKUP $(grep ^title /boot/grub/grub.conf|head -n1|cut -c7-)"
+        oldtitle="BACKUP $(grep ^title ${grub_dir}/grub.conf|head -n1|cut -c7-)
     fi
     # reorder tty0 to allow both serial and phys console after installation
     if [ "$OVIRT_ISCSI_ENABLED" = "y" ]; then

Comment 5 Vivian Bian 2010-08-20 16:15:29 UTC
checked with rhev-hypervisor-6.0-11 and 6.0-12 

steps:
1. install RHEVH 6.0-11 onto virtio image without sharing root 
2. "linux upgrade" to upgrade RHEVH from 6.0-11 to 6.0-12 

Actual result
in grub.conf , there is only 6.0-12 new title , no 6.0-11 
default saved
timeout 5
hiddenmenu
title Red Hat Enterprise Virtualization Hypervisor (6.0-12.el6)
    root (hd0,0)
    kernel /vmlinuz0 ro root=live:LABEL=Root roottypefs=ext4 console=tty0                 rhgb rd_NO_LUKS rd_NO_MD rd_NO_DM rootflags=ro crashkernel=128M
    initrd /initrd0.img

3.reboot from CDROM again to upgrade from 6.0-12 to 6.0-12 
4.check grub again

[root@localhost ~]# cat `find / -name grub.conf`
default saved
timeout 5
hiddenmenu
title Red Hat Enterprise Virtualization Hypervisor (6.0-12.el6)
    root (hd0,1)
    kernel /vmlinuz0 ro root=live:LABEL=Root roottypefs=ext4 console=tty0                  console=ttyS0,115200n8 rhgb rd_NO_LUKS rd_NO_MD rd_NO_DM rootflags=ro crashkernel=128M
    initrd /initrd0.img
title BACKUP Red Hat Enterprise Virtualization Hypervisor (6.0-11.el6)
    root (hd0,1)
    kernel /backup-vmlinuz0 ro root=live:LABEL=Root roottypefs=ext4 console=tty0                  console=ttyS0,115200n8 rhgb rd_NO_LUKS rd_NO_MD rd_NO_DM rootflags=ro crashkernel=128M root=live:LABEL=RootBackup
    initrd /backup-initrd0.img
    savedefault


So there should be some drawback for grub entry creation . Set bug status to ASSIGNED

Comment 6 Mike Burns 2010-08-24 13:05:04 UTC
Issue is that we aren't looking in the right place when creating the BACKUP entry.  We have 2 partitions that we use, one for Root and one for RootBackup.  The current version is installed to Root.  When upgrading, the new version is installed into RootBackup (renamed to RootNew) and on reboot, we rename everything appropriately so that Root --> RootBackup and RootNew --> Root.

On upgrade we should be looking at Root to determine whether we create the Backup entry, but we're looking at RootBackup.  That is why it was only created the second time in vbian's example in Comment 5.

A patch should be coming shortly to fix this.

Comment 7 Mike Burns 2010-08-24 14:25:13 UTC
Created attachment 440669 [details]
Patch

Comment 9 Vivian Bian 2010-08-26 11:35:01 UTC
checked with rhev-hypervisor-6.0-13 and rhev-hypervisor-6.0-11

steps:
1. install RHEVH 6.0-11 onto virtio image without sharing root 
2. "linux upgrade" to upgrade RHEVH from 6.0-11 to 6.0-13 

Actual result
in grub.conf 
default saved
timeout 5
hiddenmenu
title Red Hat Enterprise Virtualization Hypervisor (6.0-13.el6)
    root (hd0,1)
    kernel /vmlinuz0 ro root=live:LABEL=Root roottypefs=ext4 rhgb rd_NO_LUKS rd_NO_MD rd_NO_DM rootflags=ro crashkernel=128M
    initrd /initrd0.img
title BACKUP Red Hat Enterprise Virtualization Hypervisor (6.0-11.el6)
    root (hd0,1)
    kernel /backup-vmlinuz0 ro root=live:LABEL=Root roottypefs=ext4
rhgb rd_NO_LUKS rd_NO_MD rd_NO_DM rootflags=ro crashkernel=128M root=live:LABEL=RootBackup
    initrd /backup-initrd0.img
    savedefault

so set bug status to VERIFIED

Comment 10 releng-rhel@redhat.com 2010-11-11 14:52:25 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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