Jim_M_172559
Jan 27, 2017Nimbostratus
How can I set a pool and member from within an iRule?
I'm having trouble choosing a pool from an iRule. I've tried many combinations. Here's one, stripped down but with some debugging, that I think should work but doesn't:
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/test/" } {
pool testpool member 10.10.10.10 443
log local0. "set pool to testpool, member to 10.10.10.10 443"
}
}
when LB_SELECTED {
log local0. "server [LB::server addr] pool [LB::server pool]"
}
when LB_FAILED {
log local0. "server [LB::server addr] pool [LB::server pool]"
}
when SERVER_CONNECTED {
log local0. "server [LB::server addr] pool [LB::server pool]"
}
The log message from within the URI match appears, but every log message after that shows the default pool and one of the default pool members.