Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 232567 - yum does not support server failover
Summary: yum does not support server failover
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum-rhn-plugin
Version: 5.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Pradeep Kilambi
QA Contact: Preethi Thomas
Depends On:
Blocks: 180180 242835
TreeView+ depends on / blocked
Reported: 2007-03-16 04:28 UTC by John T. Rose
Modified: 2018-10-19 23:30 UTC (History)
2 users (show)

Fixed In Version: RHBA-2007-0594
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-11-07 17:24:36 UTC
Target Upstream Version:

Attachments (Terms of Use)
patch to support failover urls (deleted)
2007-05-24 14:19 UTC, Shannon Hughes
no flags Details

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0594 normal SHIPPED_LIVE yum-rhn-plugin bug fix update 2007-10-30 16:22:39 UTC

Description John T. Rose 2007-03-16 04:28:29 UTC
Description of problem:
Adding a failover server in /etc/sysconfig/rhn/up2date breaks yum. Something like


should be allowed but isn't.

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

How reproducible:
Add anything more than a single server to the serverURL

Steps to Reproduce:
1. Add anything more than a single server to the serverURL
2. run yum
3. look at traceback of explosion
Actual results:

# yum update
Loading "installonlyn" plugin
Loading "rhnplugin" plugin
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
  File "/usr/share/yum-cli/", line 85, in main
  File "/usr/share/yum-cli/", line 199, in getOptionsConfig
  File "/usr/lib/python2.4/site-packages/yum/", line 134, in
  File "/usr/lib/python2.4/site-packages/yum/", line 153, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/", line 109, in init_hook
    repo = RhnRepo(channel)
  File "/usr/lib/yum-plugins/", line 156, in __init__
    url = channel['url'] + '/GET-REQ/'
TypeError: can only concatenate list (not "str") to list

Expected results:

Should use the first listed server and work. If the first isn't available it
should go to the second and try it ...

Additional info:

At some point in the past we went through this same issue with up2date. Same
bug, new source.

Comment 1 John T. Rose 2007-03-16 05:55:52 UTC
Related to this bug is another. Perhaps it should be filed under rhnreg_ks?!

After configuring the serverURL in /etc/sysconfig/rhn/up2date to allow for
failover running rhnreg_ks clobbers it trashing all but the first item. It
should leave it alone.

Comment 2 John T. Rose 2007-03-16 06:19:55 UTC
Oops, sorry about yet another email tonight. The rhnreg_ks issue appears to be
the result of using --serverURL, so that is a self-inflicted wound. Ignore
comment #1.

Comment 3 Máirín Duffy 2007-03-16 23:25:03 UTC
James, is this the right BZ component? Looks like yum-rhn-plugin?

Comment 7 Shannon Hughes 2007-05-24 14:19:01 UTC
Created attachment 155349 [details]
patch to support failover urls

The problem was actually that the plugin was not handling multiple channels. A
side effect for adding multiple server URLS is that the channels are sent to
the yum plugin as a list, the plugin was not handling lists correctly. 

Submitting to 5.1 and attaching patch.

Comment 10 Preethi Thomas 2007-08-07 19:52:08 UTC
looks like this is not working

added /etc/sysconfig/rhn/up2date

[root@rlx-3-10 ~]# yum update
Loading "installonlyn" plugin
Loading "rhnplugin" plugin
There was an error communicating with RHN.
RHN support will be disabled.
Error communicating with server. The message was:
Name or service not known
Setting up Update Process
No Repositories Available to Set Up
No Packages marked for Update/Obsoletion

added to /etc/sysconfig/rhn/up2date

[root@rlx-3-10 ~]# yum update
Loading "installonlyn" plugin
Loading "rhnplugin" plugin
Setting up Update Process
Error: Cannot open/read repomd.xml file for repository: rhel-i386-server-5

Comment 11 Pradeep Kilambi 2007-08-17 19:42:40 UTC
Committed revision 119335.

After the fix:
test cases:

$ yum update
Reading repository metadata in from local files
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package autofs.i386 1:5.0.1-0.rc2.43.0.2 set to be updated
--> Running transaction check

Dependencies Resolved

 Package                 Arch       Version          Repository        Size 
 autofs                  i386       1:5.0.1-0.rc2.43.0.2  rhel-i386-client-5  760 k

Transaction Summary
Install      0 Package(s)         
Update       1 Package(s)         
Remove       0 Package(s)         

Total download size: 760 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): autofs-5.0.1-0.rc2 100% |=========================| 760 kB    00:00     
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating  : autofs                       ######################### [1/2] 
  Cleanup   : autofs                       ######################### [2/2]
in up2dateeeeeeeeeeee
in up2dateeeeeeeeeeee

Updated: autofs.i386 1:5.0.1-0.rc2.43.0.2

Comment 12 Preethi Thomas 2007-08-17 20:12:30 UTC

Comment 14 errata-xmlrpc 2007-11-07 17:24:36 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.

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