Bug 1372624 - Can't add a loadbalancer instance in RHUI 3 on RHEL 6 because the haproxy package isn't available
Summary: Can't add a loadbalancer instance in RHUI 3 on RHEL 6 because the haproxy pac...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Tools
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.0.0
Assignee: Patrick Creech
QA Contact: Vratislav Hutsky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-02 09:05 UTC by Radek Bíba
Modified: 2017-03-01 22:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-01 22:12:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Output from rhui-manager (19.98 KB, text/plain)
2016-09-14 06:49 UTC, Radek Bíba
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0367 0 normal SHIPPED_LIVE Red Hat Update Infrastructure 3.0 Release 2017-03-02 03:05:22 UTC

Description Radek Bíba 2016-09-02 09:05:21 UTC
Description of problem:
One of the steps in the configuration of a loadbalancer instance is the installation of the haproxy package on the instance. In RHEL 6, this step fails, and consequently, the loadbalancer instance doesn't get fully set up.

At first, only the following error message appears in rhui-manager:

sudo() received nonzero return code 4 while executing!

Requested: puppet agent --onetime --detailed-exitcodes --no-daemonize --no-usecacheonfailure
Executed: sudo -S -p 'sudo password:'  /bin/bash -l -c "puppet agent --onetime --detailed-exitcodes --no-daemonize --no-usecacheonfailure"

=================================================================== Standard output ===================================================================

Error: No matching Packages to list
Error: No matching Packages to list

=======================================================================================================================================================

However, /var/log/messages on the loadbalancer node contains this detailed error message:

DATE TIME HOST puppet-agent[PID]: Execution of '/usr/bin/yum -d 0 -e 0 -y list haproxy' returned 1: Error: No matching Packages to list

The root cause is, "haproxy" isn't available in any of the repos configured in the /etc/yum.repos.d/redhat-rhui.repo file, which is created by rh-amazon-rhui-client-2.2.127-1.el6.noarch. If I subscribe the loadbalancer instance to RHSM and enable the "rhel-lb-for-rhel-6-server-rpms" repo, the "haproxy" package becomes available, and the loadbalancer node can be added and fully set up. Please add a suitable "loadbalancer" repo configuration to the redhat-rhui.repo file.

Comment 2 Patrick Creech 2016-09-13 19:52:11 UTC
While rh-amazon-rhui-client is specific to the amazon environment, this is an issue on the el6 haproxy instances in rhui.  

The solution here is to enable the "rhel-lb-for-rhel-6-server-rpms" repo for any EL6 server intended to be used as an haproxy server

We probably need to ensure this is documented for the EL6 installation docs.

Comment 3 Radek Bíba 2016-09-14 06:42:57 UTC
Agreed.

There's one other thing, though. As I wrote in comment 0, the LB instance can be added if the haproxy package is available to it, *but*, only if no CDS is yet known to RHUI. If a CDS is already known while the LB is being added, or when a CDS is being added after an LB has been added, the following failure occurs:

Error: /Stage[main]/Haproxy::Service/Service[haproxy]: Failed to call refresh: Could not restart Service[haproxy]: Execution of '/sbin/service haproxy restart' returned 1: [ALERT] 257/022753 (5203) : parsing [/etc/haproxy/haproxy.cfg:30] : 'server' expects <name> and <addr>[:<port>] as arguments.
[ALERT] 257/022753 (5203) : parsing [/etc/haproxy/haproxy.cfg:37] : 'server' expects <name> and <addr>[:<port>] as arguments.
[ALERT] 257/022753 (5203) : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
[ALERT] 257/022753 (5203) : Fatal errors found in configuration.
Errors in configuration file, check with haproxy check.

This is line 37 in haproxy.cfg:

server #<YAML::PrivateType:0x7f467653a2a0> #<YAML::PrivateType:0x7f467653a2a0>:443 check

(Should've been created as: server cds01.example.com cds01.example.com:443 check)

I'll attach the full error message from rhui-manager.

Comment 4 Radek Bíba 2016-09-14 06:49:03 UTC
Created attachment 1200733 [details]
Output from rhui-manager

This is what I entered in rhui-manager and got in response to that. Note that the LB was originally created while no CDS was defined. Everything in the output comes from the moment I tried to add a CDS, and the CDS was to be included in the LB configuration.

Comment 5 Radek Bíba 2016-09-22 10:18:32 UTC
The "other thing" is indeed fixed in RHUI-3.0-RHEL-6-20160921.n.0 -- I can successfully add a CDS instance after defining an HA Proxy instance, and haproxy.conf gets updated with the information about CDS.

I'll notify David and Les regarding rh-amazon-rhui-client and the docs respectively.

Thanks Patrick!

Comment 6 errata-xmlrpc 2017-03-01 22:12:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0367


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