Forum Discussion
pjcampbell_7243
Cirrus
Apr 30, 2013Specifying pool in iRule failing
I have an iRule here and when I hit up the VIP that has this rule applied, it does not seem to work at all:
when CLIENT_ACCEPTED {
Save default pool name
set def...
nitass
Employee
Apr 30, 2013how did you know it goes to default pool? if there are number of requests (e.g. object inside web page), only the one containing "test=64" in request will go to test-temp pool.
[root@ve10:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.252:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when CLIENT_ACCEPTED {
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
set host [HTTP::host]
set uri [HTTP::uri]
if { [HTTP::uri] ends_with "test=64" }{
pool test-temp
} elseif { [HTTP::uri] contains "test=64&" }{
pool test-temp
} else {
pool $default_pool
}
}
when HTTP_RESPONSE {
log local0. "client [IP::client_addr]:[TCP::client_port] | host $host | uri $uri | pool [LB::server pool] | server [IP::server_addr]:[TCP::server_port] | status [HTTP::status]"
}
}
[root@ve10:Active] config b pool test-temp list
pool test-temp {
members 200.200.200.111:80 {}
}
log
[root@ve10:Active] config tail -f /var/log/ltm
May 1 09:14:38 local/tmm info tmm[4950]: Rule myrule : client 172.28.20.17:60149 | host my.vip.ip.here | uri /test.txt?test=64 | pool test-temp | server 200.200.200.111:80 | status 404
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