Skip to content

Commit

Permalink
Change from using LookupAll to Lookup on shmSize podUnit creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Odilhao committed Dec 24, 2024
1 parent 9c9f20a commit 9808bee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/systemd/quadlet/quadlet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9808bee

Please sign in to comment.