Bug 117523 - up2date fails to update lilo.conf when updating kernel-enterprise and more than two enterprise kernels are already installed
Summary: up2date fails to update lilo.conf when updating kernel-enterprise and more th...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: up2date
Version: 2.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Adrian Likins
QA Contact: Fanny Augustin
URL:
Whiteboard:
Depends On:
Blocks: 116726 123573 up2date-rhel3-u3 up2date-rhel2.1-u5
TreeView+ depends on / blocked
 
Reported: 2004-03-04 22:20 UTC by Kyle Powell
Modified: 2007-11-30 22:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-02 05:07:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2004:367 0 normal SHIPPED_LIVE Updated up2date packages 2004-08-02 04:00:00 UTC
Red Hat Product Errata RHBA-2004:368 0 normal SHIPPED_LIVE Updated up2date packages 2004-08-18 04:00:00 UTC
Red Hat Product Errata RHBA-2004:369 0 normal SHIPPED_LIVE Updated rhn_register packages 2004-08-18 04:00:00 UTC
Red Hat Product Errata RHBA-2004:427 0 normal SHIPPED_LIVE Updated up2date packages 2004-09-02 04:00:00 UTC

Description Kyle Powell 2004-03-04 22:20:06 UTC
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 14:34:33 UTC
bugzilla

Comment 2 Adrian Likins 2004-04-05 20:07:55 UTC
I'll take a look for the next update

Comment 4 Adrian Likins 2004-07-01 22:32:54 UTC
2.9.10 has a fix. hopefully for u5



Comment 6 Robert Perkins 2004-07-26 18:49:56 UTC
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-03 01:32:34 UTC
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 17:15:30 UTC
A fix is needed for 2.1.

Comment 15 Adrian Likins 2004-08-10 21:41:17 UTC
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 22:57:04 UTC
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 07:30:00 UTC
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 19:45:17 UTC
hmm, I built it, we'll see if we can get it in
(2.9.13)

Comment 19 John Flanagan 2004-08-18 14:49:50 UTC
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 15:17:13 UTC
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 16:47:26 UTC
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 18:56:04 UTC
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 21:22:28 UTC
Fix confirmed with 2.9.14-1.2.1AS.

Comment 26 Alexandre Oliva 2004-08-19 11:14:36 UTC
Should be closed when errata for RHEL3 is issued.

Comment 27 John Flanagan 2004-09-02 05:07:18 UTC
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.