Forum Discussion
ML_108504
Nimbostratus
Apr 13, 2009iRule Editor can't find default_pool
Hi folks, I'm experimenting with some simple iRules (I thought) from devcentral examples. When I check the following iRule in the Editor it complains with:
line 5: [can't find pool] [pool defa...
hoolio
Cirrostratus
Apr 14, 2009You can get the default pool configured on the VIP using LB::server pool. You'll want to do this before the pool has been selected on the TCP connection, so run LB::server in CLIENT_ACCEPTED:
when CLIENT_ACCEPTED {
Save the name of the default pool
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
if { [matchclass [string tolower [HTTP::header User-Agent]] contains $::bots] } {
pool p_PUB_botfarm
} else {
pool $default_pool
}
}
Denny, I don't think removing the else clause will have the desired result. I don't think a second HTTP request on the existing HTTP connection from a non-bots request would go to the default pool. In general, it's a good practice to explicitly specify a pool for all cases if you do it for any case.
Aaron
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