ClusterLabs/resource-agents — pull request #125 by spenneb (2012-08-17 08:28:13+00:00)
Title: Adding READDQUIESCENT Parameter to ldirectord

This parameter allows modifying the behavior of ldirectord for
quiescent servers. If set to "yes" non existing quiescent servers
will be readded to the kernel's lvs table with weight zero (default).
If set to "no" such servers will not be readded allowing manual removal
of such servers.

When starting ldirectord all real servers are added to the kernel lvs table.

Reason for the Parameter:
We are using LVS for some time now very successfully. Until now we just
used the ipvsadm command and no backend monitoring via tools like
ldirector.
Currently we have these requirements which may be fulfilled using
ipvsadm:
1. Adding and Removing realservers
2. Changing the weight of realservers

For technical reasons some applications have a persistance time of 8
hours. For maintenance we usually edit the weight of the corrensponding
realserver to 0 and wait for the persistant connections to time out over
night. Current users can still work for the day. In emergency situations
we remove the realserver immedietly and all persistant clients are
redirected to new real servers.

No we would like to move to ldirectord with backend monitoring. So far
we have tested and established the fact, that we can still use ipvsadm
to manually modify the weight of the real server. Ldirector apparently
does not mess with the weight as long as the state of the real server
does not change (becomes unavailable).

For maintenance we created a maintenance directory and set
"quiescent=yes" in Ldirectord. When putting a realserver in maintenance
mode we just create the appropiate file in the maintenance directory and
the Ldirectord sets the weight to 0. New connections will be delegated
to different realservers and the old persistant connections time out
over night.

Now the problem:
We can still remove the real server with ipvsadm manually. This would
ensure that even the persistant connections are dropped. Unfortunately
Ldirectord adds the server again to the virtual server with a weight of
0. The persistant connections therefore still go on.

Modifying the ldirector configuration file is possible but much more
complicated on a complex loadbalancer serving several hundred real
servers.

Therefore I modified the ldirectord to disable this behavior if the global value
READDQUIESCENT = "no"
If the entry is removed from the maintenance directory the realserver is added again by ldirectord.