mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
specgen: allow --share-parent with --infra=false
This allows to use --share-parent with --infra=false, so that the containers in the pod can share the parent cgroup. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -123,11 +123,12 @@ func createPodOptions(p *specgen.PodSpecGenerator) ([]libpod.PodCreateOption, er
|
||||
var (
|
||||
options []libpod.PodCreateOption
|
||||
)
|
||||
|
||||
if p.ShareParent == nil || (p.ShareParent != nil && *p.ShareParent) {
|
||||
options = append(options, libpod.WithPodParent())
|
||||
}
|
||||
if !p.NoInfra {
|
||||
options = append(options, libpod.WithInfraContainer())
|
||||
if p.ShareParent == nil || (p.ShareParent != nil && *p.ShareParent) {
|
||||
options = append(options, libpod.WithPodParent())
|
||||
}
|
||||
nsOptions, err := GetNamespaceOptions(p.SharedNamespaces, p.InfraContainerSpec.NetNS.IsHost())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user