Bug 1943869
| Summary: | Provide e.g. /etc/haproxy/conf.d directory and use it in haproxy.service | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Robert Scheck <redhat-bugzilla> | |
| Component: | haproxy | Assignee: | Ryan O'Hara <rohara> | |
| Status: | CLOSED ERRATA | QA Contact: | Brandon Perkins <bperkins> | |
| Severity: | high | Docs Contact: | ||
| Priority: | low | |||
| Version: | 8.3 | CC: | arawal, bperkins, jmaxwell, nimsharm, robert.scheck, rohara, sferguso | |
| Target Milestone: | rc | Keywords: | Triaged | |
| Target Release: | 8.5 | Flags: | pm-rhel:
mirror+
|
|
| Hardware: | x86_64 | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | haproxy-1.8.27-5.el8 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2093482 2093483 (view as bug list) | Environment: | ||
| Last Closed: | 2022-11-08 09:51:38 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: | ||||
| Bug Blocks: | 2093482, 2093483 | |||
|
Description
Robert Scheck
2021-03-28 00:50:01 UTC
Cross-filed case 02903748 at the Red Hat customer portal. Hi, Team, We have got around 10 support cases from customer to know if we can implemented it for RHEL 8.6 or 8.7 (and 9). Kindly check and let us know if it feasible. Here are some initial findings: # rpm -q haproxy haproxy-2.4.7-2.el9_0.x86_64 Created /etc/haproxy/conf.d directory and populated with two config files: 01-haproxy.cfg (contains the frontend declaration) and 02-haproxy.cfg (contains the backend declaration). Note that the frontend references the default backend which is parsed *after* being referenced (parsing is done in lexical order or file names in conf.d directory). The global and default sections remain in /etc/haproxy/haproxy.cfg file. We can test the configuration for validity by running: # haproxy -f /etc/haproxy/haproxy.cfg -f /etc/haproxy/conf.d/ -c Configuration file is valid Reversing the order (ie. putting the backend in 01-haproxy.cfg and the frontend in 02-haproxy.cfg) also works, as expected. Having an empty conf.d directory also works, which is important as to not break existing, single file configurations. Some things to be aware of: - haproxy will only parse non-hidden files that end in "*.cfg" - haproxy will parse files in the conf.d directory in lexical order - haproxy will issue an alert if a frontend and/or backend is redeclared (ie. same frontend/backend name defined multiple times across files) - haproxy will issue an alert if globals and/or defaults section is redefined Note that this behavior has only been tested for haproxy-2.4 in RHEL9. It is possible that RHEL8 (which contains haproxy-1.8) may behave differently, specifically with regards to yet to be defined/parsed backends that are referenced earlier in parsing. Seems like this is feasible for RHEL9, but this BZ is open against RHEL8. (In reply to Ryan O'Hara from comment #13) > Seems like this is feasible for RHEL9, but this BZ is open against RHEL8. I'm the initial reporter. RHEL 9 is absolutely fine, but ideally also RHEL 8 (especially as this report is already 1+ years old). It appears that haproxy-1.8.27 in RHEL8 behaves the same as described in comment #13. We will need a separate BZ (clone) for RHEL9. I will need to work on upstream changes next, but I seriously doubt the will backport this to anything beyond 2.4 release. Why is it unlikely that the same change gets also applied for RHEL 8 (haproxy 1.8.x)? According to your comment #13, it doesn't break existing setups. Thank you! May I ask why haproxy-1.8.27-5.el8 doesn't show up at https://git.centos.org/rpms/haproxy/commits/c8s? As cheerfully answered by CEE/GSS, the commit shows meanwhile up as https://git.centos.org/rpms/haproxy/c/cecc5d35e963d24cebea4d536f76cbe30bda0828?branch=c8s - thank you! :) FEDORA-EPEL-2022-c55b6f81ff has been pushed to the Fedora EPEL 7 stable repository. If problem still persists, please make note of it in this bug report. 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 (haproxy bug fix and enhancement update), 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-2022:7625 |