Skip to content

Commit

Permalink
Merge pull request #23676 from ruihe774/infra-name
Browse files Browse the repository at this point in the history
quadlet: set infra name to %s-infra
  • Loading branch information
openshift-merge-bot[bot] authored Aug 20, 2024
2 parents 426aac3 + e5c91ff commit a3adad9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/systemd/quadlet/quadlet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/quadlet/basic.pod
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
1 change: 1 addition & 0 deletions test/e2e/quadlet/name.pod
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## assert-podman-pre-args "--name=test-pod"
## assert-podman-pre-args "--infra-name=test-pod-infra"

[Pod]
PodName=test-pod

0 comments on commit a3adad9

Please sign in to comment.