Bug 117523 - up2date fails to update lilo.conf when updating kernel-enterprise and more than two enterprise kernels are already installed
up2date fails to update lilo.conf when updating kernel-enterprise and more th...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: up2date (Show other bugs)
2.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Adrian Likins
Fanny Augustin
:
Depends On:
Blocks: 116726 123573 up2date-rhel3-u3 up2date-rhel2.1-u5
  Show dependency treegraph
 
Reported: 2004-03-04 17:20 EST by Kyle Powell
Modified: 2007-11-30 17:06 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-02 01:07:17 EDT
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 Kyle Powell 2004-03-04 17:20:06 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2)
Gecko/20030716

Description of problem:
[root@tlab-r01 root]# rpm -q up2date
up2date-2.9.3-2.2.1AS
[root@tlab-r01 root]# rpm -qa|grep kernel-enterprise
kernel-enterprise-2.4.9-e.24
kernel-enterprise-2.4.9-e.37
kernel-enterprise-2.4.9-e.25
[root@tlab-r01 root]# grep linux-ente /etc/lilo.conf
        label=linux-ente.bak
        label=linux-ente.bak1
        label=linux-enterpris
[root@tlab-r01 root]# /usr/share/rhn/up2date_client/checkbootloader.py
Found LILO.
[root@tlab-r01 root]# up2date -v kernel-enterprise
                                                                     
          
Fetching package list for channel: redhat-advanced-server-i386...
########################################
                                                                     
          
Fetching Obsoletes list for channel: redhat-advanced-server-i386...
########################################
                                                                     
          
Fetching rpm headers...
########################################
                                                                     
          
Testing package set / solving RPM inter-dependencies...
########################################
kernel-enterprise-2.4.9-e.3 ########################### Done.
Preparing...               
########################################### [100%]
 
Installing...
   1:kernel-enterprise     
########################################### [100%]
Error installing lilo.conf  The message was:
test install of lilo failed


Version-Release number of selected component (if applicable):
up2date-2.9.3-2.2.1AS

How reproducible:
Always

Steps to Reproduce:
1. Install three enterprise kernels on an AS 2.1 host and verify that
they have the default entries that would be created in lilo.conf had
up2date kernel-enterprise been run on the box as each new enterprise
kernel was released (namely, linux-ente.bak, linux-ente.bak1, and
linux-enterpris).
2. run `up2date kernel-enterprise`

Actual Results:  Installing...
   1:kernel-enterprise     
########################################### [100%]
Error installing lilo.conf  The message was:
test install of lilo failed
[root@tlab-r01 root]#

Expected Results:  Installing...
   1:kernel-enterprise     
########################################### [100%]
[root@tlab-r01 root]#

Additional info:

/var/log/up2date contains:

[Thu Mar  4 17:06:34 2004] up2date new up2date run started
[Thu Mar  4 17:06:34 2004] up2date Opening rpmdb in /var/lib/rpm/ with
option 0
[Thu Mar  4 17:06:34 2004] up2date Migrating network settings from
rhn_register
[Thu Mar  4 17:06:34 2004] up2date updating login info
[Thu Mar  4 17:06:34 2004] up2date Opening rpmdb in /var/lib/rpm/ with
option 0
[Thu Mar  4 17:06:34 2004] up2date logging into up2date server
[Thu Mar  4 17:06:34 2004] up2date successfully retrieved
authentication token from up2date server
[Thu Mar  4 17:06:34 2004] up2date Opening rpmdb in /var/lib/rpm/ with
option 0
[Thu Mar  4 17:06:34 2004] up2date Opening rpmdb in /var/lib/rpm/ with
option 0
[Thu Mar  4 17:06:35 2004] up2date availablePackageList from network
[Thu Mar  4 17:06:35 2004] up2date Opening rpmdb in /var/lib/rpm/ with
option 0
[Thu Mar  4 17:06:35 2004] up2date Opening rpmdb in /var/lib/rpm/ with
option 0
[Thu Mar  4 17:06:36 2004] up2date Opening rpmdb in /var/lib/rpm/ with
option 0
[Thu Mar  4 17:06:38 2004] up2date installing packages:
['kernel-enterprise-2.4.9-e.38']
[Thu Mar  4 17:06:38 2004] up2date Opening rpmdb in /var/lib/rpm/ with
option 0
[Thu Mar  4 17:06:39 2004] up2date Opening rpmdb in /var/lib/rpm/ with
option 1
[Thu Mar  4 17:06:45 2004] up2date Opening rpmdb in /var/lib/rpm/ with
option 0
[Thu Mar  4 17:06:45 2004] up2date Adding packages to package profile:
['kernel-enterprise-2.4.9-e.38']
[Thu Mar  4 17:06:46 2004] up2date deleting
/var/spool/up2date/kernel-enterprise-2.4.9-e.38.i686.hdr
[Thu Mar  4 17:06:46 2004] up2date deleting
/var/spool/up2date/kernel-enterprise-2.4.9-e.38.i686.rpm
[Thu Mar  4 17:06:46 2004] up2date Modifying bootloader config to
include the new kernel info
[Thu Mar  4 17:06:46 2004] up2date Adding 2.4.9-e.38enterprise to
bootloader config
[Thu Mar  4 17:06:46 2004] up2date Running lilo with the new configuration
[Thu Mar  4 17:06:46 2004] up2date Opening rpmdb in /var/lib/rpm/ with
option 0
[Thu Mar  4 17:06:46 2004] up2date Running "/sbin/mkinitrd --ifneeded
/boot/initrd-2.4.9-e.38enterprise.img 2.4.9-e.38enterprise"
[Thu Mar  4 17:06:46 2004] up2date
/boot/initrd-2.4.9-e.38enterprise.img was created
[Thu Mar  4 17:06:46 2004] up2date renaming the lilo.conf entry for
linux-enterpris to linux-ente.bak12
[Thu Mar  4 17:06:46 2004] up2date making a backup copy of
/etc/lilo.conf as /etc/lilo.conf.up2date-1078438006.83
[Thu Mar  4 17:06:46 2004] up2date writing out the new /etc/lilo.conf
[Thu Mar  4 17:06:46 2004] up2date Running " /sbin/lilo -t -r /" 
(lilo test mode)
[Thu Mar  4 17:06:46 2004] up2date restoring the backup file
/etc/lilo.conf.up2date-1078438006.83 to /etc/lilo.conf
[Thu Mar  4 17:06:46 2004] up2date Error installing lilo.conf  The
message was:
test install of lilo failed


The problem is caused by up2date renaming the third enterprise kernel
label "linux-ente.bak12" when you install the fourth enterprise kernel
(The first being named linux-ente.bak and the second linux-ente.bak1).
I would guess this is somwhere in /usr/share/rhn/up2date_client/lilo.py

[root@tlab-r01 root]# lilo -t -r /
Added linux.bak
Added linux-up.bak
Added linux-ente.bak
Added linux.bak1
Added linux-up
Added linux-ente.bak1
Added linux.bak12
Fatal: Label "linux-ente.bak12" is too long
Comment 1 Frank Vergote 2004-03-19 09:34:33 EST
bugzilla@spano.be
Comment 2 Adrian Likins 2004-04-05 16:07:55 EDT
I'll take a look for the next update
Comment 4 Adrian Likins 2004-07-01 18:32:54 EDT
2.9.10 has a fix. hopefully for u5

Comment 6 Robert Perkins 2004-07-26 14:49:56 EDT
According to Jeff Needle, this was fixed post-RHEL2.1 Beta ISO, so the
package should be available from (somewhere).  Frank Hirtz is to find
out how we are going to deliver it.
Comment 13 Jay Turner 2004-08-02 21:32:34 EDT
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-367.html
Comment 14 Alexandre Oliva 2004-08-03 13:15:30 EDT
A fix is needed for 2.1.
Comment 15 Adrian Likins 2004-08-10 17:41:17 EDT
2.9.12 should have the patch from comment #11 in it

kpowell: please have at it and see if it really fixes
the issue
Comment 16 Kyle Powell 2004-08-11 18:57:04 EDT
Nope, still not fixed.

[root@tlab-r02 root]# lilo -C /tmp/lilo.conf.bad -t
Added linux.bak
Added linux *
Added linux-ente.bak
Added linux-ente.bak1
Fatal: Label "linux-enterp.bak" is too long

Here's the new backupName() from
/usr/share/rhn/up2date_client/newlilocfg.py in up2date-2.9.12. The
program logic still thinks a label of 16 characters is valid, but 15
chars is the max.

def backupName(labelName,imagelist):
    ext=".bak"
    backup = labelName[:16-len(ext)]+".bak"
    count = 1
 
    # add a count to the bakup labels
    while (backup in imagelist):
        ext=".bak%s" % count
        backup = labelName[:16-len(ext)]+ext
        count = count + 1
 
    return backup

genImageLabelType () seems to understand that 15 chars is the max
def genImageLabelType(imageType):
    # grrrr
    res = string.split(imageType, "kernel")
    if len(res[1]) == 0:
        tmp = "-up"
        return tmp
 
    tmp = res[1][:10]
    return tmp

It only keeps 10 chars, and since this will be added to "linux" that
means the label length is 15 chars max.

We need to change those "labelName[:16-len(ext)]" lines to
"labelName[:15-len(ext)]" in backupName()
Comment 17 Alexandre Oliva 2004-08-12 03:30:00 EDT
AARRGGHH!  Whoever made me get the impression that length 16 was ok
should be taken out and shot.

I must have misunderstood some part of the discussion.  Apologies for
the broken patch.  I thought I'd mentioned it was untested, but
apparently I didn't.  GRRR.

Any chance of getting the obvious fix still into U5?  Without it,
up2date/lilo is going to be *very* broken :-(
Comment 18 Adrian Likins 2004-08-12 15:45:17 EDT
hmm, I built it, we'll see if we can get it in
(2.9.13)
Comment 19 John Flanagan 2004-08-18 10:49:50 EDT
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-368.html
Comment 20 Alexandre Oliva 2004-08-18 11:17:13 EDT
I'm confused.  The erratum mentions up2date-2.9.11-1.2.1AS, that Kyle
tested and verified to not completely fix the problem.  The fix is in
2.9.13, that apparently didn't make it.  Reopening.
Comment 22 John Flanagan 2004-08-18 12:47:26 EDT
2.9.11-1.2.1AS is what was on the RC kit. A late fix [2.9.13-1.2.1AS]
is being expedited now that fixes the elilo problem.  Our goal is to
repush up2date today with this fix.  
Comment 23 Adrian Likins 2004-08-18 14:56:04 EDT
another fix... this time it looks like it even works
2.9.14 (and 4.2.37 for rhel3)
Comment 25 Jay Turner 2004-08-18 17:22:28 EDT
Fix confirmed with 2.9.14-1.2.1AS.
Comment 26 Alexandre Oliva 2004-08-19 07:14:36 EDT
Should be closed when errata for RHEL3 is issued.
Comment 27 John Flanagan 2004-09-02 01:07:18 EDT
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-427.html

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