Skip to content

Commit 9a312bd

Browse files
Update systemvm/debian/root/health_checks/haproxy_check.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent fc1cc74 commit 9a312bd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

systemvm/debian/root/health_checks/haproxy_check.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ def checkLoadBalance(haproxyData, haCfgSections):
5050
correct = False
5151

5252
bindStr = lbSec["sourceIp"] + ":" + formatPort(lbSec["sourcePortStart"], lbSec["sourcePortEnd"])
53-
if not cfgSection["bind"][0].startswith(bindStr):
53+
bind_line = cfgSection["bind"][0]
54+
bind_token = bind_line.split()[0] if bind_line else ""
55+
if bind_token != bindStr:
5456
print("Incorrect bind string found. Expected " + bindStr + " but found " + cfgSection["bind"][0] + ".")
5557
correct = False
5658

0 commit comments

Comments
 (0)