Forum Discussion

Mike_Nepomny's avatar
Mike_Nepomny
Icon for Nimbostratus rankNimbostratus
Dec 21, 2011

How to run external program without adding it to bigip.conf?

Hi,

 

 

How to run tmsh script without adding it to bigip.conf ? When use "edit scripts test.tcl" test.tcl gets inserted into bigip.conf. This insertion corrupted bigip.conf in our lab.

 

 

Thank you.

 

  • Mark_Crosland_2's avatar
    Mark_Crosland_2
    Historic F5 Account
    What version of the product do you have?

     

     

    What does "tmsh list sys db rule.validation" return?

     

     

    Can you post the script?

     

     

    At some point an option was introduced to allow you to store the script in any disk file and run it by referencing the file, I think that is V11.0.
  • Mark_Crosland_2's avatar
    Mark_Crosland_2
    Historic F5 Account
    And what was the error msg you see when you load the config files that have the script in it?
  • I am running v10.2. Are there any trick to run program from the file in this version?

     

     

    b verify load /config/bigip.conf

     

    Reading configuration from /config/low_profile_base.conf.

     

    Reading configuration from /defaults/config_base.conf.

     

    Reading configuration from /config/bigip_sys.conf.

     

    Reading configuration from /config/bigip_base.conf.

     

    Reading configuration from /usr/share/monitors/base_monitors.conf.

     

    Reading configuration from /config/profile_base.conf.

     

    Reading configuration from /config/daemon.conf.

     

    Reading configuration from /config/bigip.conf.

     

    BIGpipe parsing error (/config/bigip.conf Line 112):

     

    012e0008:3: The requested command (proc script::init) is invalid

     

  • Mark_Crosland_2's avatar
    Mark_Crosland_2
    Historic F5 Account
    I create a script called abc, saved the config, then did the following, it seems to work. The error msg seems to indicate that you need to wrap the proc in

     

     

    script {

     

    proc script::init {

     

    the script ...

     

    }

     

    }

     

     

    [root@10-2:Active] config b load

     

    Reading configuration from /config/low_profile_base.conf.

     

    Reading configuration from /defaults/config_base.conf.

     

    Reading configuration from /config/bigip_sys.conf.

     

    Reading configuration from /config/bigip_base.conf.

     

    Reading configuration from /usr/share/monitors/base_monitors.conf.

     

    Reading configuration from /config/profile_base.conf.

     

    Reading configuration from /config/daemon.conf.

     

    Reading configuration from /config/bigip.conf.

     

    Reading configuration from /config/bigip_local.conf.

     

    Loading the configuration ...

     

    [root@10-2:Active] config cat bigip.conf

     

    shell write partition Common

     

    script abc {

     

     

    proc script::init {} {

     

    }

     

     

    proc script::run {} {

     

    puts hello

     

    }

     

     

    proc script::help {} {

     

    }

     

     

    proc script::tabc {} {

     

    }

     

     

     

    }

     

    node 10.1.1.1 {}

     

    pool test {

     

    monitor all http

     

    members 10.1.1.1:http {}

     

    }

     

    [root@10-2:Active] config tmsh run cli script abc

     

    hello

     

    [root@10-2:Active] config

     

  • Is it possible not to add script to bigip.conf ? Can I compile script ?

     

     

    Thank you

     

  • Mark_Crosland_2's avatar
    Mark_Crosland_2
    Historic F5 Account
    No, the script cannot be compiled. In version 11.X you can store scripts in a file of your choosing and run them with a new file option.

     

    tmsh run cli script file

     

     

    Did you manually add the script to bigip.conf?

     

     

    Or was it added using "bigpipe save"?
  • I never manually added script to bigip.conf. I did "edit script test.cli" and somehow test.cli got inserted into bigip.conf

     

  • Mark_Crosland_2's avatar
    Mark_Crosland_2
    Historic F5 Account
    If you add the script via the edit command, and subsequently issue "tmsh save sys config ...", or, someone updates something from the web config utility, bigip.conf will be updated. If that causes bigip.conf to be corrupted we would need to see the script and/or log an issue with F5 support and let them know what the script looks like. The problem may be specific to the script you entered.