Forum Discussion
Bubbagump_12531
Nimbostratus
Mar 20, 2013Master toggle and nested pools?
We have a need to have two sets of pools. An active and a passive group of pools. The idea our management has is that one pool will be active, the other passive, and we can deploy code to the passive...
Bubbagump_12531
Nimbostratus
Mar 21, 2013Ok, so I am not sure how global variables work in F5. How do I call $static::pool in other iRules and then what is the scope of that variable? So long as it is active under the VirtualServer will all iRules inherit/understand the value given to static::pool?
So my thinking is under the virtual server I have an iRule:
root@ve10:Active] config b rule GlobalSwitch list
rule GlobalSwitch {
when RULE_INIT {
set static::pool A
}
Then in say all of my 100 other various other iRules I can say?
when HTTP_REQUEST {
if { ([HTTP::host] matches "www.siteabc.com")} {
pool /Common/pool_Ruby_$static::pool
}
}
And they will inherit the value given in the above "GlobalSwitch" iRule?
Am I understanding correctly?
Do I even need to bind the global variable iRule to anything? This:
https://devcentral.f5.com/wiki/irules.RULE_INIT.ashx
leads me to believe that I just need to define it and not bind it to anything.
Thanks!
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