weizhouapache commented on code in PR #12596:
URL: https://github.com/apache/cloudstack/pull/12596#discussion_r3217860451
##########
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()[0] if bind_line else ""
Review Comment:
```suggestion
bind_token = bind_line.split()[:2] if bind_line else ""
```
##########
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()[0] if bind_line else ""
+ if bind_token != bindStr:
Review Comment:
```suggestion
if (" ").join(bind_token) != bindStr:
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]