Forum Discussion
Matt_Breedlove_
Jun 25, 2014Nimbostratus
Simple RULE_INIT log irule. Only 1 log, but 4 shown every time?
Testing some logic in an irule that has only the RULE_INIT event declared. There is only one log command, but I see 4 duplicate logs in the LTM log? How can this be?
irule
when RULE_INIT {
s...
- Jun 25, 2014
Clustered Multiprocessing (CMP) is the answer.
http://support.f5.com/kb/en-us/solutions/public/14000/200/sol14248.html
The rule is initialized by all TMM processes, and you have four.
Kevin_Stewart
Jun 25, 2014Employee
RULE_INIT is triggered for every CPU, so 4 tmm's = 4 RULE_INITs. You can get around this by "pinning" your code to a single tmm:
when RULE_INIT {
if { [TMM::cmp_unit] == 0 } {
set httphost "ie-ng-services-ConFiguRation.acme.com"
log local0. "bomb [string tolower [lindex [split [lindex [split $httphost "-"] end] "."] end-2]]"
}
}
I'd caution not to do this for anything other than local testing. The fact that RULE_INIT is triggered for every tmm means that any (global) variables assigned therein will be accessible to every tmm.
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