diff --git a/pkg/systemd/quadlet/quadlet.go b/pkg/systemd/quadlet/quadlet.go index 2509259d3d..3c06a4bff4 100644 --- a/pkg/systemd/quadlet/quadlet.go +++ b/pkg/systemd/quadlet/quadlet.go @@ -1656,6 +1656,7 @@ func ConvertPod(podUnit *parser.UnitFile, name string, unitsInfoMap map[string]* return nil, err } + execStartPre.addf("--infra-name=%s-infra", podName) execStartPre.addf("--name=%s", podName) handlePodmanArgs(podUnit, PodGroup, execStartPre) diff --git a/test/e2e/quadlet/basic.pod b/test/e2e/quadlet/basic.pod index 2b8a7bb1e4..ba507cf9aa 100644 --- a/test/e2e/quadlet/basic.pod +++ b/test/e2e/quadlet/basic.pod @@ -1,7 +1,7 @@ ## assert-key-is Unit RequiresMountsFor "%t/containers" ## assert-key-is Service Type forking ## assert-key-is Service SyslogIdentifier "%N" -## assert-key-is-regex Service ExecStartPre ".*/podman pod create --infra-conmon-pidfile=%t/%N.pid --pod-id-file=%t/%N.pod-id --exit-policy=stop --replace --name=systemd-basic" +## assert-key-is-regex Service ExecStartPre ".*/podman pod create --infra-conmon-pidfile=%t/%N.pid --pod-id-file=%t/%N.pod-id --exit-policy=stop --replace --infra-name=systemd-basic-infra --name=systemd-basic" ## assert-key-is-regex Service ExecStart ".*/podman pod start --pod-id-file=%t/%N.pod-id" ## assert-key-is-regex Service ExecStop ".*/podman pod stop --pod-id-file=%t/%N.pod-id --ignore --time=10" ## assert-key-is-regex Service ExecStopPost ".*/podman pod rm --pod-id-file=%t/%N.pod-id --ignore --force" diff --git a/test/e2e/quadlet/name.pod b/test/e2e/quadlet/name.pod index 33c528d7bc..40dcd67092 100644 --- a/test/e2e/quadlet/name.pod +++ b/test/e2e/quadlet/name.pod @@ -1,4 +1,5 @@ ## assert-podman-pre-args "--name=test-pod" +## assert-podman-pre-args "--infra-name=test-pod-infra" [Pod] PodName=test-pod