From 0237df2fdab75eed82b4f57081ae657901bc0723 Mon Sep 17 00:00:00 2001 From: Etienne Perot Date: Mon, 5 Aug 2024 16:03:15 -0700 Subject: [PATCH] Remove error message about `max_user_namespaces`. It has not been the real cause of recent failures. If it turns out to result in new bug reports that do end up being caused by `max_user_namespaces` being too low, then IMO the proper fix would be to add a check for this at `runsc` startup time instead of here at process fork/exec time. Updates #5964 PiperOrigin-RevId: 659712753 --- runsc/specutils/namespace.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/runsc/specutils/namespace.go b/runsc/specutils/namespace.go index 3398eec29..abbfa6350 100644 --- a/runsc/specutils/namespace.go +++ b/runsc/specutils/namespace.go @@ -183,11 +183,7 @@ func startInNS(cmd *exec.Cmd, nss []specs.LinuxNamespace) ([]func() error, error deferFuncs = append(deferFuncs, restoreNS) } - err := cmd.Start() - if err != nil && cmd.SysProcAttr.Cloneflags&unix.CLONE_NEWUSER != 0 { - err = fmt.Errorf("%v: check whether /proc/sys/user/max_user_namespaces is set too low (gvisor.dev/issue/5964)", err) - } - return deferFuncs, err + return deferFuncs, cmd.Start() } // SetUIDGIDMappings sets the given uid/gid mappings from the spec on the cmd.