Forum Discussion
stucky101_88485
Mar 03, 2013Nimbostratus
Brent
I do understand the importance of priorities and I didn't mean to say they are arbitrary in general. I just felt that the P100 passed to the method was "arbitrary" considering that it had absolutely no impact on the actual priority.
The only thing it achieves is let me append the rule to begin with. Any number over 4 does the same thing.
The other statement you made is interesting.
My expectation would be that if you set priority 100 on a virtual with 5 rules, that the priority 100 iRule would become p5 (0 - 4 already existing)
Why would you expect that ? If I add a rule to a vip with a P100 and the rule itself has no priority set why would the API lower it to 5 ? Priorities are not dynamic.
They are either 500 (default) or anything I set so I don't see how you came to your conclusion.
As far as the other issue goes I still don't see how you achieve this without persisting the original rule list to disk. Once I enable a maint page it could be hours until I remove it again.
If I save the original list in a var called rule_list then I will have lost it the moment the script has executed.
If anything I'd imagine you save the original rules to a file and then have the script read it back whenever the maintenance is over.
I agree that this could be important one day and I'm curious now how you plan to achieve this using your idea.
Let's say you have a maint at 6pm that is scheduled till 10pm.
The idea would be to run a script that saves the original rules and replace them with one maintenance rule.
Then at 10pm you'd run it again to enable the original rules again but you'd have to read them back from somewhere, hence I thought you implied saving the entire config.
Sorry but am I missing something here ?