weizhouapache commented on code in PR #13315:
URL: https://github.com/apache/cloudstack/pull/13315#discussion_r4325049162


##########
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 "
+                        + "(HAProxy 'appsession') is not supported on a 
Virtual Router, as this directive was removed in HAProxy 1.6", rule.getLb()));

Review Comment:
   appcookie has been deprecated by haproxy, but I am not sure if other 
solutions (network plugins) support it



-- 
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]

Reply via email to