Skip to content

Commit

Permalink
Merge pull request #27 from f-higashi/send_error
Browse files Browse the repository at this point in the history
Send error to waitConditionHandle
  • Loading branch information
zreigz committed May 20, 2016
2 parents 8c43913 + a15fb98 commit 46357a3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions kubecluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions kubeminion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 46357a3

Please sign in to comment.