fmaximus commented on a change in pull request #2109: CLOUDSTACK-9922 Unable to
use 8081 port for Load balancing
URL: https://github.com/apache/cloudstack/pull/2109#discussion_r117295093
##########
File path: server/src/com/cloud/network/element/VirtualRouterElement.java
##########
@@ -336,8 +337,9 @@ private static boolean containsOnlyNumbers(final String
str, final String endCha
public static boolean validateHAProxyLBRule(final LoadBalancingRule rule) {
final String timeEndChar = "dhms";
- if (rule.getSourcePortStart() == NetUtils.HAPROXY_STATS_PORT) {
- s_logger.debug("Can't create LB on port 8081, haproxy is listening
for LB stats on this port");
+ if (rule.getSourcePortStart() ==port.value() ) {
+
+ s_logger.debug("Can't create LB on port "+port.value()+", haproxy
is listening for LB stats on this port");
Review comment:
As string concatenation is more expensive,
please surround with `if(s_logger.isDebugEnabled()) {}`
Use spaces around +
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services