Forum Discussion
Wil_Schultz_101
Nimbostratus
Jul 02, 2007My iRule stopped working?!
I've got an irule that (to the best of my knowledge anyway) has been working for quite some time, for some strange reason part of it stopped working yesterday. Here is what it looks like:
when...
Wil_Schultz_101
Nimbostratus
Jul 03, 2007Posted By wschultz on 07/02/2007 4:28 PM
Posted By wschultz on 07/02/2007 4:20 PM
Interesting.... I could have sworn that this worked in the past.
So, I suppose if I wrap the rest in an elseif it will work.
Yup, looks okay like this:
when HTTP_REQUEST {
if { [matchclass [IP::remote_addr] equals $::private_net] } {
use pool my_pool
}
elseif { [HTTP::uri] starts_with "/" } {
switch -glob [string tolower [HTTP::uri]] {
}
default {
pool myother_pool
}
}
}
}Okay, so I might be crazy but I definitely tested this rule last night and it worked great.
Yet again this morning the irule stopped working?!
What is happening is when I hit the VIP from $::private_net I am being send to myother_pool instead of mypool.
I guess I could make it something like below, but I'm perplexed as to why my rule will work at some times while not at others. Am I experiencing expected behavior?
when HTTP_REQUEST {
if { [matchclass [IP::remote_addr] equals $::private_net] } {
use pool my_pool
}
elseif {! [matchclass [IP::remote_addr] equals $::private_net] } {
switch -glob [string tolower [HTTP::uri]] {
}
default {
pool myother_pool
}
}
}
}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