diff options
author | Dan Čermák <dcermak@suse.com> | 2022-09-13 14:43:47 +0200 |
---|---|---|
committer | Dan Čermák <dcermak@suse.com> | 2022-09-14 09:37:02 +0200 |
commit | 0aedddd3b3ec0f14818aa0f04c24df1f0b2e3f3b (patch) | |
tree | c633cca6adfdaa8ed4b825e2772a5e9e90316986 /pkg/bindings/internal | |
parent | c64388728f5efec2658cf9097dbe15126f30753e (diff) | |
download | podman-0aedddd3b3ec0f14818aa0f04c24df1f0b2e3f3b.tar.gz podman-0aedddd3b3ec0f14818aa0f04c24df1f0b2e3f3b.tar.bz2 podman-0aedddd3b3ec0f14818aa0f04c24df1f0b2e3f3b.zip |
[systemd] Ensure that podCreateArgs appear last in ExecStartPre=
When creating a new pod without the `--name` flag, e.g.:
`podman pod create foobar`
it will get the name `foobar` implicitly and this will be recorded as the in the
`podCreateArgs`. Unfortunately, the implicit name only works if it appears as
the **last** argument of the startup command.
With 6e2e3a78ed1d05ee5f23f65b814e8135021961dd we started appending the pod
security policy to the startCommand, resulting in the following `ExecStartPre=`
line:
```
/usr/bin/podman pod create --infra-conmon-pidfile %t/pod-foobar.pid --pod-id-file %t/pod-foobar.pod-id foobar --exit-policy=stop
```
This fails to launch, as the `pod create` command expects only a single
non-flag parameter, but it assumes that `exit-policy=stop` is a second and
terminates immediately instead.
This fixes https://github.com/containers/podman/issues/15592
Signed-off-by: Dan Čermák <dcermak@suse.com>
Diffstat (limited to 'pkg/bindings/internal')
0 files changed, 0 insertions, 0 deletions