[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]

Using Multiple Commit Scripts

When using multiple commit scripts, each script evaluates the original candidate configuration file. Thus changes made by one script are not evaluated by the other scripts. This means that conflicts between scripts might not be resolved when the scripts are first applied to the configuration. The evaluation order for commit scripts is based on the order that the commit scripts are listed at the [edit system scripts commit] hierarchy level.

Figure 6: Configuration Evaluation by Multiple Commit Scripts

Image g016910.gif

For example, the commit script A.xsl was added to a router to check its configuration. Among other configuration checks, A.xsl ensures that the domain name server (DNS) is set to 192.168.0.255. Later, this DNS server's address was changed to 192.168.255.255 and a second script, B.xsl, was added to all servers to check that the DNS server was changed to the new address.

When these two scripts are run together, depending on the original value of the candidate configuration, either script A.xsl or script B.xsl will be invoked. If the original candidate configuration lists the incorrect DNS server address of 192.168.0.255, script B.xsl will update the value to 192.168.255.255. However, if the original candidate configuration includes the correct address of 192.168.255.255, script A.xsl will update the value to 192.168.0.255.

As the above example shows, care should be exercised to ensure that conflicts between scripts are not introduced. As a method of checking for conflicts with persistent changes, you can issue two separate commit commands.


[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]