ibm-mas / ansible-devops

Ansible collection supporting devops for IBM Maximo Application Suite
https://ibm-mas.github.io/ansible-devops/
Eclipse Public License 2.0
49 stars 82 forks source link

[patch] Added pipefail to ensure piped command's RC is not masked #1248

Closed sachbalag closed 5 months ago

sachbalag commented 5 months ago

This fix adds "pipefail" to the "oc exec" command pipeline and will ensure that if either one of the commands in the pipeline, "oc exec" or "tee" fails, the entire pipeline will fail, and a non-zero exit code is returned. This will fix error handling issues downstream and accurately assert a failure if "setupdb.sh" fails.

https://jsw.ibm.com/browse/MASISMIG-52381

sachbalag commented 5 months ago

@whitfiea Yes this was tested on a QB cluster. Here is the link to the log file with the results ...

https://jsw.ibm.com/secure/attachment/8060026/MASISMIG-52381%20-%20log.txt