Revert "Introduce a random sleep in the Netdata updater (#9079)" (#9161)
This reverts commit cea8a3fcbb3b48fce545d19bce2b5cf920c6794d.
James Mills committed
May 26, 2020 at 21:53 UTC
e92d2ce7a155a33ee6b0acfd928f357251c02c69
2 files changed
+2
-13
packaging/installer/netdata-updater.sh
+2
-10
@@ -185,8 +185,8 @@ update() {
185
do_not_start="--dont-start-it"
186
fi
187
188
- if [ -n "${NETDATA_SELECTED_DASHBOARD}" ]; then
189
- env="NETDATA_SELECTED_DASHBOARD=${NETDATA_SELECTED_DASHBOARD}"
188
+ if [ -n "${NETDATA_SELECTED_DASHBOARD}" ] ; then
189
+ env="NETDATA_SELECTED_DASHBOARD=${NETDATA_SELECTED_DASHBOARD}"
190
fi
191
192
info "Re-installing netdata..."
@@ -210,14 +210,6 @@ tmpdir=
210
211
trap cleanup EXIT
212
213
-# Random sleep to aileviate stampede effect of Agents upgrading
214
-# and disconnecting/reconnecting at the same time (or near to).
215
-# But only we're not a controlling terminal (tty)
216
-# Randomly sleep between 1s and 60m
217
-if [ ! -t 1 ]; then
218
- sleep $(((RANDOM % 3600) + 1))s
219
-fi
220
-
213
# Usually stored in /etc/netdata/.environment
214
: "${ENVIRONMENT_FILE:=THIS_SHOULD_BE_REPLACED_BY_INSTALLER_SCRIPT}"
215
tests/updater_checks.bats
-3
@@ -56,9 +56,6 @@ setup() {
56
# Run the updater, with the override so that it uses the local repo we have at hand
57
# Try to run the installed, if any, otherwise just run the one from the repo
58
export NETDATA_LOCAL_TARBAL_OVERRIDE="${PWD}"
59
- # Disable random sleep / splay for netdata-updater to avoid sampede effect
60
- # of many agents (dis|re)connecting too quickly all at onace to Netdata Cloud
61
- unset RANDOM; export RANDOM=0
59
/etc/cron.daily/netdata-updater || ./packaging/installer/netdata-updater.sh
60
! grep "new_installation" "${ENV}"
61
}