cloud-init runcmd keeps running even when a command fails
cmd-ntrf opened this issue · 1 comments
cmd-ntrf commented
All commands in MC's cloud-init are essential to the puppet configuration that follows on next boot.
While these commands work in normal conditions, sometime cloud-init is executed in abnormal conditions, like without an internet connection. This results in some of the commands failing and puppet being unable to run properly at next boot.
runcmd should probably stop on first error and a re-run of cloud-init should be triggered.
cmd-ntrf commented
Examples of error handling in a bash script:
https://intoli.com/blog/exit-on-errors-in-bash-scripts/