incubator-cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajesh Battala" <rajesh.batt...@citrix.com>
Subject Re: Review Request: AWS Style HealthCheck feature BugID : 664
Date Tue, 05 Mar 2013 18:52:48 GMT


> On March 1, 2013, 4:06 p.m., Vijay Venkatachalam wrote:
> > plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java,
line 481
> > <https://reviews.apache.org/r/9165/diff/3/?file=263578#file263578line481>
> >
> >     Monitor name required to be passed here.

monitor name is not required as the api am using will retrive the state of the service which
had resulted because of the monitors assigned to it. 
 get_svrstate

from Nitro API Doc, 

public java.lang.String get_svrstate() throws java.lang.Exception
     The state of the service.
     Possible values = UP, DOWN, UNKNOWN, BUSY, OUT OF SERVICE, GOING OUT OF SERVICE, DOWN
WHEN GOING OUT OF SERVICE, NS_EMPTY_STR
     


> On March 1, 2013, 4:06 p.m., Vijay Venkatachalam wrote:
> > api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateLBHealthCheckPolicyCmd.java,
line 68
> > <https://reviews.apache.org/r/9165/diff/3/?file=263567#file263567line68>
> >
> >     IMPORTANT: Do we support float? It is safer to keep it seconds or blindly follow
AWS can keep it float.
> >     
> >     Check http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/ConfigureHealthCheck.html

NetScaler is accepting values in Integer.
I had modified the description to sec specifying the limits.

>From NetScaler doc, 

interval<Integer>

The frequency at which the probe is sent to a service.The interval should be greater than
the response timeout. The minimum value is 20 msec.The maximum value is 20940000 in milliseconds
, 20940 in seconds and 349 in minutes.
Default value: 5
Minimum value = 1
Maximum value = 20940000

units3<String>

monitor interval units.
Default value: NSTMUNT_SEC
Possible values = SEC, MSEC, MIN


> On March 1, 2013, 4:06 p.m., Vijay Venkatachalam wrote:
> > plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java,
line 552
> > <https://reviews.apache.org/r/9165/diff/3/?file=263578#file263578line552>
> >
> >     Better to loop here rather than passing fixed index zero

Currently its restricted to support only one Monitor. 
If user tries to create another monitor, error will be throw at the api level.

Fixing according to the comment to support multiple health check police in future


> On March 1, 2013, 4:06 p.m., Vijay Venkatachalam wrote:
> > plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java,
line 611
> > <https://reviews.apache.org/r/9165/diff/3/?file=263578#file263578line611>
> >
> >     nsMonitorExist() function can be called in line 552

Am checking existing of the monitor in addmonitor method.


> On March 1, 2013, 4:06 p.m., Vijay Venkatachalam wrote:
> > plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java,
line 612
> > <https://reviews.apache.org/r/9165/diff/3/?file=263578#file263578line612>
> >
> >     IMPORTANT: Deleting a monitor in create path?

that code will check, if the received LB Rule is not having healthchecks but in NS there are
any monitor created by CS then we delete it. 


> On March 1, 2013, 4:06 p.m., Vijay Venkatachalam wrote:
> > plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java,
line 1373
> > <https://reviews.apache.org/r/9165/diff/3/?file=263578#file263578line1373>
> >
> >     IMPORTANT: NS_NO_SERVICE can never be thrown while checking for monitor by NetScaler

Was following how other methods were handling exceptions, Now removed


> On March 1, 2013, 4:06 p.m., Vijay Venkatachalam wrote:
> > plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java,
line 1651
> > <https://reviews.apache.org/r/9165/diff/3/?file=263578#file263578line1651>
> >
> >     IMPORTANT: The units in netscaler and CS done match, cannot set directly. check
"man add monitor" or the NS GUI

>From the API Doc, responsetimeout is Integer and units specified int the description is
sec's.

I was able to set responsetimeout from API

resptimeout<Integer>

The interval for which the system waits before it marks the probe as FAILED. The response
timeout should be less than the value specified in -interval parameter. The UDP-ECV monitor
type does not decide the probe failure by the response timeout. System considers the probe
successful for UDP-ECV monitor type, when the server response matches the criteria set by
the -send and -recv options or if the response is not received from the server (unless the
-reverse option is set to yes). Note: The -send option specifies what data is to be sent to
the server in the probe and -recv specifies the server response criteria for the probe to
succeed. The probe failure is caused by the ICMP port unreachable error from the service.
The minimum value is 10 msec. The maximum value is 20939000 in milliseconds , 20939 in seconds
and 348 in minutes.
Default value: 2
Minimum value = 1
Maximum value = 20939000

units4<String>

monitor response timeout units.
Default value: NSTMUNT_SEC
Possible values = SEC, MSEC, MIN


- Rajesh


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9165/#review17241
-----------------------------------------------------------


On March 1, 2013, 9:07 a.m., Rajesh Battala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9165/
> -----------------------------------------------------------
> 
> (Updated March 1, 2013, 9:07 a.m.)
> 
> 
> Review request for cloudstack and Vijay Venkatachalam.
> 
> 
> Description
> -------
> 
> Code Review for AWS Style Health Check Feature :
> Added API commands :
> 1. createLBHealthCheck
> 2. deleteLBHealthCheck
> 3. listLBHealthCheck
> 
> load_balancer_healthcheck_policies table will hold the data for healthcheck polices.

> 
> commands will take the lbrule id as mandatory param and execute the action.
> 1. createLBHealthCheck :
> ========================
>    LB ruleid is the mandatory param to the api.  Remaining params (pingpath, responstime,
request Healthcheck_interval, Healthy_thresshold, Unhealth_thresshold) have default values.
if not specified in the command.
>   It will create monitor (tcp/http) depending upon the LB protocol.
>   after creating the LB Monitor, it will bind the monitor to all the services present
in the LB rule.
>   NetScaler will take care of monitoring according to the monitor params.
>   Monitor name will be (Cloud-Mon-<LB IP>-<port>)
> 
>  Initially only one monitor is supported for an LB rule.
>  if createLBHealthCheck returns an error, it will cleanup the entry created in db.
>   
> 2. deleteLBHealthCheck:
> ========================
>    LB ruleid is the mandatory param to the api.
>    the command will first unbind all the services attached to it and then the monitor
will be deleted.
>    DB entry in load_balancer_healthcheck_policies will be deleted.
> 
> 3. listLBHealthChecks:
> ======================
>     LB ruleid is the mandatory param to the api.
> 	this command will list LB HealthChecks created on the LB rule.
> 
> LBHealthCheckManager:
> =====================
> A new field is introduce in the table load_balancer_vm_map (state of string type)
> 
> The task of the LBHealthCheckManager is at every period of time, it will fetch the service
status of LB rules and update them in the load_balancer_vm_map.
> The time interval fo the LBHealthManager can be configured from Global Settings(healthcheck.update.interval).
default value is 600 sec.  
> possible values UP, DOWN, UNKNOWN, BUSY, OUT OF SERVICE, GOING OUT OF SERVICE, DOWN WHEN
GOING OUT OF SERVICE
> 
> 
> This addresses bug https://issues.apache.org/jira/browse/CLOUDSTACK-664.
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/agent/api/routing/HealthCheckLBConfigAnswer.java PRE-CREATION 
>   api/src/com/cloud/agent/api/routing/HealthCheckLBConfigCommand.java PRE-CREATION 
>   api/src/com/cloud/agent/api/to/LoadBalancerTO.java 2d166ea 
>   api/src/com/cloud/event/EventTypes.java 0087edc 
>   api/src/com/cloud/network/element/LoadBalancingServiceProvider.java 879ea0e 
>   api/src/com/cloud/network/lb/LoadBalancingRule.java fb1d988 
>   api/src/com/cloud/network/lb/LoadBalancingRulesService.java 3743aae 
>   api/src/com/cloud/network/rules/HealthCheckPolicy.java PRE-CREATION 
>   api/src/org/apache/cloudstack/api/ApiConstants.java a26b468 
>   api/src/org/apache/cloudstack/api/ResponseGenerator.java 267238a 
>   api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateLBHealthCheckPolicyCmd.java
PRE-CREATION 
>   api/src/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLBHealthCheckPolicyCmd.java
PRE-CREATION 
>   api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLBHealthCheckPoliciesCmd.java
PRE-CREATION 
>   api/src/org/apache/cloudstack/api/response/LBHealthCheckPolicyResponse.java PRE-CREATION

>   api/src/org/apache/cloudstack/api/response/LBHealthCheckResponse.java PRE-CREATION

>   client/tomcatconf/commands.properties.in f03e8d5 
>   client/tomcatconf/components.xml.in 7d86a1c 
>   plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/element/ElasticLoadBalancerElement.java
abb36c3 
>   plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/ElasticLoadBalancerManagerImpl.java
81039d1 
>   plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
94c098e 
>   plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java
8f902df 
>   plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java
abea464 
>   server/src/com/cloud/api/ApiResponseHelper.java eafee8a 
>   server/src/com/cloud/configuration/Config.java 8a75a96 
>   server/src/com/cloud/network/ExternalLoadBalancerDeviceManager.java d979f07 
>   server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java bcefccc 
>   server/src/com/cloud/network/LBHealthCheckPolicyVO.java PRE-CREATION 
>   server/src/com/cloud/network/NetworkManagerImpl.java f527b73 
>   server/src/com/cloud/network/dao/LBHealthCheckPolicyDao.java PRE-CREATION 
>   server/src/com/cloud/network/dao/LBHealthCheckPolicyDaoImpl.java PRE-CREATION 
>   server/src/com/cloud/network/dao/LoadBalancerVMMapVO.java 8856993 
>   server/src/com/cloud/network/element/VirtualRouterElement.java 500d0b6 
>   server/src/com/cloud/network/lb/LBHealthCheckManager.java PRE-CREATION 
>   server/src/com/cloud/network/lb/LBHealthCheckManagerImpl.java PRE-CREATION 
>   server/src/com/cloud/network/lb/LoadBalancingRulesManager.java 9d7d22f 
>   server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java 531a428 
>   server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java 0e2eb63

>   server/src/com/cloud/server/ManagementServerImpl.java e80d48c 
>   setup/db/db/schema-410to420.sql 4349bd0 
> 
> Diff: https://reviews.apache.org/r/9165/diff/
> 
> 
> Testing
> -------
> 
> Testing Done:
> =============
> 
> 1. create LB rule of TCP protocol and assing instances, create lb healthcheck on lb rule.
A TCP monitor is created and it will binded to all the services.
> 2. create LB rule of HTTP protocol and assing instances, create lb healthcheck on lb
rule. HTTP monitor is created and it will binded to all the services.
> 3. create LB rule of HTTP protocol and assing instances, create lb healthcheck on lb
rule with pingpath and other params, HTTP monitor is created and it will binded to all the
services and its properties pingpath value will be present.
> 4.for an existing LB with an Monitor, add a new service to LB, monitor will be binded
to the newly added service.
> 5.for an existing LB with an Monitor, delete a service from LB, monitor will be unbinded
and service will be removed.
> 6.delete an monitor for LB rule, all the service binded to the monitor will be unbinded
and monitor will get removed.
> 7.delete LB rule, lb vserver will be deleted and the monitor will be deleted. 
> 8. list the LB rules giving the lb rule id, healtcheckpolicy created on the LB rule will
be returned. if not it will return empty list
> 9.Modify the healthcheck.update.interval to 1 min, at every one minute LBHealthCheckManager
will be updating the service state from the Netscaler.
> 
> 
> Thanks,
> 
> Rajesh Battala
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message