Forum Discussion
LTM Policy and iRule together
We have a customer that uses LTM policy because he need more friendly visibility than a iRule script acknowledgment, though, there are hard features that need to be done in iRules and it can cause some conflicts. I've been researching some way to work mixing Policy and LTM iRule and I don't know yet. Meanwhile, I created a semaphore variable in the policy rule and then check it in the iRule script whether to go on. If var not exists, iRule will do the job, otherwise, exit.
For example:
Policy with dynamic forwarding rules:
iRule with static treatment:
when HTTP_REQUEST {
if { [info exists disable_irule] } {
unset disable_irule
event disable all
return
}
}
What do you think about it? I did something unnecessary?
What is the best approach?1 Reply
Hi Cjunior,
Using LTM-Policies to set a TCL variables, which would then trigger a certain iRule script blocks will work and using
to check for its existence is ideal. But dont forget that these TCL variables are connection based, so make sure they will get an proper[info exist]
(as you did in your example).[unset]
Also keep in mind that
is connection based, so you have to make sure the connection is getting closed to reenable iRule processing again. You may also want to use LTM Policies to enable the event processing on each request by creating a TCL expression[event disable all]
.[event enable all]
Update: Removed misleading information
Cheers, Kai
Recent Discussions
Related Content
* 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