Forum Discussion
Jim_M_172559
Nimbostratus
Jan 27, 2017How 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.
1 Reply
- Leonardo_Souza
Cirrocumulus
It looks correct to me, unless the pool member is down.
Can you try the node command?
https://devcentral.f5.com/wiki/irules.node.ashx
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
