Forum Discussion

H_36692's avatar
Icon for Nimbostratus rankNimbostratus
Nov 10, 2010

NOT able to assign a 2nd iRule to a VS=> Error: Rule Priorities for virtual server must be unique

After I added an iRule into a virtual server (via the right click iRule property), I tried to add another iRule to the same virtual server and then got the attached error:



I then tried to edit the iRule and set the priority in the code as described in The same error always. Basically I cannot use iRule Editor to assign a second iRule to a virtual server



Is this a bug in iRule Editor or I did something wrong?



I would also like iRule Editor to allow renaming an iRule, so I do NOT have to recreate an iRule



Thanks, -Hua


2 Replies

  • Hi Hua,



    iControl enforces a restriction on adding multiple iRules with the same event priority. As the iRule Editor uses iControl to change the LTM config, it's subject to the same restriction. The LTM GUI doesn't have this restriction. I think the logic for this is that the GUI forces you to manually select the order of the iRules, so there's an implicit priority set. You can explicitly set priority for all events in a rule or individual events using the priority command. I like the idea of removing the iControl restriction and just adding the latest rule last. But that might not be a clean solution for every scenario.



    The latest version of the iRule editor allows you to load, edit and save the bigip.conf and bigip_base.conf files. You could load the bigip.conf, edit the iRule name (in all locations its referenced) and then save the config. To edit the iRule itself, you'd need to refresh the Editor pane.



  • The confusion is after I changed the iRule to add the priority in the code as in



    when RULE_INIT priority 888 {





    iRule Editor still does NOT allow assign the iRule to the virtual server




    Are you saying that at this moment I can only use iControl to add a 2nd or more iRules to a same virtual server, NOT iRule Editor?




    Thanks, -Hua