cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajesh Battala <rajesh.batt...@citrix.com>
Subject [ACS41][Merge] AWS Style HealthCheck for Netscaler
Date Wed, 30 Jan 2013 20:22:22 GMT
Hi All,

I had create the review request at https://reviews.apache.org/r/9165/
Please do review and let me know comments.
Entire working code is present/pushed  at https://github.com/rajesh-battala/asf-cloudstack-master/


Info about the functionality :

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.  Currently only one thread is created.
possible values UP, DOWN, UNKNOWN, BUSY, OUT OF SERVICE, GOING OUT OF SERVICE, DOWN WHEN GOING
OUT OF SERVICE

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