Forum Discussion
Jon_Strabala_46
Dec 16, 2009Nimbostratus
I imagine in the latter case I could try a test like the following:
when RULE_INIT {
set ::g_prod_var 113
log local0. "RULE_INIT production_rule initialized: $::g_prod_var"
}
when CLIENT_ACCEPTED {
log local0. "CLIENT_ACCEPTED VirtualServer [virtual] from [IP::client_addr]:[TCP::client_port]: to [IP::local_addr]:[TCP::client_port]"
}
when HTTP_REQUEST {
if { [IP::client_addr] == "174.47.71.225" } {
Send request to a new virtual server "test_irule", for iRULE testing
log local0. "HTTP_REQUEST switching from VirtualServer [virtual] to VirtualServer \"iruletest\""
virtual iruletest
}
log local0. "HTTP_REQUEST production_rule on VirtualServer [virtual]"
do something ....
}
However looking at the help on "virtual" I see that is says "In order to make this functionality work, one must precede the virtual command with an LB::reselect command if a pool member has already been selected" - how do I know if a pool member has been selected, does it hurt to blindly just stick the "LB:reselect" in (as you can tell I do not know too much about the F5 configuration).
Jon