Forum Discussion
Dec 15, 2008
Can I use iControl to force disconnect of all tcp sessions on a pool member?
We are planning some simple HA for two databases, Node A and Node B (active/standby). When we take one DB node offline we'd like to be able to forcibly reset any active tcp connections that are connected to that node. This should at a minimum clear the connections off the bigIP. It would be nice to reset the connections on both the client and server side so we can be sure that neither side has any lingering connections.
A simple setup would be as follows:
Node A has PGA priority of 5
Node B has PGA priority of 1
No traffic should go to Node B while Node A is active. For example, Node B is either kept 'forced offline' state or PGA turned on with no monitors attached to the node or pool.
The steps for a manual connection failure to Node B would be as follows:
1) shut down DB service on Node A
2) put Node A into forced down mode (which only allows active connections)
3) force disconnect of any active connections to node A
4) bring up node B
I'd like to trigger this via iControl. Most steps seem pretty trivial except for step 3 - how to force the disconnect of any active tcp sessions that are connected to node A after node A has been disabled.
Our first go round is a manual failover soln. Once we've determined potential monitor points we may re-visit to automate failure via irule.
thanks!
andy
- Hamish_Marson_3
Nimbostratus
I believe if you set the member monitor state ($poolMember->set_monitor_state() ) to 'STATE_DISABLED' that it should achieve what you're looking for. - Nicolas_Menant
Employee
i don't think it will work. - Thanks- I think even Forced Down allows Active connections. Ideally I'd like to drop all active connections as well. I guess there isn't a node/pool member state that does this. perhaps, if possible, i'd have to iterate through the active connections and send a disconnect of some sort. for example, a tcp reset.
- Don_MacVittie_1Historic F5 AccountYou might try the get_monitor_association() to get the monitor, and use the set_instance_state() method of the Monitor Interface to set the pool to set the state to disabled. IIRC, that will completely clear connections.
- John_Gruber_432Historic F5 AccountI just got a request to work on this same problem myself.... I referenced
- That's a step in the right direction, but I don't want to force the whole pool offline- just a single pool member. If that's not possible at least this is something to work with.
- John_Gruber_432Historic F5 AccountI just tested a solutions... You can indeed:
- CharlesCS
Cirrus
Posted By jgruber on 12/26/2008 1:11 PM
- MR_RJ
Cirrus
Im looking for a solution for this as well. Isnt it a bit strange that it isnt available in the web gui? - Don_MacVittie_1Historic F5 AccountIf you use the calls on this page: http://devcentral.f5.com/wiki/default.aspx/iControl/LocalLB__PoolMember.html set_session_enabled_state will allow you to stop new incoming connections, while set_monitor_status will allow you to "force down" the node by setting the monitor to report that it is currently down. This should end all connections to it.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects