When Configuration Templates fail to apply, the node status is updated to display Configuration Template Run Status: Failure or Partial Failure. Hovering over this status displays details as to which individual templates have succeeded and failed.
When manually applying templates, the Pre-Flight step checks that the configuration can be successfully pushed to each selected node, but does not check that the configuration will work – e.g. an incorrect AAA password will pass pre-flight checking.
When using automatic Enrollment Bundle templates, order is important – configuration set by later templates will replace (not append) configuration set earlier in the run. You may re-order templates using the arrow buttons.
When multiple templates are set to run, the run stops as soon as any one template fails.
Script Templates
In the context of Script Templates, failure means the script has returned a non-zero exit status.
To determine what part of the script is failing, insert the following lines at the top of your script:
#!/bin/bash # Fail entire script as soon as any single command fails set -e # Print commands as they run set -x # Log output to temporary file exec > >(tee -i /tmp/debug.log) exec 2>&1
Apply the script template to a single test node, then check the output in /tmp/debug.log on the node.
Note: When testing a script that will be applied automatically via Enrollment Bundle, test the process end-to-end as a final check. Due to subtle differences in system state, scripts that succeed when applied manually may fail during enrollment.
Comments
0 comments
Article is closed for comments.