Control the Execution of Commit Scripts in the QFabric System
This document describes the tasks that affect the way commit scripts are executed. In the QFabric system, commit scripts are stored in the in the /pbdata/mgd_shared/partition-ip/var/db/scripts/commit directory that is shared among Director devices in a Director group.
To determine which commit scripts are currently enabled on the
QFabric system, use the show
command to display the files
included at the [edit system scripts commit]
hierarchy
level. To ensure that the enabled files are on the device, list the
contents of the /pbdata/mgd_shared/partition-ip/var/db/scripts/commit directory using the file list
operational mode command.
See the following tasks:
Enabling Commit Scripts to Execute
The commit operation requires that all scripts be included in
configuration at the [edit system scripts commit file]
hierarchy
level for all QFabric Director devices.
If you need to temporarily remove a script from a commit operation
but do not want to remove it from the configuration permanently, you
may configure the optional
statement at the [edit
system scripts commit file filename]
hierarchy
level to enable the commit operation to succeed even if a script is
missing from the commit script directory.
When you include the optional
statement
at the [edit system scripts commit file filename]
hierarchy level, no error message is generated during the
commit operation if the file does not exist. As a result, you might
not be aware that a script has not been executed as expected.
The filename of a commit script written in SLAX or Python must include the .slax or .py file extension, respectively, for the script to be executed.
To enable a commit script to execute during a commit operation:
Removing Commit Scripts from the Configuration
You can prevent a commit script from executing during a commit
operation by removing the script’s filename from the [edit
system scripts commit]
hierarchy in the configuration.
You can also deactivate a script using the deactivate
statement instead of removing it from the configuration. Deactivated
scripts may be reactivated later.
To prevent a commit script from executing during a commit operation:
Deactivating Commit Scripts
Deactivating a commit script results in its being marked as
inactive in the configuration. The script is not executed during the
commit operation, but you can reactivate the script by using the activate
statement.
To deactivate the commit script:
Activating Inactive Commit Scripts
Deactivating a commit script results in its being marked as inactive in the configuration and is therefore not executed during the commit operation.
To activate an inactive commit script: