Forum Discussion

Kousalya_Nachim's avatar
Kousalya_Nachim
Icon for Nimbostratus rankNimbostratus
May 26, 2016

Does irules are seperated by Partition or it is common for all partitions

I tried creating an irule in a particular partition. While listing the irules it is shown in all the partitions. How can I check to which partition the irule belongs??

 

  • Open the iRule in question, and you will see the following headers:

    Properties
    
    Name        MyiRule
    Partition   Common 
    

    If you need to check for same information on a larger scale, and don't want to click as much, perhaps the easiest method to find out all iRules that belong to Common is to use grep on the config backup file:

    `cat /config/bigip.conf | grep 'ltm rule'

    Beginning in v11, /config/bigip.conf holds items of Common partition only. Items of other partitions are in /config/partitions/partition-name/bigip.conf file. Check here for more details: https://support.f5.com/kb/en-us/solutions/public/13000/800/sol13895.html

  • Open the iRule in question, and you will see the following headers:

    Properties
    
    Name        MyiRule
    Partition   Common 
    

    If you need to check for same information on a larger scale, and don't want to click as much, perhaps the easiest method to find out all iRules that belong to Common is to use grep on the config backup file:

    `cat /config/bigip.conf | grep 'ltm rule'

    Beginning in v11, /config/bigip.conf holds items of Common partition only. Items of other partitions are in /config/partitions/partition-name/bigip.conf file. Check here for more details: https://support.f5.com/kb/en-us/solutions/public/13000/800/sol13895.html

    • Kousalya_Nachim's avatar
      Kousalya_Nachim
      Icon for Nimbostratus rankNimbostratus
      Thank you,, I have a problem in creating an irule in a particular partition in version 10. Considering the partition name is Test. Write the irule to a temporary file- temp_rule using echo command : echo -e $'rule ' >/var/tmp/temp_rule To go into the partition Test i used the following command: tmsh modify cli admin-partitions update-partition Test I merged the file: tmsh run util bash -c "b merge /var/tmp/temp_rule" But the irule is created in Common partition. when i used : edit ltm rule ,, it is created in Test partition How can i create an irule in a particular partition using echo and merging files???
    • Hannes_Rapp's avatar
      Hannes_Rapp
      Icon for Nimbostratus rankNimbostratus
      I do not remember exactly how it was in v10. I recommend to upgrade to v11.5.4 or v12.1 if that's possible. If not, have a look at /config/bigip.conf file and look for any iRules that are properly configured in Test partition. Do you notice any keyword differences when comparing to iRules that are in Common partition? I.e. 'partition /Test' or something as such? I suppose there must be something like that, and if you find it, then start including that keyword combination in your temp files from which you load/merge new iRules to active configuration.
  • Open the iRule in question, and you will see the following headers:

    Properties
    
    Name        MyiRule
    Partition   Common 
    

    If you need to check for same information on a larger scale, and don't want to click as much, perhaps the easiest method to find out all iRules that belong to Common is to use grep on the config backup file:

    `cat /config/bigip.conf | grep 'ltm rule'

    Beginning in v11, /config/bigip.conf holds items of Common partition only. Items of other partitions are in /config/partitions/partition-name/bigip.conf file. Check here for more details: https://support.f5.com/kb/en-us/solutions/public/13000/800/sol13895.html

    • Kousalya_Nachim's avatar
      Kousalya_Nachim
      Icon for Nimbostratus rankNimbostratus
      Thank you,, I have a problem in creating an irule in a particular partition in version 10. Considering the partition name is Test. Write the irule to a temporary file- temp_rule using echo command : echo -e $'rule ' >/var/tmp/temp_rule To go into the partition Test i used the following command: tmsh modify cli admin-partitions update-partition Test I merged the file: tmsh run util bash -c "b merge /var/tmp/temp_rule" But the irule is created in Common partition. when i used : edit ltm rule ,, it is created in Test partition How can i create an irule in a particular partition using echo and merging files???
    • Hannes_Rapp_162's avatar
      Hannes_Rapp_162
      Icon for Nacreous rankNacreous
      I do not remember exactly how it was in v10. I recommend to upgrade to v11.5.4 or v12.1 if that's possible. If not, have a look at /config/bigip.conf file and look for any iRules that are properly configured in Test partition. Do you notice any keyword differences when comparing to iRules that are in Common partition? I.e. 'partition /Test' or something as such? I suppose there must be something like that, and if you find it, then start including that keyword combination in your temp files from which you load/merge new iRules to active configuration.