Merge "Fix unbound variable error"
[icn.git] / deploy / ironic / ironic.sh
index 358dbb9..8f46c8c 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env bash
-set -eux -o pipefail
+set -eEux -o pipefail
 
 SCRIPTDIR="$(readlink -f $(dirname ${BASH_SOURCE[0]}))"
 LIBDIR="$(dirname $(dirname ${SCRIPTDIR}))/env/lib"
@@ -9,6 +9,11 @@ source $LIBDIR/common.sh
 
 NAMEPREFIX="capm3"
 
+trap err_exit ERR
+function err_exit {
+    kubectl get all -n ${NAMEPREFIX}-system
+}
+
 # This may be used to update the in-place Ironic YAML files from the
 # upstream project.  We cannot use the upstream sources directly as
 # they require an envsubst step before kustomize build.