nitin-maharana commented on a change in pull request #2031: CLOUDSTACK-8672 : 
NCC Integration with CloudStack
URL: https://github.com/apache/cloudstack/pull/2031#discussion_r122591220
 
 

 ##########
 File path: server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
 ##########
 @@ -2124,10 +2121,11 @@ public LoadBalancer 
updateLoadBalancerRule(UpdateLoadBalancerRuleCmd cmd) {
             throw new InvalidParameterValueException("Modifications in lb rule 
" + lbRuleId + " are not supported.");
         }
 
+        LoadBalancerVO tmplbVo = _lbDao.findById(lbRuleId);
         boolean success = _lbDao.update(lbRuleId, lb);
 
         // If algorithm is changed, have to reapply the lb config
-        if (algorithm != null) {
+        if ((algorithm!= null) && 
(tmplbVo.getAlgorithm().compareTo(algorithm)!=0)){
 
 Review comment:
   It does the same work, but there is one more check to avoid the case when 
the existing algorithm is same as the new algorithm(No need to apply again 
which is redundant). 
 
----------------------------------------------------------------
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

Reply via email to