setup and so-verify/so-status interop

This commit is contained in:
Jason Ertel
2023-03-06 18:37:37 -05:00
parent 1998c66073
commit f77068f73f
3 changed files with 32 additions and 8 deletions

View File

@@ -1774,6 +1774,10 @@ reinstall_init() {
local service_retry_count=20
# Disregard previous install outcomes
rm -f /root/failure
rm -f /root/success
{
# remove all of root's cronjobs
logCmd "crontab -r -u root"

View File

@@ -81,18 +81,27 @@ status_failed() {
main() {
exit_code=0
if log_has_errors; then
echo "WARNING: Errors detected during setup"
if [ -f /root/success ]; then
echo "Successfully completed setup a while ago"
elif [ -f /root/failure ]; then
echo "WARNING: Failed setup a while ago"
exit_code=1
elif log_has_errors; then
echo "WARNING: Errors detected during setup"
exit_code=1
touch /root/failure
elif using_iso && cron_error_in_mail_spool; then
echo "WARNING: Unexpected cron job output in mail spool"
echo "WARNING: Unexpected cron job output in mail spool"
exit_code=1
touch /root/failure
elif is_manager_node && status_failed; then
echo "WARNING: Containers are not in a healthy state"
exit_code=1
touch /root/failure
else
echo "Successfully completed setup!"
fi
echo "Successfully completed setup!"
touch /root/success
fi
exit $exit_code
}