Merge pull request #11290 from LK4D4/fix_lxc_for_new_api
Use CgroupString instead of missing GetCgroupAllowString in lxc_template Upstream-commit: 1835665e94d2a40023948ca00abea6fb660c4cf8 Component: engine
This commit is contained in:
@@ -420,6 +420,9 @@ func setupUser(userSpec string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := syscall.Setgroups(execUser.Sgids); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := system.Setgid(execUser.Gid); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ lxc.cgroup.devices.allow = a
|
||||
lxc.cgroup.devices.deny = a
|
||||
#Allow the devices passed to us in the AllowedDevices list.
|
||||
{{range $allowedDevice := .AllowedDevices}}
|
||||
lxc.cgroup.devices.allow = {{$allowedDevice.GetCgroupAllowString}}
|
||||
lxc.cgroup.devices.allow = {{$allowedDevice.CgroupString}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user