diff --git a/kubecluster.yaml b/kubecluster.yaml index 6b201cf..ebd0840 100644 --- a/kubecluster.yaml +++ b/kubecluster.yaml @@ -226,8 +226,17 @@ resources: str_replace: params: "$MASTER_CONTENT": {get_file: fragments/master.sh} + wc_notify: {get_attr: [master_wait_handle, curl_cli]} template: | #!/bin/bash + set -e + function finish { + if [ "$?" -ne 0 ] + then + wc_notify --data-binary '{"status": "FAILURE"}' + fi + } + trap "finish" EXIT source /etc/sysconfig/heat-params $MASTER_CONTENT diff --git a/kubeminion.yaml b/kubeminion.yaml index a02799d..c76901d 100644 --- a/kubeminion.yaml +++ b/kubeminion.yaml @@ -129,8 +129,17 @@ resources: str_replace: params: "$WORKER_CONTENT": {get_file: fragments/worker.sh} + wc_notify: {get_attr: [minion_wait_handle, curl_cli]} template: | #!/bin/bash + set -e + function finish { + if [ "$?" -ne 0 ] + then + wc_notify --data-binary '{"status": "FAILURE"}' + fi + } + trap "finish" EXIT source /etc/sysconfig/heat-params $WORKER_CONTENT