Bug 170055 - 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 3
Classification: Red Hat
Component: up2date
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Adrian Likins
QA Contact: Beth Nackashi
URL:
Whiteboard:
Depends On:
Blocks: 168424 169775
TreeView+ depends on / blocked
 
Reported: 2005-10-06 20:49 UTC by Adrian Likins
Modified: 2007-11-30 22:07 UTC (History)
3 users (show)

Fixed In Version: RHBA-2006-0105
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-03-15 15:36:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


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

Description Adrian Likins 2005-10-06 20:49:31 UTC
+++ This bug was initially created as a clone of Bug #157087 +++

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!

-- Additional comment from rose on 2005-06-02 21:37 EST --
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

-- Additional comment from mdavis on 2005-06-14 15:47 EST --
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'.

-- Additional comment from cperry on 2005-10-04 10:33 EST --
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. 

-- Additional comment from cperry on 2005-10-04 10:35 EST --
*** Bug 161954 has been marked as a duplicate of this bug. ***

-- Additional comment from alikins on 2005-10-04 13:03 EST --
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)

-- Additional comment from alikins on 2005-10-04 14:01 EST --
works for me with current rhel3.6/rhel4.2 code

can anyone duplicate otherwise?

-- Additional comment from rose on 2005-10-04 14:38 EST --
[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

-- Additional comment from rose on 2005-10-04 14:40 EST --
Sorry if this wasn't clear ...

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

John

-- Additional comment from akrherz on 2005-10-04 14:43 EST --
# 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





-- Additional comment from akrherz on 2005-10-05 13:24 EST --
# 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)


-- Additional comment from alikins on 2005-10-06 16:35 EST --
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...





-- Additional comment from alikins on 2005-10-06 16:41 EST --
hmm, indeed. I'm missing something obvious. I see it now. 

-- Additional comment from alikins on 2005-10-06 16:47 EST --
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 1 Adrian Likins 2005-10-17 17:04:15 UTC
mustfix

Comment 3 Beth Nackashi 2005-12-15 22:42:47 UTC

*** This bug has been marked as a duplicate of 170067 ***

Comment 4 Red Hat Bugzilla 2006-03-15 15:36:25 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-0105.html



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