VR: fix haproxy check when ssl offloading is configured#12596
VR: fix haproxy check when ssl offloading is configured#12596weizhouapache wants to merge 1 commit intoapache:4.22from
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.22 #12596 +/- ##
=========================================
Coverage 17.62% 17.62%
- Complexity 15664 15665 +1
=========================================
Files 5915 5915
Lines 531144 531171 +27
Branches 64930 64938 +8
=========================================
+ Hits 93591 93608 +17
- Misses 427015 427023 +8
- Partials 10538 10540 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 16713 |
|
@blueorangutan package |
|
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16715 |
|
@blueorangutan test |
|
@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-15403)
|
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #12591 by adjusting the SystemVM HAProxy advanced health check to tolerate additional bind options appended when SSL offloading is configured, avoiding false health check failures while keeping HAProxy config validation intact.
Changes:
- Relax
bindline matching inhaproxy_check.pyto acceptbind <ip:port> ...(with trailing options) rather than requiring an exact string match.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| bindStr = lbSec["sourceIp"] + ":" + formatPort(lbSec["sourcePortStart"], lbSec["sourcePortEnd"]) | ||
| if cfgSection["bind"][0] != bindStr: | ||
| if not cfgSection["bind"][0].startswith(bindStr): |
There was a problem hiding this comment.
Using startswith(bindStr) can incorrectly accept mismatched ports (e.g., expected 1.2.3.4:80 but config has 1.2.3.4:8000, which still starts with 1.2.3.4:80). To allow extra HAProxy bind options while keeping correctness, compare only the first whitespace-delimited token of the bind directive (or otherwise parse the address:port portion) instead of a raw prefix match.
| if not cfgSection["bind"][0].startswith(bindStr): | |
| bind_line = cfgSection["bind"][0] | |
| bind_token = bind_line.split()[0] if bind_line else "" | |
| if bind_token != bindStr: |
Description
This PR fixes #12591
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?