Bug 106789 - Updated up2date -> TypeError: loop over non-sequence
Updated up2date -> TypeError: loop over non-sequence
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: up2date (Show other bugs)
2.1
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Adrian Likins
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-10-10 12:16 EDT by Bryce
Modified: 2007-11-30 17:06 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-24 15:59:16 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 Bryce 2003-10-10 12:16:44 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20030131

Description of problem:
Old AS2.1 NUMAQ box being updated.
Discovered it had old up2date package on it hence the SSL connection failure
Went to update it by downloading the up2date src from the AS2.1 updates dir
(up2date-2.8.46.3-1.2.1AS.src.rpm)

Built and installed fine

Ran. Bailed out unexpectidly

Version-Release number of selected component (if applicable):
up2date-2.8.46.3-1.2.1AS

How reproducible:
Always

Steps to Reproduce:
1. recompile up2date-2.8.46.3-1.2.1AS.src.rpm on AS2.1 box
2. install
3. run up2date -l after rhn_register
    

Actual Results:  [root@ca-test12 root]# up2date -l
Traceback (innermost last):
  File "/usr/sbin/up2date", line 781, in ?
    main()
  File "/usr/sbin/up2date", line 569, in main
    pkgNames, fullUpdate, dryRun = dry_run))
  File "/usr/sbin/up2date", line 724, in batchRun
    batch.run()
  File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 57, in run
    self.__findPackagesToUpdate()
  File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 89, in
__findPackagesToUpdate
    plist.run()
  File "/usr/share/rhn/up2date_client/packageList.py", line 85, in run
    self.addObsoletePackages(obsList)
  File "/usr/share/rhn/up2date_client/packageList.py", line 109, in
addObsoletePackages
    for p in obsoletePackages:
TypeError: loop over non-sequence


Expected Results:  A listing up updates should have appeared

Additional info:

I'm making this a SECURITY severity as it prevents the download of RHAT approved
security enhanced packages which otherwise are only available as source code and
cannot be verified after compilation and installation
Comment 1 Bryce 2003-10-11 11:17:52 EDT
Never mind.
We decided to reinstall the box with something else.
Comment 2 Bryce 2003-10-16 20:10:52 EDT
Ok squire, well it turns out a load of new machines arrived for to have RH AS2.1
installed on them.
Guess what.

I grabbed the up2date/rhn packages off rhn.redhat.com for AS2.1, installed them
(rpm -Uvh), setup the system for to use http proxy through the firewall,
registered the system then checked with the rhn page to see what the status of
it was (enabled) then ram up2date -l

[root@ca-test7-RHAS21 root]# up2date -l
Traceback (innermost last):
  File "/usr/sbin/up2date", line 781, in ?
    main()
  File "/usr/sbin/up2date", line 569, in main
    pkgNames, fullUpdate, dryRun = dry_run))
  File "/usr/sbin/up2date", line 724, in batchRun
    batch.run()
  File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 57, in run
    self.__findPackagesToUpdate()
  File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 89, in
__findPackagesToUpdate
    plist.run()
  File "/usr/share/rhn/up2date_client/packageList.py", line 85, in run
    self.addObsoletePackages(obsList)
  File "/usr/share/rhn/up2date_client/packageList.py", line 109, in
addObsoletePackages
    for p in obsoletePackages:
TypeError: loop over non-sequence


Whats going on? is the RHN version of up2date foobared?

Phil
=--=
Comment 3 Adrian Likins 2003-10-21 15:16:43 EDT
could you attach the /var/spool/up2date/rhel-*-obsoletes file
to this report?
Comment 4 Leonid Mamtchenkov 2003-10-23 12:09:27 EDT
I have exactly the same problem - RH AS 2.1 with freshly manually updated
rhn_register and up2date, registered in RHN, falls on it's face after "up2date
--list".  Here is a traceback:

[root@ss7node tmp]# up2date --list
Traceback (innermost last):
  File "/usr/sbin/up2date", line 781, in ?
    main()
  File "/usr/sbin/up2date", line 569, in main
    pkgNames, fullUpdate, dryRun = dry_run))
  File "/usr/sbin/up2date", line 724, in batchRun
    batch.run()
  File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 57, in run
    self.__findPackagesToUpdate()
  File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 89, in
__findPackagesToUpdate
    plist.run()
  File "/usr/share/rhn/up2date_client/packageList.py", line 85, in run
    self.addObsoletePackages(obsList)
  File "/usr/share/rhn/up2date_client/packageList.py", line 109, in
addObsoletePackages
    for p in obsoletePackages:
TypeError: loop over non-sequence

AL> could you attach the /var/spool/up2date/rhel-*-obsoletes file
AL> to this report?

I, for some reason, don't have any matching files.

[root@ss7node tmp]# ls /var/spool/up2date/rhel-*-obsoletes
ls: /var/spool/up2date/rhel-*-obsoletes: No such file or directory

Actually, there is absolutely nothing in /var/spool/up2date directory.
Comment 5 Emmanuel Galanos 2003-11-09 05:39:07 EST
I am seeing the same problem on 2 RHL 7.3 machines with up2date
2.8.40-3.7.3
Comment 6 Emmanuel Galanos 2003-11-09 05:47:14 EST
Looking at the code, the exception is due to obsoletePackages being
None. This is due to rhnPackageInfo::obsoletesList returning None
when there are no subscribed channels from RHN.

I logged into RHN and found that the systems were indeed
(for some unknown reason) not subscribed to any channels.

Subscribing the systems (via the Channel link) fixed the problem.
Comment 7 Tony Suazo 2003-11-20 17:41:06 EST
Same problem after trying to install new up2date

-------------------------------------------------------------------

Traceback (innermost last):
  File "/usr/lib/python1.5/site-packages/libglade.py", line 28, in
__call__
    ret = apply(self.func, a)
  File "/usr/share/rhn/up2date_client/gui.py", line 432, in
onChannelsPageNext
    self.pList.run()
  File "/usr/share/rhn/up2date_client/packageList.py", line 85, in run
    self.addObsoletePackages(obsList)
  File "/usr/share/rhn/up2date_client/packageList.py", line 109, in
addObsoletePackages
    for p in obsoletePackages:
TypeError: loop over non-sequence
Traceback (innermost last):
  File "/usr/lib/python1.5/site-packages/libglade.py", line 28, in
__call__
    ret = apply(self.func, a)
  File "/usr/share/rhn/up2date_client/gui.py", line 475, in
onSkippedPagePrepare    maxlength = max(map(lambda x: len(x[0][0]),
self.skipPkgList)) * 8
ValueError: min() or max() of empty sequence
Comment 8 Austin Tuan 2003-12-30 08:52:45 EST
Folks,
    While Emmanuel suggested that "Subscribing the systems (via the 
Channel link) fixed the problem." for RHL 7.3, I _cannot_ perform 
this operation, cuz on my RHN account web page, I can only see "none" 
in that selection box next to the "Modify Base Channel" button!
    Can someone shed some light on this?
Thx,
Austin
Comment 9 Tony Suazo 2003-12-30 09:36:24 EST
Austin,

I had the same problem with RHL AS 2.1.  I had to contact a RH sales 
rep to purchase the correct update subscriptions for my servers as 
they were not available to purchase online.  The same RH sales rep 
needed to contact tech support to update my account.  Once this was 
done, I was able to use up2date without any further problems.

Regards,

Tony
Comment 10 Gary Strahan 2004-02-20 11:05:02 EST
I am having the same problem with RHL ES 2.1.

Should be that at least a DEMO account would work, but it does not.
No channels are listed as available

Gary
Comment 11 Paul Johnston 2004-03-19 16:13:19 EST
Same here with RH ES 2.1.  The scripts generating the errors are 
exactlythe same as those on another server -- same model, same OS 
version -- where up2date runs fine.  All rhn- and up2date-related 
packages on both servers are the same revs.
Comment 12 Adrian Likins 2004-03-30 17:57:02 EST
The problem here has its roots in a server bug. Basically,
if the machine is not assigned to any channels, the client
downloads a 0 lenght file instead of the xml data file with
no contents in it it was expected and blows up.

Easiest fix is to make sure the machines are subscribed
to a channel. The usual cause for a a machine to not
have any channels is lack of entitlements of the
proper level. 

client changes in the next release should at least exit
gracefully in this case. 
Comment 13 Josh Bressers 2004-06-21 10:24:11 EDT
Removing security severity.  This is not a security issue.
Comment 14 Adrian Likins 2004-08-24 15:59:16 EDT
The root cause of this is that the servers in question
are not being properly associated with a channel. The
most common cause of this is lack of RHN entitlements
for the server. 

Make sure the boxes have channels associated with
them via the website and this issue should go
away.

Also, more current versions of the client should
behave more gracefully in this circumstance.

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