Bug 1598491

Summary: RFE: HAProxy does not resolve IPv6 resolvable hostnames in the backend section
Product: Red Hat Enterprise Linux 7 Reporter: Robert Scheck <redhat-bugzilla>
Component: haproxyAssignee: Ryan O'Hara <rohara>
Status: CLOSED ERRATA QA Contact: Brandon Perkins <bperkins>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.5CC: aherr, cfeist, pbarta, redhat-bugzilla, robert.scheck, rohara, sababu
Target Milestone: rcKeywords: FutureFeature
Target Release: 7.6   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: haproxy-1.5.18-8.el7 Doc Type: Bug Fix
Doc Text:
Cause: HAProxy was not using getaddrinfo() to resolve IPv6 hostnames. Consequence: When a backend server was referred to by hostname and resovled to an IPv6 address, HAProxy would alert the user that the server had an invalid address. This would result in the server not being used. Fix: Compile HAProxy with th USE_GETADDRINFO flag, which will cause HAProxy to use getaddrinfo() to resolve hostnames instead of gethostbyname(). Result: HAProxy will now resolve all valid hostnames at runtime.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 11:49:09 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:
Attachments:
Description Flags
Patch suggestion for haproxy.spec
redhat-bugzilla: review? (rohara)
Script with steps to reproduce the issue redhat-bugzilla: review? (rohara)

Description Robert Scheck 2018-07-05 15:49:42 UTC
Description of problem:
HAProxy does not resolve IPv6 resolvable hostnames in backend section.

Version-Release number of selected component (if applicable):
haproxy-1.5.18-7.el7

How reproducible:
If just provide a hostname in one of the backend sections, which resolves
to an IPv6 address, HAProxy fails to resolve these hostnames.

Actual results:
HAProxy does not resolve IPv6 resolvable hostnames in the backend section.

Expected results:
HAProxy resolves IPv6 resolvable hostnames in the backend section.

Additional info:
This is not a duplicate of bug #1575585, this is the same issue like for
the SCL-based rh-haproxy18, but just for haproxy-1.5.18-7.el7 (non-SCL).

Comment 3 Robert Scheck 2018-07-05 15:52:12 UTC
Created attachment 1456794 [details]
Patch suggestion for haproxy.spec

Comment 4 Robert Scheck 2018-07-05 15:56:52 UTC
Cross-filed case 02135416 in the Red Hat customer portal.

Comment 10 Robert Scheck 2018-07-20 07:11:29 UTC
Ryan, what would you like to know?

Comment 11 Petr Barta 2018-07-20 07:18:51 UTC
Hello Robert,
  I've updated the info about requested data in the case which is linked to this BZ, I believe you should have it in your email now. Anyway, repasting here, as it seems like you are monitoring the BZ directly as well:


-------------------------------------
I will need config files and output from haproxy showing what does/does not work. While I agree that we should be compiling with USE_GETADDRINFO and it is a fix I put into Fedora, we should not compare haproxy-1.5 to haproxy-1.8 and they are very different in many regards, including some features that resolve backend sevrer hostnames at runtime, etc.

We need output and config files so that we are sure we are fixing the core issue here (ie. something we can test).
-------------------------------------

I understand it that complete haproxy config will be needed, steps to reproduce the issue, and log from haproxy covering the time when the issue is reproduced. It would recommend to set the haproxy to debug mode for the time of the issue reproducer, to have more verbose info.

BR,
Petr

Comment 12 Robert Scheck 2018-07-20 07:21:17 UTC
Petr, thanks. Just saw the GSS WoC after I pressed "Save Changes". Already
working to get the requested information.

Comment 13 Ryan O'Hara 2018-07-20 15:16:40 UTC
(In reply to Robert Scheck from comment #10)
> Ryan, what would you like to know?

Steps to reproduce. In this case, a config file and output from haproxy showing any errors, etc. With that we have something to test/verify the the rebuild with USE_GETADDRINFO does indeed solve the problem. I'm confident it will fix the issue, but QA needs to test.

Comment 14 Robert Scheck 2018-07-20 18:47:38 UTC
Created attachment 1467560 [details]
Script with steps to reproduce the issue

Please let me know in case the steps are not good enough for QA or
if further information etc. are required.

Comment 19 errata-xmlrpc 2018-10-30 11:49:09 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-2018:3317