diff --git a/systemvm/debian/root/health_checks/haproxy_check.py b/systemvm/debian/root/health_checks/haproxy_check.py index c1db51e440c2..56a33345ee9f 100644 --- a/systemvm/debian/root/health_checks/haproxy_check.py +++ b/systemvm/debian/root/health_checks/haproxy_check.py @@ -50,7 +50,9 @@ def checkLoadBalance(haproxyData, haCfgSections): correct = False bindStr = lbSec["sourceIp"] + ":" + formatPort(lbSec["sourcePortStart"], lbSec["sourcePortEnd"]) - if cfgSection["bind"][0] != bindStr: + bind_line = cfgSection["bind"][0] + bind_token = bind_line.split()[:2] if bind_line else "" + if (" ").join(bind_token) != bindStr: print("Incorrect bind string found. Expected " + bindStr + " but found " + cfgSection["bind"][0] + ".") correct = False