@cryptotaxi247 / netdata-1 / commits / 7b77f7c56

Add warning about broken Docker hosts in container entrypoint. (#12175)

* Add warning about broken Docker hosts in container entrypoint. Also adds a case to catch users trying to run the entrypoint as a a user in the container other than root, which we very much do not support. * Fix messages and remove invalid error case. * Link to docs in message instead of giving full explanation.

Austin S. Hemmelgarn committed Mar 9, 2022 at 08:56 UTC 7b77f7c56a40613add8d889032912723bae39c3d
1 file changed +5 -1
packaging/docker/run.sh
+5 -1
@@ -9,6 +9,11 @@
9 # Author : Austin S. Hemmelgarn <austin@netdata.cloud>
10 set -e
11
12 +if [ ! -w / ] && [ "${EUID}" -eq 0 ]; then
13 + echo >&2 "WARNING: This Docker host appears to not properly support newer stat system calls. This is known to cause issues with Netdata (most notably, nodes running on such hosts **cannot be claimed**)."
14 + echo >&2 "WARNING: For more information, see https://learn.netdata.cloud/docs/agent/claim#known-issues-on-older-hosts-with-seccomp-enabled"
15 +fi
16 +
17 if [ ! "${DISABLE_TELEMETRY:-0}" -eq 0 ] ||
18 [ -n "$DISABLE_TELEMETRY" ] ||
19 [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] ||
@@ -16,7 +21,6 @@ if [ ! "${DISABLE_TELEMETRY:-0}" -eq 0 ] ||
21 touch /etc/netdata/.opt-out-from-anonymous-statistics
22 fi
23
19 -
24 BALENA_PGID=$(ls -nd /var/run/balena.sock | awk '{print $4}')
25 DOCKER_PGID=$(ls -nd /var/run/docker.sock | awk '{print $4}')
26