mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
runsc: Ignore EROFS errors when setting up cgroups in --rootless mode.
This bypasses cgroup-related errors when running `runsc` in a container with no permission to create its own cgroups. PiperOrigin-RevId: 444652251
This commit is contained in:
committed by
gVisor bot
parent
68f30cbc5e
commit
b5a59f96c8
@@ -1279,7 +1279,7 @@ func (c *Container) setupCgroupForSubcontainer(conf *config.Config, spec *specs.
|
||||
func cgroupInstall(conf *config.Config, cg cgroup.Cgroup, res *specs.LinuxResources) (cgroup.Cgroup, error) {
|
||||
if err := cg.Install(res); err != nil {
|
||||
switch {
|
||||
case errors.Is(err, unix.EACCES) && conf.Rootless:
|
||||
case (errors.Is(err, unix.EACCES) || errors.Is(err, unix.EROFS)) && conf.Rootless:
|
||||
log.Warningf("Skipping cgroup configuration in rootless mode: %v", err)
|
||||
return nil, nil
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user