Forum Discussion

Antoine_80417's avatar
Antoine_80417
Icon for Nimbostratus rankNimbostratus
May 27, 2013

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

  • 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)
    
  • 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.
  • 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

     

    }

     

    }
  • Antoine hi, were you able to force the VS down? what were your results on the last irule?