summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2023-01-16 11:05:55 -0500
committerGitHub <noreply@github.com>2023-01-16 11:05:55 -0500
commitc8ddde8df2416282fc3514d7a69b82f14be1a69e (patch)
treee5fdb48fa72b5d8388871dc4a50a3d63d2d1b5a0
parentbfea873f85dfdbed330451d226669fd3627cf53d (diff)
Set an explicit timeout in updater checks. (#14273)
If it takes more than an hour to run the updater, something has gone horribly wrong, so just kill it instead of letting it keep running.
-rwxr-xr-x.github/scripts/run-updater-check.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/.github/scripts/run-updater-check.sh b/.github/scripts/run-updater-check.sh
index aa6474bbf1..a96a1d6ef9 100755
--- a/.github/scripts/run-updater-check.sh
+++ b/.github/scripts/run-updater-check.sh
@@ -12,7 +12,13 @@ netdata -W buildinfo
echo "::endgroup::"
echo ">>> Updating Netdata..."
export NETDATA_BASE_URL="http://localhost:8080/artifacts/" # Pull the tarball from the local web server.
-/netdata/packaging/installer/netdata-updater.sh --not-running-from-cron --no-updater-self-update || exit 1
+timeout 3600 /netdata/packaging/installer/netdata-updater.sh --not-running-from-cron --no-updater-self-update
+
+case "$?" in
+ 124) echo "!!! Updater timed out." ; exit 1 ;;
+ 0) ;;
+ *) echo "!!! Updater failed." ; exit 1 ;;
+esac
echo "::group::>>> Post-Update Environment File Contents"
cat /etc/netdata/.environment
echo "::endgroup::"