View Issue Details

IDProjectCategoryView StatusLast Update
0001181CentOS-4up2datepublic2013-03-23 20:23
Status closedResolutionsuspended 
Product Version4.2 - x86_64 
Target VersionFixed in Version 
Summary0001181: up2date failes with exceptions.KeyError
DescriptionMany up2date operations fail with "exceptions.KeyError"

[mberg@kadath up2date]$ sudo /usr/sbin/up2date -l
Fetching Obsoletes list for channel: centos4-Base...
Fetching Obsoletes list for channel: centos4-Updates...
Fetching Obsoletes list for channel: centos4-extras...
Fetching Obsoletes list for channel: centos4-addons...
An error has occurred:
See /var/log/up2date for more information
Additional InformationThe traceback is:

[Wed Jan 25 10:09:20 2006] up2date File "/usr/sbin/up2date", line 1265, in ?
    sys.exit(main() or 0)
   File "/usr/sbin/up2date", line 800, in main
    fullUpdate, dryRun=options.dry_run))
   File "/usr/sbin/up2date", line 1120, in batchRun
   File "/usr/share/rhn/up2date_client/", line 65, in init
   File "/usr/share/rhn/up2date_client/", line 112, in __findPackagesToUpdate
    self.availableUpdates = plist.getPackagesToInstall()
   File "/usr/share/rhn/up2date_client/", line 643, in getPackagesToInstall
   File "/usr/share/rhn/up2date_client/", line 612, in __findBestArchPackages
    del self.packagesToUpdate[pkey]

There's a workaround to remove kernel-smp for IA32E platforms in

  for p in plist:
    if p[0] == "kernel-smp":
      if p[4] == "x86_64":
         if self.isIA32E():
            del self.packagesToUpdate["kernel-smp"]

So the problem is that the package has already been deleted when del self.packagesToUpdate[pkey] is called on line 612.

I've attached my workaround, which is just to add a check that pkey != "kernel-smp".
TagsNo tags attached.


2006-01-25 17:18 (585 bytes)
---	2006-01-25 10:14:41.657353312 -0500
+++	2006-01-25 10:20:25.491878408 -0500
@@ -1,3 +1,2 @@
 # Package list mangling
@@ -610,5 +609,7 @@
                 log.log_me("The latest version of %s was not available for this arch. Skipping" % pkey)
-                del self.packagesToUpdate[pkey]
+		# kernel-smp deleted in special case earlier
+		if pkey != "kernel-smp":
+                	del self.packagesToUpdate[pkey]
     # with the new mulitple repos we can have different versions of the same package (585 bytes)


2006-02-08 05:41

reporter   ~0003156

I also ran into this bug (On an SMP x86_64 box), and the workaround did the trick.

The problem occured when I added centos4-centosplus to the up2date chans.

There is a side effect of the workaround, though. up2date no longer lists the correct kernel upgrade. Instead it lists this:

The following Packages were marked to be skipped by your configuration:

Name Version Rel Reason
kernel 2.6.9 name/pattern

Hopefully this (serious) bug can be resolved soon so I can remove the workaround.


2006-02-08 20:19

administrator   ~0003161

I am not sure what the complaint is ... centosplus contians an unsupported kernel.


2006-02-08 20:39

reporter   ~0003162

The message doesn't say that it contains an unsupported kernel, it says it contains an unsupported package name or pattern.

Now, it is possible that that is a totally unrelated issue here. In that case that would be a seperate "bug", being a badly named package. That doesn't change the fact that up2date simply doesn't function at all in some cases (such as mine) without the workaround.

2006-02-08 23:48

administrator   ~0003163

what version snd release of up2date are you using ?

also do you have any excludes setup in the up2date configs ?


2006-02-09 02:57

reporter   ~0003164

up2date-4.4.50-4.centos4, which seems to be the latest, unless up2date doesn't update itself.


2006-02-09 03:11

administrator   ~0003165

It does update itself, but by default, it does not update kernels.

The package in centosplus is called:


It is called that by design ... because it is unsupported...

Look in the file /etc/sysconfig/rhn/up2date for the following lines:





Following the help info in that file, please adjust those variables as you would like them to perform.

To the best of my ability to assertain, up2date is working exactly as it is supposed to.


2006-02-09 03:21

reporter   ~0003166

And the KeyError?


2006-02-09 09:27

administrator   ~0003167

Last edited: 2006-02-09 09:27

The key error is something that is a totally different issue. It is not something that I have been able to duplicate.

I would say that it has to do with a setup problem with up2date and RHN and required registration that somehow slipped through. Try removing and reinstalling up2date like this:

rpm -e up2date firstboot up2date-gnome rhn-applet

yum install up2date firstboot up2date-gnome rhn-applet

(prior to removal do "rpm -q up2date firstboot up2date-gnome rhn-applet" , only remove and reinstall the packages that you currently have installed)

2006-02-09 10:17

administrator   ~0003168


thats a packagekey - up2date uses those as token to track pacakges, you seem to be confusing it with GPG or RPM Singing keys.

setting up up2date properly based on the recommendations provided, you should be ok.

Having tried on three different architectures, I cant reproduce this issue - so if you want any further work done on this, provide samples of your config files and environment. Even better, just attach your config files here.


2006-02-09 18:00

reporter   ~0003175

What architectures did you test on? This bug is specific to /only/ an x86-64 on an IA32E machine (i.e. an Intel processor with EM64T).

So far as I know, all the config files on this machine are completely stock. If you still want to look at them, tell me which specific ones to upload, but this appears to be a code issue.

Just a note - I confirmed that the workaround code I cited in the Additional Information field did not exist in the version of up2date in the prior release.

[mberg@kadath ~]$ uname -a
Linux 2.6.9-11.ELsmp #1 SMP Wed Jun 8 16:59:12 CDT 2005 x86_64 x86_64 x86_64 GNU/Linux
[mberg@kadath ~]$ rpm -q up2date
[mberg@kadath ~]$ find /etc/sysconfig/rhn -ls
 60294 8 drwxr-xr-x 3 root root 4096 Jan 24 16:51 /etc/sysconfig/rhn
 60297 4 -rw-r--r-- 1 root root 2846 Sep 4 10:26 /etc/sysconfig/rhn/up2date.rpmnew
 60619 4 -rw------- 1 root root 1160 Aug 29 2002 /etc/sysconfig/rhn/up2date-keyring.gpg
 60307 4 -rw-r--r-- 1 root root 97 Jan 24 16:51 /etc/sysconfig/rhn/up2date-uuid
 60295 8 drwxr-xr-x 2 root root 4096 Oct 10 18:01 /etc/sysconfig/rhn/clientCaps.d
 60293 4 -rw-r--r-- 1 root root 13 Oct 10 18:01 /etc/sysconfig/rhn/rhnsd
 60298 8 -rw------- 1 root root 3449 Aug 2 2005 /etc/sysconfig/rhn/up2date
 60296 4 -rw-r--r-- 1 root root 1739 Oct 10 18:01 /etc/sysconfig/rhn/sources


2006-02-09 20:41

reporter   ~0003178

Hrmm... this is odd... Digging a bit at the reason for the isIA32E function:

# Dirty Dirty Dirty hack, see bz #155583
# basically, rpm.archscore thinks that "x86_64" is a compatiable arch for
# ia32e boxes. Which it is. Unless it is a kernel. So if someome says "up2date
# kernel-smp", up2date will let them. Because aside from telling you, there is
# no way to tell that that is not going to get you a bootable kernel. So we
# hardcode around it. Ugh.

Thing is... I don't think this is right on 4.x. So far as I can tell the seperate kernel for ia32e in 3.x was because it included some fairly extensive changes, and they didn't want to risk merging the new code into the stable kernel. (See the release notes to RHEL3 U2.)

So aside from being broken, the added code is unnecessary.


2006-03-16 22:23

reporter   ~0003251

Any confirmation as to whether this was tried on an EMT64T platform?


2006-06-06 01:37

reporter   ~0003539

I struck a similar problem (I too have an EMT64 platform with dual core processor) but I suspect the problem is related to that reported in bug ID 0001070. The solution suggested in that thread worked for me and is more satisfactory because it fixes the problem and allows correct updating of the smp kernel. Consistent with that thread, I had two old kernel-devel packages installed. Removing the old kernel packages did the trick. See for details.


2006-06-06 15:15

reporter   ~0003548

Bug 1070 is a seperate issue (breaks at a different point in the code with a different exception).

The reason things worked after you took care of that seems to be that they've since fixed this bug upstream, though they've inexplicably left misleading comments in the code. The relevent section looks like this now:

# Dirty Dirty Dirty hack, see bz #155583
# basically, rpm.archscore thinks that "x86_64" is a compatiable arch for
# ia32e boxes. Which it is. Unless it is a kernel. So if someome says "up2date kernel-smp", up2date
# will let them. Because aside from telling you, there is no way to tell that that is not going to
# get you a bootable kernel. So we hardcode around it. Ugh.

if p[0] == "kernel-smp":
  if p[4] == "x86_64":
    if self.isIA32E():

In other words, they just removed

  del self.packagesToUpdate["kernel-smp"]

effectively rendering that hunk of code a useless NO-OP. Sloppy that they didn't remove or revise the comments, remove the unnecessary check, or note the change in the Changelog. But, hey, it works, so I'm not going to complain.


2006-09-21 07:14

reporter   ~0003998

I had the same problem on two freshly installed x86_64 on Intel systems. Found the link to that other ticket, removed all older kernel rpm's and rm'd all /var/spool/up2date/*.hdr files and then updating was successful. Tried the other possible solutions in this bug and none worked.


2006-10-25 06:00

reporter   ~0004093

Same issue. Fresh install of CentOS 4.4 x86_64 on a Dell 2850. VMServer was installed so I thought it might be that but of course I was wrong. I can confirm that deleting *.hdr files in /var/spool/up2date, and then issuing an up2date -u solved the issue. Ugly workaround but hey, it worked.


2013-03-23 20:23

manager   ~0016935

CentOS4 is EOL.

Issue History

Date Modified Username Field Change
2006-01-25 17:18 mberg New Issue
2006-01-25 17:18 mberg Status new => assigned
2006-01-25 17:18 mberg File Added:
2006-02-08 05:41 guspaz Note Added: 0003156
2006-02-08 20:19 JohnnyHughes Note Added: 0003161
2006-02-08 20:39 guspaz Note Added: 0003162
2006-02-08 23:48 Note Added: 0003163
2006-02-09 02:57 guspaz Note Added: 0003164
2006-02-09 03:11 JohnnyHughes Note Added: 0003165
2006-02-09 03:21 guspaz Note Added: 0003166
2006-02-09 09:27 JohnnyHughes Note Added: 0003167
2006-02-09 09:27 JohnnyHughes Note Edited: 0003167
2006-02-09 10:17 Note Added: 0003168
2006-02-09 18:00 mberg Note Added: 0003175
2006-02-09 20:41 mberg Note Added: 0003178
2006-03-16 22:23 mberg Note Added: 0003251
2006-06-06 01:37 phantom Note Added: 0003539
2006-06-06 15:15 mberg Note Added: 0003548
2006-09-21 07:14 hostasaurus Note Added: 0003998
2006-10-25 06:00 phunkyphil Note Added: 0004093
2013-03-23 20:23 tigalch Note Added: 0016935
2013-03-23 20:23 tigalch Status assigned => closed
2013-03-23 20:23 tigalch Resolution open => suspended