aboutsummaryrefslogtreecommitdiff
path: root/pkg/specgen/generate
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-06-21 17:57:24 +0000
committerGitHub <noreply@github.com>2022-06-21 17:57:24 +0000
commitfe974101ebc30d7902d29daa2e7832e61041f46e (patch)
tree3736a7b2920d2d0abff3393268dc9d556f2a06a7 /pkg/specgen/generate
parentb8b0fa80454fe0f3bcdab24bbf17cf0b6c2e8661 (diff)
parentf451b68dfa71d3690d49bc0cf3536b77cd6572d0 (diff)
downloadpodman-fe974101ebc30d7902d29daa2e7832e61041f46e.tar.gz
podman-fe974101ebc30d7902d29daa2e7832e61041f46e.tar.bz2
podman-fe974101ebc30d7902d29daa2e7832e61041f46e.zip
Merge pull request #14625 from cdoern/podShm
podman pod create --shm-size
Diffstat (limited to 'pkg/specgen/generate')
-rw-r--r--pkg/specgen/generate/container.go1
-rw-r--r--pkg/specgen/generate/container_create.go5
2 files changed, 6 insertions, 0 deletions
diff --git a/pkg/specgen/generate/container.go b/pkg/specgen/generate/container.go
index 0ed3c79ef..30c759495 100644
--- a/pkg/specgen/generate/container.go
+++ b/pkg/specgen/generate/container.go
@@ -506,6 +506,7 @@ func ConfigToSpec(rt *libpod.Runtime, specg *specgen.SpecGenerator, contaierID s
specg.Mounts = mounts
specg.HostDeviceList = conf.DeviceHostSrc
specg.Networks = conf.Networks
+ specg.ShmSize = &conf.ShmSize
mapSecurityConfig(conf, specg)
diff --git a/pkg/specgen/generate/container_create.go b/pkg/specgen/generate/container_create.go
index 7faf13465..0dec943d1 100644
--- a/pkg/specgen/generate/container_create.go
+++ b/pkg/specgen/generate/container_create.go
@@ -564,5 +564,10 @@ func Inherit(infra libpod.Container, s *specgen.SpecGenerator, rt *libpod.Runtim
if err != nil {
return nil, nil, nil, err
}
+
+ // this causes errors when shmSize is the default value, it will still get passed down unless we manually override.
+ if s.IpcNS.NSMode == specgen.Host && (compatibleOptions.ShmSize != nil && compatibleOptions.IsDefaultShmSize()) {
+ s.ShmSize = nil
+ }
return options, infraSpec, compatibleOptions, nil
}