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
2 changed files with 4 additions and 1 deletions
|
@ -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}}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue