From 9808bee0f8db9dc9276286acef8d1f1e48b47c45 Mon Sep 17 00:00:00 2001 From: Odilon Sousa Date: Tue, 24 Dec 2024 15:08:08 -0300 Subject: [PATCH] Change from using LookupAll to Lookup on shmSize podUnit creation --- pkg/systemd/quadlet/quadlet.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/systemd/quadlet/quadlet.go b/pkg/systemd/quadlet/quadlet.go index 697c7455f9..f652ced092 100644 --- a/pkg/systemd/quadlet/quadlet.go +++ b/pkg/systemd/quadlet/quadlet.go @@ -1651,9 +1651,9 @@ func ConvertPod(podUnit *parser.UnitFile, name string, unitsInfoMap map[string]* execStartPre.add("--infra-name", fmt.Sprintf("%s-infra", podName)) execStartPre.add("--name", podName) - shmSize := podUnit.LookupAll(PodGroup, KeyShmSize) - if len(shmSize) > 0 { - execStartPre.addf("--shm-size=%s", shmSize[0]) + shmSize, exists := podUnit.Lookup(PodGroup, KeyShmSize) + if exists { + execStartPre.addf("--shm-size=%s", shmSize) } handlePodmanArgs(podUnit, PodGroup, execStartPre)