Bug 1306541

Summary: osad failover does not work
Product: [Community] Spacewalk Reporter: Gennadii Altukhov <galtukho>
Component: ClientsAssignee: Gennadii Altukhov <galtukho>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: high Docs Contact:
Priority: high    
Version: 2.4CC: fdewaley, galtukho, jdobes, jentrena, mmello, satqe-list, tkasparek, tlestach
Target Milestone: ---Keywords: EasyFix, Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1217121 Environment:
Last Closed: 2016-06-16 08:06:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1217121    
Bug Blocks: 1127217, 1484117    

Description Gennadii Altukhov 2016-02-11 09:04:01 UTC
Description of problem:
osad failover does not work.

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

How reproducible:
Always

Steps to Reproduce:
1. Register a client against a Spacewalk Proxy server.
2. Configure multiple Spacewalk Proxies in 'serverURL' option in file /etc/sysconfig/rhn/up2date :

   serverURL=https://proxy1.usersys.redhat.com/XMLRPC;https://proxy2.usersys.redhat.com/XMLRPC;https://proxy3.usersys.redhat.com/XMLRPC;

3. Set "enable_failover = 1" in file /etc/sysconfig/rhn/osad.conf
4. Stop the Spacewalk Proxy services in the first Proxy server listed in 'serverURL' by running "rhn-proxy stop" in that Spacewalk Proxy.
5. Start 'osad' service.

Actual results:
'osad' tries to connect to the first Spacewalk Proxy defined in 'serverURL' only.
After failing, 'osad' does not try to connect to any other Spacewalk Proxy server listed in 'serverURL' nor to the Spacewalk Server.
So 'osad' tries to connect to the first server in 'serverURL' only despite failover mode being enabled.

Expected results:
After failing, 'osad' iterates through the list of servers in 'serverURL' until it successfully connects to one of them:
- osad tries to connect to proxy1.
- if that fails, osad tries to connect to proxy2.
- if that fails, osad tries to connect to proxy3.
- if that fails, osad tries to connect to Spacewalk Server.
If 'osad' is not connected to the first server in 'serverURL' and such server becomes available, osad reconnects to it within 5 minutes.

Comment 1 Gennadii Altukhov 2016-02-11 09:06:23 UTC
Taking...

Comment 2 Gennadii Altukhov 2016-02-12 14:46:37 UTC
spacewalk.git:

2e4323f182af19a96021815ea832afcdee8bca33

Comment 3 Tomáš Kašpárek 2016-06-16 08:06:50 UTC
Spacewalk 2.5 was released.

Comment 4 Eric Herget 2017-09-28 18:09:59 UTC
This BZ closed some time during 2.5, 2.6 or 2.7.  Adding to 2.7 tracking bug.