Forum Discussion
active_members change Virtual Serverstate
Hello,
I want to check the status of two pools in an iRule that is associated to a virtual server. The first pool is the application pool that is configured on the virtual server, the second pool is a pool used to load balance OCSP request toward our OCSP responders.
The irule is as follows :
when CLIENT_ACCEPTED {
if { [active_members [LB::server pool]] < 1 || [active_members pool-OCSP] < 1 } {
do something
} else {
do something else
}
}
What is weird is that when the pool-OSCP has available members and the application pool has no available members, the virtual server state will be displayed as "Up". It's quite disturbing... Any idea on how to force the virtual state server back to "Down" ?
Thanks
Antoine
4 Replies
- nitass
Employee
i understand it is by design.
sol6514: BIG-IP may not reflect the expected status for virtual servers that use iRules or HTTP classes to select a pool
http://support.f5.com/kb/en-us/solutions/public/6000/500/sol6514.html?sr=18068062[root@ve10:Active] config b virtual bar list virtual bar { snat automap pool foo destination 172.28.19.252:80 ip protocol 6 } [root@ve10:Active] config b pool foo|grep -i pool\ member +-> POOL MEMBER foo/200.200.200.101:80 inactive,down [root@ve10:Active] config snmpwalk -v 2c -c public localhost F5-BIGIP-LOCAL-MIB::ltmVsStatusAvailState.\"bar\" F5-BIGIP-LOCAL-MIB::ltmVsStatusAvailState."bar" = INTEGER: red(3) [root@ve10:Active] config [root@ve10:Active] config [root@ve10:Active] config [root@ve10:Active] config b rule myrule list rule myrule { when CLIENT_ACCEPTED { pool foo2 } } [root@ve10:Active] config b virtual bar rule myrule [root@ve10:Active] config b pool foo2|grep -i pool\ member +-> POOL MEMBER foo2/200.200.200.111:80 active,up [root@ve10:Active] config snmpwalk -v 2c -c public localhost F5-BIGIP-LOCAL-MIB::ltmVsStatusAvailState.\"bar\" F5-BIGIP-LOCAL-MIB::ltmVsStatusAvailState."bar" = INTEGER: green(1) - Antoine_80417
Nimbostratus
Thanks for your reply nitass and I agree with you, by design when you use the "pool" command in an iRule it changes the virtual server state. But in my case I'm not using the "pool" command, I'm only testing a pool state by using the "active_members" command. - Antoine_80417
Nimbostratus
Found a solution... I put the health monitor used in the OCSP pool on the nodes, and in my iRule I check the node state instead of the pool state :
when CLIENT_ACCEPTED {
set active_members_ocsp 0
if { [LB::status node "10.10.10.10" up] || [LB::status node "10.10.10.20" up] } {
set active_members_oscp 1
}
if { $active_members_ocsp > 0 && [active_members [LB::server pool]] > 0 } {
do something
} else {
do something else
}
} - dyobbs_25515
Nimbostratus
Antoine hi, were you able to force the VS down? what were your results on the last irule?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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