Forum Discussion
JRahm
Admin
Aug 29, 2005Allowing 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
}
}
- JRahm
Admin
I guess I was making it too complicating, this achieves my goals:when CLIENT_ACCEPTED { if { ([IP::client_addr] eq "10.10.192.8") || ([IP::client_addr] eq "10.20.192.8") } { persist none } if { [active_members stl-ac24-pool] == 0 } { reject } }
- Colin_Walker_12Historic F5 AccountWell, as far as setting node states, that's something that's better handled by iControl. Click here
when CLIENT_ACCEPTED { if { ([IP::client_addr] eq "10.10.192.8") || ([IP::client_addr] eq "10.20.192.8") } { persist none } if { [active_members stl-ac24-pool] == 0 } { discard } }
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