Bug 157087 - up2date --configure fails when failover serverURL is configured
Summary: up2date --configure fails when failover serverURL is configured
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: up2date
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Adrian Likins
QA Contact: Beth Nackashi
URL:
Whiteboard:
: 161954 (view as bug list)
Depends On:
Blocks: 164831 168429
TreeView+ depends on / blocked
 
Reported: 2005-05-06 18:29 UTC by daryl herzmann
Modified: 2007-11-30 22:07 UTC (History)
4 users (show)

Fixed In Version: RHBA-2006-0098
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-03-07 18:58:20 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0098 0 qe-ready SHIPPED_LIVE up2date bug fix update 2006-03-06 05:00:00 UTC

Description daryl herzmann 2005-05-06 18:29:35 UTC
Description of problem:
Try running up2date --configure when you have a failover RHN site configured.


Version-Release number of selected component (if applicable):
up2date-4.4.5.6-2

How reproducible:
# up2date --configure
Traceback (most recent call last):
  File "/usr/sbin/up2date", line 1252, in ?
    sys.exit(main() or 0)
  File "/usr/sbin/up2date", line 644, in main
    ret = configdlg.main()
  File "/usr/share/rhn/up2date_client/configdlg.py", line 382, in main
    gui = Gui(firstboot)
  File "/usr/share/rhn/up2date_client/configdlg.py", line 84, in __init__
    self.setInitialValues()
  File "/usr/share/rhn/up2date_client/configdlg.py", line 104, in setInitialValues
    self.serverUrlCombo.set_popdown_strings(self.serverUrls)
TypeError: sequence item not a string or unicode object


line 103 of /usr/share/rhn/up2date_client/configdlg.py is the problem.  It
assumes cfg["serverURL"] is a string

self.serverUrls = [cfg["serverURL"]]

I would provide a patch, but I think you can fix it more elegantly than I!

thanks!

Comment 1 John T. Rose 2005-06-03 01:37:20 UTC
I'm seeing the same behavior here.

# rpm -q up2date
up2date-4.4.5.6-2

# up2date --configure
Traceback (most recent call last):
  File "/usr/sbin/up2date", line 1252, in ?
    sys.exit(main() or 0)
  File "/usr/sbin/up2date", line 644, in main
    ret = configdlg.main()
  File "/usr/share/rhn/up2date_client/configdlg.py", line 382, in main
    gui = Gui(firstboot)
  File "/usr/share/rhn/up2date_client/configdlg.py", line 84, in __init__
    self.setInitialValues()
  File "/usr/share/rhn/up2date_client/configdlg.py", line 104, in setInitialValues
    self.serverUrlCombo.set_popdown_strings(self.serverUrls)
TypeError: sequence item not a string or unicode object

# up2date-config
Traceback (most recent call last):
  File "/usr/sbin/up2date-config", line 1252, in ?
    sys.exit(main() or 0)
  File "/usr/sbin/up2date-config", line 644, in main
    ret = configdlg.main()
  File "/usr/share/rhn/up2date_client/configdlg.py", line 382, in main
    gui = Gui(firstboot)
  File "/usr/share/rhn/up2date_client/configdlg.py", line 84, in __init__
    self.setInitialValues()
  File "/usr/share/rhn/up2date_client/configdlg.py", line 104, in setInitialValues
    self.serverUrlCombo.set_popdown_strings(self.serverUrls)
TypeError: sequence item not a string or unicode object

Having to choose between proxy failover and the users having the ability to
configure up2date without direct munging is a bad choice I think.

John

Comment 2 Matthew Davis 2005-06-14 19:47:58 UTC
I reproduced this issue using up2date-4.2.57-2.  One thing to note is this is
with the graphical version of up2date.  It does not traceback running 'up2date
--configure --nox'.

Comment 3 Clifford Perry 2005-10-04 14:33:07 UTC
Confirmed also within up2date-4.4.5.6-2 on my RHEL4 workstation. Get same error. 

Putting against RHEL 4 U3 Proposed. 

graphical configuration fails, while the text version works. 

Cliff. 

Comment 4 Clifford Perry 2005-10-04 14:35:11 UTC
*** Bug 161954 has been marked as a duplicate of this bug. ***

Comment 5 Adrian Likins 2005-10-04 17:03:21 UTC
hmm, I'm a little confused. CVS seems to indicate that line of code targetted in
the tracebacks hasn't existed since 2002. And it's definately not in the
rhel3u6/rhel4u2 branches m (aka 4.4.4x)

Comment 6 Adrian Likins 2005-10-04 18:01:01 UTC
works for me with current rhel3.6/rhel4.2 code

can anyone duplicate otherwise?

Comment 7 John T. Rose 2005-10-04 18:38:09 UTC
[root@entropy root]# rpm -q up2date
up2date-4.4.44-3
[root@entropy root]# up2date --configure
An error has occurred:
exceptions.TypeError
See /var/log/up2date for more information
[root@entropy root]# tail -15 /var/log/up2date
[Tue Oct  4 07:42:20 2005] up2date logging into up2date server
[Tue Oct  4 07:42:21 2005] up2date successfully retrieved authentication token
from up2date server
[Tue Oct  4 07:42:21 2005] up2date availablePackageList from network
[Tue Oct  4 07:42:21 2005] up2date Unable to import repomd support so repomd
support will not be available
[Tue Oct  4 13:36:30 2005] up2date   File "/usr/sbin/up2date", line 1265, in ?
    sys.exit(main() or 0)
   File "/usr/sbin/up2date", line 644, in main
    ret = configdlg.main()
   File "/usr/share/rhn/up2date_client/configdlg.py", line 389, in main
    gui = Gui(firstboot)
   File "/usr/share/rhn/up2date_client/configdlg.py", line 91, in __init__
    self.setInitialValues()
   File "/usr/share/rhn/up2date_client/configdlg.py", line 111, in setInitialValues
    self.serverUrlCombo.set_popdown_strings(self.serverUrls)

John

Comment 8 John T. Rose 2005-10-04 18:40:34 UTC
Sorry if this wasn't clear ...

[root@entropy root]# cat /etc/redhat-release
Red Hat Enterprise Linux WS release 3 (Taroon Update 6)

John

Comment 9 daryl herzmann 2005-10-04 18:43:16 UTC
# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 1)
# rpm -q up2date
up2date-4.4.5.6-2
# up2date --configure
Traceback (most recent call last):
  File "/usr/sbin/up2date", line 1252, in ?
    sys.exit(main() or 0)
  File "/usr/sbin/up2date", line 644, in main
    ret = configdlg.main()
  File "/usr/share/rhn/up2date_client/configdlg.py", line 382, in main
    gui = Gui(firstboot)
  File "/usr/share/rhn/up2date_client/configdlg.py", line 84, in __init__
    self.setInitialValues()
  File "/usr/share/rhn/up2date_client/configdlg.py", line 104, in setInitialValues
    self.serverUrlCombo.set_popdown_strings(self.serverUrls)
TypeError: sequence item not a string or unicode object





Comment 10 daryl herzmann 2005-10-05 17:24:02 UTC
# rpm -q up2date
up2date-4.4.50-4

# up2date --configure
An error has occurred:
exceptions.TypeError
See /var/log/up2date for more information

[Wed Oct  5 12:22:58 2005] up2date   File "/usr/sbin/up2date", line 1265, in ?
    sys.exit(main() or 0)
   File "/usr/sbin/up2date", line 644, in main
    ret = configdlg.main()
   File "/usr/share/rhn/up2date_client/configdlg.py", line 389, in main
    gui = Gui(firstboot)
   File "/usr/share/rhn/up2date_client/configdlg.py", line 91, in __init__
    self.setInitialValues()
   File "/usr/share/rhn/up2date_client/configdlg.py", line 111, in setInitialValues
    self.serverUrlCombo.set_popdown_strings(self.serverUrls)


Comment 11 Adrian Likins 2005-10-06 20:35:01 UTC
er, boggle... wtf. That code refereced in these tracebacks has never been
released in RHEL4. 

whats the output of: 
    rpm -V up2date-gnome

are these RHEL4 boxes showing this upgrades from RHEL3?
Something weird going on here or I'm missing something obvious...





Comment 12 Adrian Likins 2005-10-06 20:41:46 UTC
hmm, indeed. I'm missing something obvious. I see it now. 

Comment 13 Adrian Likins 2005-10-06 20:47:20 UTC
self.serverUrls is getting set to a list of lists in the case of failover
serverUrls, and is breaking the dropdown population.

Now to figure out wtf I was looking at that I couldn't see that...

+++ configdlg.py        6 Oct 2005 20:46:57 -0000
@@ -106,7 +106,9 @@
         self.serverUrlCombo = self.xml.get_widget("serverUrlCombo")
         #self.serverUrls = configUtils.getServerUrls()
         default = "https://xmlrpc.rhns.redhat.com/XMLRPC"
-        self.serverUrls = [cfg["serverURL"]]
+        self.serverUrls = cfg["serverURL"]
+        if type(self.serverUrls) != type([]):
+            self.serverUrls = [self.serverUrls]

fix in up2date-4.4.51


Comment 17 Beth Nackashi 2006-01-12 21:15:15 UTC
verified code change made it into /usr/share/rhn/up2date_client/configdlg.py for
up2date-4.4.55-4 on ia64, i386, and x86_64

Also verified no tracebacks with up2date-config or up2date --configure on ia64,
i386, and x86_64.



Comment 18 Beth Nackashi 2006-01-12 21:16:22 UTC
... with failover serverURL configured.

Comment 20 Red Hat Bugzilla 2006-03-07 18:58:21 UTC
An advisory 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-2006-0098.html



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