diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2022-03-09 08:56:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-09 08:56:28 -0500 |
commit | 7b77f7c56a40613add8d889032912723bae39c3d (patch) | |
tree | 62622944c5941935fa27e85046a5f940dad392ff /packaging/docker/run.sh | |
parent | 5c93dea9b1f7fedfe6a62afdc65d15e2b10d6805 (diff) |
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.
Diffstat (limited to 'packaging/docker/run.sh')
-rwxr-xr-x | packaging/docker/run.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packaging/docker/run.sh b/packaging/docker/run.sh index 95d14125a5..d7c9cc7f20 100755 --- a/packaging/docker/run.sh +++ b/packaging/docker/run.sh @@ -9,6 +9,11 @@ # Author : Austin S. Hemmelgarn <austin@netdata.cloud> set -e +if [ ! -w / ] && [ "${EUID}" -eq 0 ]; then + 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**)." + echo >&2 "WARNING: For more information, see https://learn.netdata.cloud/docs/agent/claim#known-issues-on-older-hosts-with-seccomp-enabled" +fi + if [ ! "${DISABLE_TELEMETRY:-0}" -eq 0 ] || [ -n "$DISABLE_TELEMETRY" ] || [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] || @@ -16,7 +21,6 @@ if [ ! "${DISABLE_TELEMETRY:-0}" -eq 0 ] || touch /etc/netdata/.opt-out-from-anonymous-statistics fi - BALENA_PGID=$(ls -nd /var/run/balena.sock | awk '{print $4}') DOCKER_PGID=$(ls -nd /var/run/docker.sock | awk '{print $4}') |