diff options
author | cdoern <cdoern@redhat.com> | 2022-01-18 15:46:11 -0500 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2022-02-10 13:49:46 -0500 |
commit | b1bf91a22a8d5d4d676e48efa2073944baff14c1 (patch) | |
tree | 66bac7f10ddc1d85c847573c1ad46c382b8c00dd /pkg/api/handlers | |
parent | 85c0fe7dc086f89f958302b7fd0f5fe8103db441 (diff) | |
download | podman-b1bf91a22a8d5d4d676e48efa2073944baff14c1.tar.gz podman-b1bf91a22a8d5d4d676e48efa2073944baff14c1.tar.bz2 podman-b1bf91a22a8d5d4d676e48efa2073944baff14c1.zip |
Podman pod create --share-parent vs --share=cgroup
separated cgroupNS sharing from setting the pod as the cgroup parent,
made a new flag --share-parent which sets the pod as the cgroup parent for all
containers entering the pod
remove cgroup from the default kernel namespaces since we want the same default behavior as before which is just the cgroup parent.
resolves #12765
Signed-off-by: cdoern <cdoern@redhat.com>
Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
Signed-off-by: cdoern <cdoern@redhat.com>
Diffstat (limited to 'pkg/api/handlers')
-rw-r--r-- | pkg/api/handlers/libpod/pods.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/api/handlers/libpod/pods.go b/pkg/api/handlers/libpod/pods.go index afbdf0e5f..d522631b7 100644 --- a/pkg/api/handlers/libpod/pods.go +++ b/pkg/api/handlers/libpod/pods.go @@ -45,6 +45,10 @@ func PodCreate(w http.ResponseWriter, r *http.Request) { infraOptions.Net = &entities.NetOptions{} infraOptions.Devices = psg.Devices infraOptions.SecurityOpt = psg.SecurityOpt + if psg.ShareParent == nil { + t := true + psg.ShareParent = &t + } err = specgenutil.FillOutSpecGen(psg.InfraContainerSpec, &infraOptions, []string{}) // necessary for default values in many cases (userns, idmappings) if err != nil { utils.Error(w, http.StatusInternalServerError, errors.Wrap(err, "error filling out specgen")) |