summaryrefslogtreecommitdiff
path: root/cmd/podman/pods
diff options
context:
space:
mode:
authorcdoern <cdoern@redhat.com>2022-06-16 15:32:32 -0400
committerCharlie Doern <cdoern@redhat.com>2022-06-20 10:25:00 -0400
commitf451b68dfa71d3690d49bc0cf3536b77cd6572d0 (patch)
tree8f16252090eed226bb74dd4dcfddfe39fb10696d /cmd/podman/pods
parentff06c791ad7fb32b6a055e0d005f7354df43a5d1 (diff)
downloadpodman-f451b68dfa71d3690d49bc0cf3536b77cd6572d0.tar.gz
podman-f451b68dfa71d3690d49bc0cf3536b77cd6572d0.tar.bz2
podman-f451b68dfa71d3690d49bc0cf3536b77cd6572d0.zip
podman pod create --shm-size
expose the --shm-size flag to podman pod create and add proper handling and inheritance for the option. resolves #14609 Signed-off-by: Charlie Doern <cdoern@redhat.com>
Diffstat (limited to 'cmd/podman/pods')
-rw-r--r--cmd/podman/pods/clone.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/podman/pods/clone.go b/cmd/podman/pods/clone.go
index d95d74b05..391af1cf7 100644
--- a/cmd/podman/pods/clone.go
+++ b/cmd/podman/pods/clone.go
@@ -46,6 +46,7 @@ func cloneFlags(cmd *cobra.Command) {
common.DefineCreateDefaults(&podClone.InfraOptions)
common.DefineCreateFlags(cmd, &podClone.InfraOptions, true, false)
+
podClone.InfraOptions.MemorySwappiness = -1 // this is not implemented for pods yet, need to set -1 default manually
// need to fill an empty ctr create option for each container for sane defaults
@@ -72,6 +73,11 @@ func clone(cmd *cobra.Command, args []string) error {
}
podClone.ID = args[0]
+
+ if cmd.Flag("shm-size").Changed {
+ podClone.InfraOptions.ShmSize = cmd.Flag("shm-size").Value.String()
+ }
+
podClone.PerContainerOptions.IsClone = true
rep, err := registry.ContainerEngine().PodClone(context.Background(), podClone)
if err != nil {