Forum Discussion
ML_108504
May 11, 2012Nimbostratus
Most efficient way to re-prioritize a virtual server's iRules?
Hi folks,
I'm writing a powershell script to add and remove a maintenance page redirect iRule to the top of a given virtual server's iRule list (TMOS versions 9.4.x and 10.x). Any given virtual se...
George_Watkins_
May 12, 2012Historic F5 Account
Yes, the priorities that are returned from iControl are the GUI orderings, which are different from priorities defined in an iRule. Both determine the order of execution, but the Gui order is only used to resolve equal priorities in multiple iRules. The iRules priority command that I am referencing changes the internal priority in which the iRules are executed and takes precedence over the GUI ordering.
Since you don't have any priority defined in the iRule code, we can assumed that all the iRules have an equal priority of 500 therefore they'll fallback to the GUI ordering (the 1,2,3, etc. you're seeing in iControl) that you are seeing in iControl. If however you add "priority 400" to the top of any iRule and then place it at the bottom of the list in the GUI, it will still be executed first because it has a higher internal priority. The other iRules that still have a default (and equal) priority they will execute their events in the GUI order after each of the priority 400 iRule's events are completed.
Likewise, if an iRule with priority 900 is at the top of the list, it will still be executed last if there are no lower priority rules.
If you have a desired order for all your iRules, you can add priorities to the top of all of them, then when they're added to the GUI it won't matter what order they are in because they'll always fire in the right order. I apologize if I just confused you more,
-George
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