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