Damans227 commented on code in PR #13315:
URL: https://github.com/apache/cloudstack/pull/13315#discussion_r4205081741
##########
server/src/main/java/com/cloud/network/router/NetworkHelperImpl.java:
##########
@@ -945,26 +945,8 @@ public boolean validateHAProxyLBRule(final
LoadBalancingRule rule) {
}
} else if
(LbStickinessMethod.StickinessMethodType.AppCookieBased.getName().equalsIgnoreCase(stickinessPolicy.getMethodName()))
{
- String length = null; // optional
- String holdTime = null; // optional
-
- for (final Pair<String, String> paramKV : paramsList) {
- final String key = paramKV.first();
- final String value = paramKV.second();
- if ("length".equalsIgnoreCase(key)) {
- length = value;
- }
- if ("holdtime".equalsIgnoreCase(key)) {
- holdTime = value;
- }
- }
-
- if (length != null && !containsOnlyNumbers(length, null)) {
- throw new
InvalidParameterValueException(String.format("Failed LB in validation rule id:
%s Cause: length is not a number: %s", rule.getLb(), length));
- }
- if (holdTime != null && !containsOnlyNumbers(holdTime,
timeEndChar) && !containsOnlyNumbers(holdTime, null)) {
- throw new
InvalidParameterValueException(String.format("Failed LB in validation rule id:
%s Cause: holdtime is not in timeformat: %s", rule.getLb(), holdTime));
- }
+ throw new InvalidParameterValueException(String.format("Failed
LB in validation rule: %s Cause: AppCookie based stickiness "
Review Comment:
makes sense, those rules already break the router config today so a clear
error on edit is better
--
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]