Bug 232567 - yum does not support server failover
yum does not support server failover
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum-rhn-plugin (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Pradeep Kilambi
Preethi Thomas
Depends On:
Blocks: 180180 242835
  Show dependency treegraph
Reported: 2007-03-16 00:28 EDT by John T. Rose
Modified: 2013-01-10 05:17 EST (History)
2 users (show)

See Also:
Fixed In Version: RHBA-2007-0594
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-07 12:24:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch to support failover urls (1.17 KB, text/x-patch)
2007-05-24 10:19 EDT, Shannon Hughes
no flags Details

  None (edit)
Description John T. Rose 2007-03-16 00:28:29 EDT
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/yummain.py", line 85, in main
  File "/usr/share/yum-cli/cli.py", line 199, in getOptionsConfig
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 134, in
  File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 153, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/rhnplugin.py", line 109, in init_hook
    repo = RhnRepo(channel)
  File "/usr/lib/yum-plugins/rhnplugin.py", 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 01:55:52 EDT
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 02:19:55 EDT
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 19:25:03 EDT
James, is this the right BZ component? Looks like yum-rhn-plugin?
Comment 7 Shannon Hughes 2007-05-24 10:19:01 EDT
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 15:52:08 EDT
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 15:42:40 EDT
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 16:12:30 EDT
Comment 14 errata-xmlrpc 2007-11-07 12:24:36 EST
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.