Forum Discussion
Raymond_Feng_97
Jul 04, 2006Historic F5 Account
bug report about tcl for bigipv9.2.3: at client_accept event can't read variable defind at rule_init event
Hi, Sir
What had been changed for bigip9.2.3 TCl? I found at client_accept event can't read variable defind at rule_init event. For example the below irules:
when RULE_INIT {
set aaa 100
log "-------- when rule_init----$aaa"
}
when CLIENT_ACCEPTED {
log "-------- when rule client_accepted $aaa"
use pool pool123
}
This irules can work in bigip v9.1.2, but at bigipv9.2.3 it will get error , ltm log is below:
Jul 4 17:45:17 tmm tmm[976]: 01220002:6: Rule : -------- when rule_init----100
Jul 4 17:46:38 tmm tmm[976]: 01220001:3: TCL error: Rule von_irules - can't read "aaa": no such variable while executing "log "-------- when rule client_accepted $aaa""
The same problem is for the global group variable , This must be BUG!! And this will cause our most irules can’t work right!
6 Replies
- Colin_Walker_12Historic F5 AccountHave you tried accessing the variable as $::aaa in the CLIENT_ACCEPTED event?
Variables set in the RULE_INIT event are treated as global variables, and this could likely be a syntax problem.
Colin - Raymond_Feng_97Historic F5 AccountActually, I just try some successful irules running under v9.1.1, then find these irules can't work under v9.2.3.
The problem is, neither the global group class nor the user defind variables at rule_init event can be used at any other events especially CLIENT_ACCEPTED OR LB_SELECTED. - Al_Carandang_11
Nimbostratus
I haven't used 9.1.1 but we have rules running in 9.2.3 which have no problems accessing variables defined in RULE_INIT. They do have to use the syntax $::variable instead of $variable though.
Likewise, the classes are referenced as $::classname even if they are defined as just classname.
-Al - Colin_Walker_12Historic F5 AccountLikewise I've had no problems accessing variables in 9.2.3 as of yet. Perhaps there's a more specific problem occuring?
Colin - Raymond_Feng_97Historic F5 Accountwell!!!
we must use $::variable instead of $variable for v9.2.3, then the problem won't come. - Colin_Walker_12Historic F5 AccountThat's what I was trying to say with my earlier post, by saying that they are treated as global variables. I'm sorry I didn't state things more clearly. :-/
Colin
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
