mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
Merge pull request #2994 from kolyshkin/skip-devices-on-update
runc update: skip devices
This commit is contained in:
@@ -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.
|
||||
// common for many containers, and by runc update.
|
||||
//
|
||||
// NOTE it is impossible to start a container which has this flag set.
|
||||
SkipDevices bool `json:"skip_devices"`
|
||||
SkipDevices bool `json:"-"`
|
||||
}
|
||||
|
||||
@@ -329,6 +329,13 @@ 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)
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user