diff --git a/pkg/systemd/quadlet/quadlet.go b/pkg/systemd/quadlet/quadlet.go index f652ced092..b21f842725 100644 --- a/pkg/systemd/quadlet/quadlet.go +++ b/pkg/systemd/quadlet/quadlet.go @@ -1632,8 +1632,9 @@ func ConvertPod(podUnit *parser.UnitFile, name string, unitsInfoMap map[string]* stringsKeys := map[string]string{ KeyIP: "--ip", KeyIP6: "--ip6", + KeyShmSize: "--shm-size", } - lookupAndAddAllStrings(podUnit, PodGroup, stringsKeys, execStartPre) + lookupAndAddString(podUnit, PodGroup, stringsKeys, execStartPre) allStringsKeys := map[string]string{ KeyNetworkAlias: "--network-alias", @@ -1651,11 +1652,6 @@ func ConvertPod(podUnit *parser.UnitFile, name string, unitsInfoMap map[string]* execStartPre.add("--infra-name", fmt.Sprintf("%s-infra", podName)) execStartPre.add("--name", podName) - shmSize, exists := podUnit.Lookup(PodGroup, KeyShmSize) - if exists { - execStartPre.addf("--shm-size=%s", shmSize) - } - handlePodmanArgs(podUnit, PodGroup, execStartPre) service.AddCmdline(ServiceGroup, "ExecStartPre", execStartPre.Args) diff --git a/test/e2e/quadlet/shmsize.pod b/test/e2e/quadlet/shmsize.pod index a19ffb8c4c..11ae7cf982 100644 --- a/test/e2e/quadlet/shmsize.pod +++ b/test/e2e/quadlet/shmsize.pod @@ -1,4 +1,4 @@ -## assert-podman-pre-args "--shm-size=5g" +## assert-podman-pre-args "--shm-size" "5g" [Pod] ShmSize=5g