Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 624741 - When upgrading, grub entry for old version is not created
When upgrading, grub entry for old version is not created
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ovirt-node (Show other bugs)
6.0
All Linux
high Severity high
: rc
: ---
Assigned To: Mike Burns
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-17 12:04 EDT by Mike Burns
Modified: 2016-04-26 11:46 EDT (History)
4 users (show)

See Also:
Fixed In Version: ovirt-node-1.9.3-9.git8ecebef.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-11 09:52:25 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)
Patch (3.69 KB, patch)
2010-08-24 10:25 EDT, Mike Burns
no flags Details | Diff

  None (edit)
Description Mike Burns 2010-08-17 12:04:09 EDT
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 12:04:55 EDT
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 12:15:29 EDT
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 09:05:04 EDT
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 10:25:13 EDT
Created attachment 440669 [details]
Patch
Comment 9 Vivian Bian 2010-08-26 07:35:01 EDT
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 09:52:25 EST
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.