21055: Don't exit when failing to set inotify.max_user_watches.
authorLucas Di Pentima <lucas.dipentima@curii.com>
Tue, 10 Oct 2023 14:45:29 +0000 (11:45 -0300)
committerLucas Di Pentima <lucas.dipentima@curii.com>
Tue, 10 Oct 2023 14:45:29 +0000 (11:45 -0300)
Docker containers mount procfs as read-only and inherit this setting from
their host: https://github.com/coder/code-server/issues/628

Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>

lib/install/deps.go

index 263f0180976c4e55d05f1f6f992cb84d4d556d41..076a4e2b6a172f42bbf2063626a39a86c49195c8 100644 (file)
@@ -268,7 +268,9 @@ if ! grep -F -- "$add" /etc/sysctl.conf; then
 fi
 `, stdout, stderr)
                if err != nil {
-                       return 1
+                       // Just warn instead of fail because this is expected when running
+                       // inside Docker.
+                       logger.Warnf("couldn't set fs.inotify.max_user_watches value: %w", err)
                }
        }