Bug 106789

Summary: Updated up2date -> TypeError: loop over non-sequence
Product: Red Hat Enterprise Linux 2.1 Reporter: Bryce <root>
Component: up2dateAssignee: Adrian Likins <alikins>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1CC: e, leonid, paul_johnston, ystuan
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-08-24 19:59:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bryce 2003-10-10 16:16:44 UTC
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 15:17:52 UTC
Never mind.
We decided to reinstall the box with something else.


Comment 2 Bryce 2003-10-17 00:10:52 UTC
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 19:16:43 UTC
could you attach the /var/spool/up2date/rhel-*-obsoletes file
to this report?

Comment 4 Leonid Mamtchenkov 2003-10-23 16:09:27 UTC
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 e 2003-11-09 10:39:07 UTC
I am seeing the same problem on 2 RHL 7.3 machines with up2date
2.8.40-3.7.3

Comment 6 e 2003-11-09 10:47:14 UTC
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 22:41:06 UTC
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 13:52:45 UTC
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 14:36:24 UTC
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 16:05:02 UTC
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 21:13:19 UTC
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 22:57:02 UTC
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 14:24:11 UTC
Removing security severity.  This is not a security issue.

Comment 14 Adrian Likins 2004-08-24 19:59:16 UTC
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.