I am trying to run a specific command script against our Juniper SRX firewall clusters, and cannot get the final line of the script (commit full and-quit) to execute fully because the script thinks it's done and exits out long before the commit process completes. Unfortunately the size of our configuration coupled with the fact that it's a clustered setup means the commit process can easily take 30-45 seconds to complete, but the script has long since exited by then, so the log entries and email notifications don't show the full output from the commands, nor does the commit process actually happen. How can I get this to work?
Here is the command script I currently have setup (although this will change once I can get the commit process to function properly)
Command Script
--------------
config
activate security nat static rule-set public-ip rule P_
show | compare
commit full and-quit
this is the output I get when I run the script, and the configuration fails to be commited to the cluster nodes:
--------------
HOSTNAME (IP.IP.IP.IP):
warning: Clustering enabled; using private edit
warning: uncommitted changes will be discarded on exit
Entering configuration mode
{primary:node1}[edit]
{primary:node1}[edit]
[edit security nat static rule-set public-ip]
! active: rule P_{ ... }
{primary:node1}[edit]
node1:
Now, the real output that it should show should have this for the last few lines, and the configuration should actually be commited:
node1:
configuration check succeeds
node0:
commit complete
node1:
commit complete
Exiting configuration mode
{primary:node1}
This is with NCM 6.1 HF1