Bug 232567 - yum does not support server failover
Summary: yum does not support server failover
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum-rhn-plugin
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Pradeep Kilambi
QA Contact: Preethi Thomas
URL:
Whiteboard:
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:
Environment:
Last Closed: 2007-11-07 17:24:36 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0594 0 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

serverURL=https://myproxerserver.foo.bar/XMLRPC;https://xmlrpc.rhn.redhat.com/XMLRPC;

should be allowed but isn't.

Version-Release number of selected component (if applicable):
yum-3.0.1-5.el5

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 ?
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 85, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 199, in getOptionsConfig
    errorlevel=opts.errorlevel)
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 134, in
doConfigSetup
    self.plugins.run('init')
  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 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
fails_qa
looks like this is not working

added /etc/sysconfig/rhn/up2date
serverURL=http://www.yahoo.com;https://xmlrpc.rhn.webqa.redhat.com/XMLRPC

[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
serverURL=http://www.yahoo.com;https://xmlrpc.rhn.webqa.redhat.com/XMLRPC;

[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
fixed
Committed revision 119335.

After the fix:
test cases:
/etc/sysconfig/rhn/up2date
serverURL=http://www.yahoo.com/XMLRPC;http://xmlrpc.rhn.redhat.com/XMLRPC;

$ 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 
=============================================================================
Updating:
 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
Complete!




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

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.

http://rhn.redhat.com/errata/RHBA-2007-0594.html



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