Forum Discussion
yquirion
Altostratus
Mar 05, 2018iRules and variable initialization
Hello,
I'm new to F5 BigIP and there is something I don't understand well regarding iRules and variables.
I have a VIP on which I have two iRules applied. The first one, the an iRule to log...
Hannes_Rapp_162
Nacreous
Mar 05, 2018Hello Yanick,
To solve this, you will need to use a different variable name in place of
script_name
in your second iRule, i.e. script_name_intranet
. When writing iRules, in particular if there are other developers involved, it's best to avoid generic variable names like "log", "time" etc. TMM does not want one variable name to be used twice. Although, this will not cause any issues before 2 iRules where a variable name overlaps are applied to the same Virtual Server. While you're at it, check if other iRules have specific-enough variable names to prevent the same issue in future.
Rgds,
- yquirionMar 06, 2018
Altostratus
Hi Hannes,
Thank you very much for the clarification. We were with another brand of load balancer before, using TCL script as well, and we never face that problem with those devices. Maybe they treat each TCL script as one and the variable are flushed after each script execution.
That being said, we will change our approach in developing iRules.
Thanks again and best regards, Yanick
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