JRahm
Aug 29, 2005Admin
Allowing only active connections when member is disabled
Is there a way within an iRule to mandate that disabled members receive active connections only, and persistent and new connections are killed? This way the thin client in the field will requery from the GSS for a new address.
My attempt around the problem (below) does what I want it to at a pool level, but Session Directory works around me to still get new connections that *exist* in the Session Directory table back to the server that has been disabled for maintenance. I would like to *force down* a node without having to manually configure each one.
when CLIENT_ACCEPTED {
if { [active_members pool1] == 0 } {
log "Active members equals 0, using alternate pool"
use pool2
if { ([IP::client_addr] eq "10.100.100.100") || ([IP::client_addr] eq "10.100.100.101") } {
log "Not persisting [IP::client_addr]"
persist none
} else { persist source_addr }
}
}
This eliminates our GSS devices from persisting, and selects another pool if the active members are zero.
For learning sake, in the above rule I manually entered the alternate pool, but I'd like to round-robin the remaining pools on the BigIP when one is down for maintenance on the *use pool * line. Would this work:
class other_pools {
"0 pool2"
"1 pool3"
"2 pool4"
"3 pool5"
}
set getpool 0
for($getpool = 0; $getpool <= 3; $getpool++) {
use pool [findclass $getpool $::other_pools " "]
if {$getpool = 3 } {
set getpool = 0
}
}