Re: Can a Bosh deployment be aborted when drain script returns non-zero exit code?


Carol Morneau
 

You're exactly right.

From /var/vcap/bosh/log:

2017-10-19_20:09:16.76704 [Cmd Runner] 2017/10/19 20:09:16 DEBUG - Stderr:
2017-10-19_20:09:16.76704 [Cmd Runner] 2017/10/19 20:09:16 DEBUG - Successful: false (1)
2017-10-19_20:09:16.76705 [ParallelScript] 2017/10/19 20:09:16 ERROR - '/var/vcap/jobs/containers/bin/drain' script has failed with error: Script did not return a signed integer: strconv.ParseInt: parsing "": invalid syntax
2017-10-19_20:09:16.76705 [Drain Action] 2017/10/19 20:09:16 DEBUG - Got a result
2017-10-19_20:09:16.76706 [Task Service] 2017/10/19 20:09:16 ERROR - Failed processing task #01b91a43-4f6e-4b52-5c65-0d7fd18d0b4d got: 1 of 1 drain scripts failed. Failed Jobs: containers.

Would you recommend a better way to fail a deployment?

Join {cf-bosh@lists.cloudfoundry.org to automatically receive all group messages.