You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/12/01 16:53:58 UTC

[jira] [Commented] (CLOUDSTACK-9618) Load Balancer configuration page does not have "Source" method in the drop down list

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-9618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15712456#comment-15712456 ] 

ASF GitHub Bot commented on CLOUDSTACK-9618:
--------------------------------------------

Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1786#discussion_r90487461
  
    --- Diff: plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java ---
    @@ -260,7 +264,7 @@ public boolean applyLBRules(Network config, List<LoadBalancingRule> rules) throw
             Map<Capability, String> lbCapabilities = new HashMap<Capability, String>();
     
             // Specifies that the RoundRobin and Leastconn algorithms are supported for load balancing rules
    -        lbCapabilities.put(Capability.SupportedLBAlgorithms, "roundrobin,leastconn");
    +        lbCapabilities.put(Capability.SupportedLBAlgorithms, "roundrobin,leastconn,source");
    --- End diff --
    
    The list of strings declared on this line must be sync with the list used to validate the algorithm on line 237.  Therefore, please consider extracting this list to a constant `ImmutableSet<String>`, `SUPPORTED_ALGORITHMS` in order to ensure cohesion between declaration and validation.  With this change, the validateLBRule can be re-implemented as follows:
    
    ```java
    public boolean validateLBRule(Network network, LoadBalancingRule rule) {
        Preconditions.checkArgument(network != null, "validateLBRule requires a non-null network");
        Preconditions.checkArgument(rule != null, "validateLBRule requires a non-null rule");
    
        return (canHandle(network, Service.Lb)) : SUPPORTED_ALGORITHMS.contains(rule.getAlgorithm()) : true;
    }
    ```
    
    This line can be re-implemented as follows:
    
    ```java
    lbCapabilities.put(Capability.SupportedLBAlgorithms, Joiner.on(",").join(SUPPORTED_ALGORITHMS));
    ```


> Load Balancer configuration page does not have "Source" method in the drop down list
> ------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-9618
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9618
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>            Reporter: Nitin Kumar Maharana
>
> If we create an isolated network with NetScaler published service offering for Load balancing service, then the load balancing configuration UI does not show "Source" as one of the supported LB methods in the drop down list. It only shows "Round-Robin" and "LeastConnection" methods in the list. Howerver, It successfully creates LB rule with "Source" as the LB method using API.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)