Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libcontainer/configs/cgroup_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ type Resources struct {

// SkipDevices allows to skip configuring device permissions.
// Used by e.g. kubelet while creating a parent cgroup (kubepods)
// common for many containers, and by runc update.
// common for many containers.
//
// NOTE it is impossible to start a container which has this flag set.
SkipDevices bool `json:"-"`
SkipDevices bool `json:"skip_devices"`
}
5 changes: 2 additions & 3 deletions tests/integration/update.bats
Original file line number Diff line number Diff line change
Expand Up @@ -611,10 +611,9 @@ EOF
# Trigger an update. This update doesn't actually change the device rules,
# but it will trigger the devices cgroup code to reapply the current rules.
# We trigger the update a few times to make sure we hit the race.
for _ in {1..12}; do
for _ in {1..120}; do
# TODO: Update "runc update" so we can change the device rules.
runc update --pids-limit 30 test_update
[ "$status" -eq 0 ]
__runc update --pids-limit 30 test_update # use __runc to avoid too much logs
done

# Kill recvtty.
Expand Down
7 changes: 0 additions & 7 deletions update.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,6 @@ other options are ignored.
config.IntelRdt.MemBwSchema = memBwSchema
}

// XXX(kolyshkin@): currently "runc update" is unable to change
// device configuration, so add this to skip device update.
// This helps in case an extra plugin (nvidia GPU) applies some
// configuration on top of what runc does.
// Note this field is not saved into container's state.json.
config.Cgroups.SkipDevices = true

return container.Set(config)
},
}