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

Refreshing Commit Script Files

You can refresh local commit scripts with remote commit scripts using the refresh and the refresh-from statements. You specify the remote commit script’s URL when issuing refresh-from statement. When you issue the refresh statement, the router uses the commit script URL specified by the source statement. For more information on the source statement and defining a master commit script source URL, see Specifying a Remote Commit Script Source URL.

Once the refresh or the refresh-from statement is issued, the router attempts to connect to the remote commit script source and retrieve the remote commit script. If successful, the router updates the local commit script. If a problem occurs, a set of error messages is returned.

The refresh operation occurs as soon as you add the refresh or refresh-from statement to the configuration. In this way, these statements behave like operational mode commands. Further, these statements are not permanently recorded in the configuration file.

If a platform has dual Routing Engines, you need to refresh the commit scripts on both Routing Engines. The commit synchronize command does not refresh the commit scripts between Routing Engines.

Caution: We recommend that you do not automate the refresh function by including the refresh statement as a commit script change element. Even though this might seem like a good way to ensure that the most current commit script is always used, we recommend against automating the refresh function for the following reasons:

  • Automated refresh means that the network must be in operation in order to successfully commit a configuration. If the network goes down after you make a configuration error, you cannot recover quickly.
  • If the software must refresh multiple commit scripts for each commit operation, the network response time can slow down.
  • If you automate the refresh operation, the script refresh is the last action in the current commit operation. Consequently, the updated commit script takes effect only for the subsequent commit operation. This is because commit scripts are applied to the candidate configuration before the software copies any persistent changes generated by the scripts to the candidate configuration. For more information, see Commit Scripts and the JUNOS Software Commit Model. In contrast, if you perform a refresh operation manually, the updated commit script takes effect as expected, that is, immediately after your commit the refresh statement in the configuration.
  • If you automate the refresh operation, the refresh-from statement has no effect, because the refresh-from URL conflicts with and is overridden by the source statement URL. For information about the refresh-from statement, see Refreshing the Local Commit Script.

 


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