OpenFabrics / fsdp_docs

Other
2 stars 3 forks source link

Ensure that the beaker snippets cron job can't fail silently #90

Closed JSpewock closed 2 years ago

JSpewock commented 2 years ago

As of now just simply with the way that cron works it's very possible that the script being used to pull new snippets (located at /opt/scripts/pull_snippets.sh on beaker.iol.unh.edu) could fail to pull down changed from the remote repository and cron would not report it. This script isn't very likely to fail, but just as insurance in case it does, something should be put in place to handle an error.

There are many ways to go about fixing the issue but the easiest looks to be simply adding a few lines to the script that check to see if there was an error and if there was it would utilize the bash "mail" commands to report the error.

JSpewock commented 2 years ago

Edited /opt/scripts/pull_snippets.sh so that now if any of the three commands that are used inside of it exit with any code that isn't 0, it sends an email to our emailing group that details the error codes as well as the output of every command.