mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
Merge pull request #15821 from vrothberg/revert-c20abf12c714f359c7bbb291c444530f70cb1185
Revert "generate systemd: drop ExecStop"
This commit is contained in:
@ -46,6 +46,7 @@ type containerInfo struct {
|
|||||||
ExecStart string
|
ExecStart string
|
||||||
TimeoutStartSec uint
|
TimeoutStartSec uint
|
||||||
TimeoutStopSec uint
|
TimeoutStopSec uint
|
||||||
|
ExecStop string
|
||||||
ExecStopPost string
|
ExecStopPost string
|
||||||
GenerateNoHeader bool
|
GenerateNoHeader bool
|
||||||
Pod *podInfo
|
Pod *podInfo
|
||||||
@ -97,6 +98,9 @@ TimeoutStopSec={{{{.TimeoutStopSec}}}}
|
|||||||
ExecStartPre={{{{.ExecStartPre}}}}
|
ExecStartPre={{{{.ExecStartPre}}}}
|
||||||
{{{{- end}}}}
|
{{{{- end}}}}
|
||||||
ExecStart={{{{.ExecStart}}}}
|
ExecStart={{{{.ExecStart}}}}
|
||||||
|
{{{{- if .ExecStop}}}}
|
||||||
|
ExecStop={{{{.ExecStop}}}}
|
||||||
|
{{{{- end}}}}
|
||||||
{{{{- if .ExecStopPost}}}}
|
{{{{- if .ExecStopPost}}}}
|
||||||
ExecStopPost={{{{.ExecStopPost}}}}
|
ExecStopPost={{{{.ExecStopPost}}}}
|
||||||
{{{{- end}}}}
|
{{{{- end}}}}
|
||||||
@ -290,6 +294,7 @@ func executeContainerTemplate(info *containerInfo, options entities.GenerateSyst
|
|||||||
info.Type = "forking"
|
info.Type = "forking"
|
||||||
info.EnvVariable = define.EnvVariable
|
info.EnvVariable = define.EnvVariable
|
||||||
info.ExecStart = "{{{{.Executable}}}} start {{{{.ContainerNameOrID}}}}"
|
info.ExecStart = "{{{{.Executable}}}} start {{{{.ContainerNameOrID}}}}"
|
||||||
|
info.ExecStop = "{{{{.Executable}}}} stop {{{{if (ge .StopTimeout 0)}}}}-t {{{{.StopTimeout}}}}{{{{end}}}} {{{{.ContainerNameOrID}}}}"
|
||||||
info.ExecStopPost = "{{{{.Executable}}}} stop {{{{if (ge .StopTimeout 0)}}}}-t {{{{.StopTimeout}}}}{{{{end}}}} {{{{.ContainerNameOrID}}}}"
|
info.ExecStopPost = "{{{{.Executable}}}} stop {{{{if (ge .StopTimeout 0)}}}}-t {{{{.StopTimeout}}}}{{{{end}}}} {{{{.ContainerNameOrID}}}}"
|
||||||
for i, env := range info.AdditionalEnvVariables {
|
for i, env := range info.AdditionalEnvVariables {
|
||||||
info.AdditionalEnvVariables[i] = escapeSystemdArg(env)
|
info.AdditionalEnvVariables[i] = escapeSystemdArg(env)
|
||||||
@ -308,6 +313,7 @@ func executeContainerTemplate(info *containerInfo, options entities.GenerateSyst
|
|||||||
info.PIDFile = ""
|
info.PIDFile = ""
|
||||||
info.ContainerIDFile = "%t/%n.ctr-id"
|
info.ContainerIDFile = "%t/%n.ctr-id"
|
||||||
info.ExecStartPre = "/bin/rm -f {{{{.ContainerIDFile}}}}"
|
info.ExecStartPre = "/bin/rm -f {{{{.ContainerIDFile}}}}"
|
||||||
|
info.ExecStop = "{{{{.Executable}}}} stop --ignore --cidfile={{{{.ContainerIDFile}}}}"
|
||||||
info.ExecStopPost = "{{{{.Executable}}}} rm -f --ignore --cidfile={{{{.ContainerIDFile}}}}"
|
info.ExecStopPost = "{{{{.Executable}}}} rm -f --ignore --cidfile={{{{.ContainerIDFile}}}}"
|
||||||
// The create command must at least have three arguments:
|
// The create command must at least have three arguments:
|
||||||
// /usr/bin/podman run $IMAGE
|
// /usr/bin/podman run $IMAGE
|
||||||
|
@ -57,6 +57,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n
|
|||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
TimeoutStopSec=82
|
TimeoutStopSec=82
|
||||||
ExecStart=/usr/bin/podman start 639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401
|
ExecStart=/usr/bin/podman start 639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401
|
||||||
|
ExecStop=/usr/bin/podman stop -t 22 639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401
|
||||||
ExecStopPost=/usr/bin/podman stop -t 22 639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401
|
ExecStopPost=/usr/bin/podman stop -t 22 639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401
|
||||||
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -82,6 +83,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n
|
|||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
TimeoutStopSec=70
|
TimeoutStopSec=70
|
||||||
ExecStart=/usr/bin/podman start foobar
|
ExecStart=/usr/bin/podman start foobar
|
||||||
|
ExecStop=/usr/bin/podman stop -t 10 foobar
|
||||||
ExecStopPost=/usr/bin/podman stop -t 10 foobar
|
ExecStopPost=/usr/bin/podman stop -t 10 foobar
|
||||||
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -105,6 +107,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n
|
|||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
TimeoutStopSec=70
|
TimeoutStopSec=70
|
||||||
ExecStart=/usr/bin/podman start foobar
|
ExecStart=/usr/bin/podman start foobar
|
||||||
|
ExecStop=/usr/bin/podman stop -t 10 foobar
|
||||||
ExecStopPost=/usr/bin/podman stop -t 10 foobar
|
ExecStopPost=/usr/bin/podman stop -t 10 foobar
|
||||||
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -131,6 +134,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n
|
|||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
TimeoutStopSec=70
|
TimeoutStopSec=70
|
||||||
ExecStart=/usr/bin/podman start foobar
|
ExecStart=/usr/bin/podman start foobar
|
||||||
|
ExecStop=/usr/bin/podman stop -t 10 foobar
|
||||||
ExecStopPost=/usr/bin/podman stop -t 10 foobar
|
ExecStopPost=/usr/bin/podman stop -t 10 foobar
|
||||||
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -157,6 +161,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n
|
|||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
TimeoutStopSec=70
|
TimeoutStopSec=70
|
||||||
ExecStart=/usr/bin/podman start foobar
|
ExecStart=/usr/bin/podman start foobar
|
||||||
|
ExecStop=/usr/bin/podman stop -t 10 foobar
|
||||||
ExecStopPost=/usr/bin/podman stop -t 10 foobar
|
ExecStopPost=/usr/bin/podman stop -t 10 foobar
|
||||||
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -183,6 +188,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n
|
|||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
TimeoutStopSec=70
|
TimeoutStopSec=70
|
||||||
ExecStart=/usr/bin/podman start foobar
|
ExecStart=/usr/bin/podman start foobar
|
||||||
|
ExecStop=/usr/bin/podman stop -t 10 foobar
|
||||||
ExecStopPost=/usr/bin/podman stop -t 10 foobar
|
ExecStopPost=/usr/bin/podman stop -t 10 foobar
|
||||||
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -211,6 +217,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n
|
|||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
TimeoutStopSec=70
|
TimeoutStopSec=70
|
||||||
ExecStart=/usr/bin/podman start foobar
|
ExecStart=/usr/bin/podman start foobar
|
||||||
|
ExecStop=/usr/bin/podman stop -t 10 foobar
|
||||||
ExecStopPost=/usr/bin/podman stop -t 10 foobar
|
ExecStopPost=/usr/bin/podman stop -t 10 foobar
|
||||||
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -236,6 +243,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n
|
|||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
TimeoutStopSec=70
|
TimeoutStopSec=70
|
||||||
ExecStart=/usr/bin/podman start foobar
|
ExecStart=/usr/bin/podman start foobar
|
||||||
|
ExecStop=/usr/bin/podman stop -t 10 foobar
|
||||||
ExecStopPost=/usr/bin/podman stop -t 10 foobar
|
ExecStopPost=/usr/bin/podman stop -t 10 foobar
|
||||||
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -268,6 +276,7 @@ ExecStart=/usr/bin/podman container run \
|
|||||||
--replace \
|
--replace \
|
||||||
--name jadda-jadda \
|
--name jadda-jadda \
|
||||||
--hostname hello-world awesome-image:latest command arg1 ... argN "foo=arg \"with \" space"
|
--hostname hello-world awesome-image:latest command arg1 ... argN "foo=arg \"with \" space"
|
||||||
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
@ -300,6 +309,7 @@ ExecStart=/usr/bin/podman container run \
|
|||||||
--sdnotify=container \
|
--sdnotify=container \
|
||||||
--name jadda-jadda \
|
--name jadda-jadda \
|
||||||
--hostname hello-world awesome-image:latest command arg1 ... argN "foo=arg \"with \" space"
|
--hostname hello-world awesome-image:latest command arg1 ... argN "foo=arg \"with \" space"
|
||||||
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
@ -332,6 +342,7 @@ ExecStart=/usr/bin/podman container run \
|
|||||||
--replace \
|
--replace \
|
||||||
--name jadda-jadda \
|
--name jadda-jadda \
|
||||||
--hostname hello-world awesome-image:latest command arg1 ... argN "foo=arg \"with \" space"
|
--hostname hello-world awesome-image:latest command arg1 ... argN "foo=arg \"with \" space"
|
||||||
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
@ -364,6 +375,7 @@ ExecStart=/usr/bin/podman run \
|
|||||||
-d \
|
-d \
|
||||||
--name jadda-jadda \
|
--name jadda-jadda \
|
||||||
--hostname hello-world awesome-image:latest command arg1 ... argN
|
--hostname hello-world awesome-image:latest command arg1 ... argN
|
||||||
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
@ -397,6 +409,7 @@ ExecStart=/usr/bin/podman run \
|
|||||||
-d \
|
-d \
|
||||||
--name jadda-jadda \
|
--name jadda-jadda \
|
||||||
--hostname hello-world awesome-image:latest command arg1 ... argN
|
--hostname hello-world awesome-image:latest command arg1 ... argN
|
||||||
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
@ -429,6 +442,7 @@ ExecStart=/usr/bin/podman run \
|
|||||||
--detach \
|
--detach \
|
||||||
--name jadda-jadda \
|
--name jadda-jadda \
|
||||||
--hostname hello-world awesome-image:latest command arg1 ... argN
|
--hostname hello-world awesome-image:latest command arg1 ... argN
|
||||||
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
@ -458,6 +472,7 @@ ExecStart=/usr/bin/podman run \
|
|||||||
--rm \
|
--rm \
|
||||||
--sdnotify=conmon \
|
--sdnotify=conmon \
|
||||||
-d awesome-image:latest
|
-d awesome-image:latest
|
||||||
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
@ -490,6 +505,7 @@ ExecStart=/usr/bin/podman run \
|
|||||||
` +
|
` +
|
||||||
detachparam +
|
detachparam +
|
||||||
` awesome-image:latest
|
` awesome-image:latest
|
||||||
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
@ -525,6 +541,7 @@ ExecStart=/usr/bin/podman run \
|
|||||||
--name test \
|
--name test \
|
||||||
-p 80:80 awesome-image:latest somecmd \
|
-p 80:80 awesome-image:latest somecmd \
|
||||||
--detach=false
|
--detach=false
|
||||||
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
@ -556,6 +573,7 @@ ExecStart=/usr/bin/podman \
|
|||||||
--rm \
|
--rm \
|
||||||
--sdnotify=conmon \
|
--sdnotify=conmon \
|
||||||
-d awesome-image:latest
|
-d awesome-image:latest
|
||||||
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
@ -585,6 +603,7 @@ ExecStart=/usr/bin/podman container run \
|
|||||||
--rm \
|
--rm \
|
||||||
--sdnotify=conmon \
|
--sdnotify=conmon \
|
||||||
-d awesome-image:latest
|
-d awesome-image:latest
|
||||||
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
@ -618,6 +637,7 @@ ExecStart=/usr/bin/podman run \
|
|||||||
--name test \
|
--name test \
|
||||||
--log-driver=journald \
|
--log-driver=journald \
|
||||||
--log-opt=tag={{.Name}} awesome-image:latest
|
--log-opt=tag={{.Name}} awesome-image:latest
|
||||||
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
@ -650,6 +670,7 @@ ExecStart=/usr/bin/podman run \
|
|||||||
--replace \
|
--replace \
|
||||||
--name test awesome-image:latest sh \
|
--name test awesome-image:latest sh \
|
||||||
-c "kill $$$$ && echo %%\\"
|
-c "kill $$$$ && echo %%\\"
|
||||||
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
@ -683,6 +704,7 @@ ExecStart=/usr/bin/podman run \
|
|||||||
--cgroups=foo \
|
--cgroups=foo \
|
||||||
--conmon-pidfile=foo \
|
--conmon-pidfile=foo \
|
||||||
--cidfile=foo alpine
|
--cidfile=foo alpine
|
||||||
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
@ -718,6 +740,7 @@ ExecStart=/usr/bin/podman run \
|
|||||||
--conmon-pidfile=foo \
|
--conmon-pidfile=foo \
|
||||||
--cidfile=foo \
|
--cidfile=foo \
|
||||||
--pod-id-file /tmp/pod-foobar.pod-id-file alpine
|
--pod-id-file /tmp/pod-foobar.pod-id-file alpine
|
||||||
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
@ -752,6 +775,7 @@ ExecStart=/usr/bin/podman run \
|
|||||||
--env=BAR \
|
--env=BAR \
|
||||||
--env=MYENV=2 \
|
--env=MYENV=2 \
|
||||||
-e USER awesome-image:latest
|
-e USER awesome-image:latest
|
||||||
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
@ -778,6 +802,7 @@ Environment=USER=%%a
|
|||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
TimeoutStopSec=70
|
TimeoutStopSec=70
|
||||||
ExecStart=/usr/bin/podman start foobar
|
ExecStart=/usr/bin/podman start foobar
|
||||||
|
ExecStop=/usr/bin/podman stop -t 10 foobar
|
||||||
ExecStopPost=/usr/bin/podman stop -t 10 foobar
|
ExecStopPost=/usr/bin/podman stop -t 10 foobar
|
||||||
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -808,6 +833,7 @@ ExecStart=/usr/bin/podman run \
|
|||||||
--rm \
|
--rm \
|
||||||
--sdnotify=conmon \
|
--sdnotify=conmon \
|
||||||
-d awesome-image:latest
|
-d awesome-image:latest
|
||||||
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
@ -838,6 +864,7 @@ ExecStart=/usr/bin/podman run \
|
|||||||
--sdnotify=conmon \
|
--sdnotify=conmon \
|
||||||
-d \
|
-d \
|
||||||
-h hostname awesome-image:latest
|
-h hostname awesome-image:latest
|
||||||
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
@ -869,6 +896,7 @@ ExecStart=/usr/bin/podman run \
|
|||||||
--rm \
|
--rm \
|
||||||
--sdnotify=conmon \
|
--sdnotify=conmon \
|
||||||
-d awesome-image:latest
|
-d awesome-image:latest
|
||||||
|
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id
|
||||||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id
|
||||||
Type=notify
|
Type=notify
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
|
@ -69,6 +69,8 @@ type podInfo struct {
|
|||||||
ExecStart string
|
ExecStart string
|
||||||
// TimeoutStopSec of the unit.
|
// TimeoutStopSec of the unit.
|
||||||
TimeoutStopSec uint
|
TimeoutStopSec uint
|
||||||
|
// ExecStop of the unit.
|
||||||
|
ExecStop string
|
||||||
// ExecStopPost of the unit.
|
// ExecStopPost of the unit.
|
||||||
ExecStopPost string
|
ExecStopPost string
|
||||||
// Removes autogenerated by Podman and timestamp if set to true
|
// Removes autogenerated by Podman and timestamp if set to true
|
||||||
@ -120,6 +122,7 @@ ExecStartPre={{{{.ExecStartPre1}}}}
|
|||||||
ExecStartPre={{{{.ExecStartPre2}}}}
|
ExecStartPre={{{{.ExecStartPre2}}}}
|
||||||
{{{{- end}}}}
|
{{{{- end}}}}
|
||||||
ExecStart={{{{.ExecStart}}}}
|
ExecStart={{{{.ExecStart}}}}
|
||||||
|
ExecStop={{{{.ExecStop}}}}
|
||||||
ExecStopPost={{{{.ExecStopPost}}}}
|
ExecStopPost={{{{.ExecStopPost}}}}
|
||||||
PIDFile={{{{.PIDFile}}}}
|
PIDFile={{{{.PIDFile}}}}
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -292,6 +295,7 @@ func executePodTemplate(info *podInfo, options entities.GenerateSystemdOptions)
|
|||||||
|
|
||||||
info.EnvVariable = define.EnvVariable
|
info.EnvVariable = define.EnvVariable
|
||||||
info.ExecStart = "{{{{.Executable}}}} start {{{{.InfraNameOrID}}}}"
|
info.ExecStart = "{{{{.Executable}}}} start {{{{.InfraNameOrID}}}}"
|
||||||
|
info.ExecStop = "{{{{.Executable}}}} stop {{{{if (ge .StopTimeout 0)}}}}-t {{{{.StopTimeout}}}}{{{{end}}}} {{{{.InfraNameOrID}}}}"
|
||||||
info.ExecStopPost = "{{{{.Executable}}}} stop {{{{if (ge .StopTimeout 0)}}}}-t {{{{.StopTimeout}}}}{{{{end}}}} {{{{.InfraNameOrID}}}}"
|
info.ExecStopPost = "{{{{.Executable}}}} stop {{{{if (ge .StopTimeout 0)}}}}-t {{{{.StopTimeout}}}}{{{{end}}}} {{{{.InfraNameOrID}}}}"
|
||||||
|
|
||||||
// Assemble the ExecStart command when creating a new pod.
|
// Assemble the ExecStart command when creating a new pod.
|
||||||
@ -370,6 +374,7 @@ func executePodTemplate(info *podInfo, options entities.GenerateSystemdOptions)
|
|||||||
info.ExecStartPre1 = "/bin/rm -f {{{{.PIDFile}}}} {{{{.PodIDFile}}}}"
|
info.ExecStartPre1 = "/bin/rm -f {{{{.PIDFile}}}} {{{{.PodIDFile}}}}"
|
||||||
info.ExecStartPre2 = strings.Join(startCommand, " ")
|
info.ExecStartPre2 = strings.Join(startCommand, " ")
|
||||||
info.ExecStart = "{{{{.Executable}}}} {{{{if .RootFlags}}}}{{{{ .RootFlags}}}} {{{{end}}}}pod start --pod-id-file {{{{.PodIDFile}}}}"
|
info.ExecStart = "{{{{.Executable}}}} {{{{if .RootFlags}}}}{{{{ .RootFlags}}}} {{{{end}}}}pod start --pod-id-file {{{{.PodIDFile}}}}"
|
||||||
|
info.ExecStop = "{{{{.Executable}}}} {{{{if .RootFlags}}}}{{{{ .RootFlags}}}} {{{{end}}}}pod stop --ignore --pod-id-file {{{{.PodIDFile}}}} {{{{if (ge .StopTimeout 0)}}}}-t {{{{.StopTimeout}}}}{{{{end}}}}"
|
||||||
info.ExecStopPost = "{{{{.Executable}}}} {{{{if .RootFlags}}}}{{{{ .RootFlags}}}} {{{{end}}}}pod rm --ignore -f --pod-id-file {{{{.PodIDFile}}}}"
|
info.ExecStopPost = "{{{{.Executable}}}} {{{{if .RootFlags}}}}{{{{ .RootFlags}}}} {{{{end}}}}pod rm --ignore -f --pod-id-file {{{{.PodIDFile}}}}"
|
||||||
}
|
}
|
||||||
info.TimeoutStopSec = minTimeoutStopSec + info.StopTimeout
|
info.TimeoutStopSec = minTimeoutStopSec + info.StopTimeout
|
||||||
|
@ -79,6 +79,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n
|
|||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
TimeoutStopSec=102
|
TimeoutStopSec=102
|
||||||
ExecStart=/usr/bin/podman start jadda-jadda-infra
|
ExecStart=/usr/bin/podman start jadda-jadda-infra
|
||||||
|
ExecStop=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
||||||
ExecStopPost=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
ExecStopPost=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
||||||
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -106,6 +107,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n
|
|||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
TimeoutStopSec=102
|
TimeoutStopSec=102
|
||||||
ExecStart=/usr/bin/podman start jadda-jadda-infra
|
ExecStart=/usr/bin/podman start jadda-jadda-infra
|
||||||
|
ExecStop=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
||||||
ExecStopPost=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
ExecStopPost=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
||||||
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -134,6 +136,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n
|
|||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
TimeoutStopSec=102
|
TimeoutStopSec=102
|
||||||
ExecStart=/usr/bin/podman start jadda-jadda-infra
|
ExecStart=/usr/bin/podman start jadda-jadda-infra
|
||||||
|
ExecStop=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
||||||
ExecStopPost=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
ExecStopPost=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
||||||
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -161,6 +164,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n
|
|||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
TimeoutStopSec=102
|
TimeoutStopSec=102
|
||||||
ExecStart=/usr/bin/podman start jadda-jadda-infra
|
ExecStart=/usr/bin/podman start jadda-jadda-infra
|
||||||
|
ExecStop=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
||||||
ExecStopPost=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
ExecStopPost=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
||||||
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -188,6 +192,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n
|
|||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
TimeoutStopSec=102
|
TimeoutStopSec=102
|
||||||
ExecStart=/usr/bin/podman start jadda-jadda-infra
|
ExecStart=/usr/bin/podman start jadda-jadda-infra
|
||||||
|
ExecStop=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
||||||
ExecStopPost=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
ExecStopPost=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
||||||
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -217,6 +222,7 @@ Environment=PODMAN_SYSTEMD_UNIT=%n
|
|||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
TimeoutStopSec=102
|
TimeoutStopSec=102
|
||||||
ExecStart=/usr/bin/podman start jadda-jadda-infra
|
ExecStart=/usr/bin/podman start jadda-jadda-infra
|
||||||
|
ExecStop=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
||||||
ExecStopPost=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
ExecStopPost=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
||||||
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -243,6 +249,7 @@ TimeoutStopSec=70
|
|||||||
ExecStartPre=/bin/rm -f %t/pod-123abc.pid %t/pod-123abc.pod-id
|
ExecStartPre=/bin/rm -f %t/pod-123abc.pid %t/pod-123abc.pod-id
|
||||||
ExecStartPre=/usr/bin/podman pod create --infra-conmon-pidfile %t/pod-123abc.pid --pod-id-file %t/pod-123abc.pod-id --exit-policy=stop foo
|
ExecStartPre=/usr/bin/podman pod create --infra-conmon-pidfile %t/pod-123abc.pid --pod-id-file %t/pod-123abc.pod-id --exit-policy=stop foo
|
||||||
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-123abc.pod-id
|
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-123abc.pod-id
|
||||||
|
ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/pod-123abc.pod-id -t 10
|
||||||
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-123abc.pod-id
|
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-123abc.pod-id
|
||||||
PIDFile=%t/pod-123abc.pid
|
PIDFile=%t/pod-123abc.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -269,6 +276,7 @@ Restart=on-failure
|
|||||||
RestartSec=15
|
RestartSec=15
|
||||||
TimeoutStopSec=102
|
TimeoutStopSec=102
|
||||||
ExecStart=/usr/bin/podman start jadda-jadda-infra
|
ExecStart=/usr/bin/podman start jadda-jadda-infra
|
||||||
|
ExecStop=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
||||||
ExecStopPost=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
ExecStopPost=/usr/bin/podman stop -t 42 jadda-jadda-infra
|
||||||
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
PIDFile=/run/containers/storage/overlay-containers/639c53578af4d84b8800b4635fa4e680ee80fd67e0e6a2d4eea48d1e3230f401/userdata/conmon.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -296,6 +304,7 @@ TimeoutStopSec=70
|
|||||||
ExecStartPre=/bin/rm -f %t/pod-123abc.pid %t/pod-123abc.pod-id
|
ExecStartPre=/bin/rm -f %t/pod-123abc.pid %t/pod-123abc.pod-id
|
||||||
ExecStartPre=/usr/bin/podman pod create --infra-conmon-pidfile %t/pod-123abc.pid --pod-id-file %t/pod-123abc.pod-id --exit-policy=stop --name foo "bar=arg with space" --replace
|
ExecStartPre=/usr/bin/podman pod create --infra-conmon-pidfile %t/pod-123abc.pid --pod-id-file %t/pod-123abc.pod-id --exit-policy=stop --name foo "bar=arg with space" --replace
|
||||||
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-123abc.pod-id
|
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-123abc.pod-id
|
||||||
|
ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/pod-123abc.pod-id -t 10
|
||||||
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-123abc.pod-id
|
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-123abc.pod-id
|
||||||
PIDFile=%t/pod-123abc.pid
|
PIDFile=%t/pod-123abc.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -323,6 +332,7 @@ TimeoutStopSec=70
|
|||||||
ExecStartPre=/bin/rm -f %t/pod-123abc.pid %t/pod-123abc.pod-id
|
ExecStartPre=/bin/rm -f %t/pod-123abc.pid %t/pod-123abc.pod-id
|
||||||
ExecStartPre=/usr/bin/podman --events-backend none --runroot /root pod create --infra-conmon-pidfile %t/pod-123abc.pid --pod-id-file %t/pod-123abc.pod-id --exit-policy=stop --name foo "bar=arg with space" --replace
|
ExecStartPre=/usr/bin/podman --events-backend none --runroot /root pod create --infra-conmon-pidfile %t/pod-123abc.pid --pod-id-file %t/pod-123abc.pod-id --exit-policy=stop --name foo "bar=arg with space" --replace
|
||||||
ExecStart=/usr/bin/podman --events-backend none --runroot /root pod start --pod-id-file %t/pod-123abc.pod-id
|
ExecStart=/usr/bin/podman --events-backend none --runroot /root pod start --pod-id-file %t/pod-123abc.pod-id
|
||||||
|
ExecStop=/usr/bin/podman --events-backend none --runroot /root pod stop --ignore --pod-id-file %t/pod-123abc.pod-id -t 10
|
||||||
ExecStopPost=/usr/bin/podman --events-backend none --runroot /root pod rm --ignore -f --pod-id-file %t/pod-123abc.pod-id
|
ExecStopPost=/usr/bin/podman --events-backend none --runroot /root pod rm --ignore -f --pod-id-file %t/pod-123abc.pod-id
|
||||||
PIDFile=%t/pod-123abc.pid
|
PIDFile=%t/pod-123abc.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -350,6 +360,7 @@ TimeoutStopSec=70
|
|||||||
ExecStartPre=/bin/rm -f %t/pod-123abc.pid %t/pod-123abc.pod-id
|
ExecStartPre=/bin/rm -f %t/pod-123abc.pid %t/pod-123abc.pod-id
|
||||||
ExecStartPre=/usr/bin/podman pod create --infra-conmon-pidfile %t/pod-123abc.pid --pod-id-file %t/pod-123abc.pod-id --exit-policy=stop --name foo --replace
|
ExecStartPre=/usr/bin/podman pod create --infra-conmon-pidfile %t/pod-123abc.pid --pod-id-file %t/pod-123abc.pod-id --exit-policy=stop --name foo --replace
|
||||||
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-123abc.pod-id
|
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-123abc.pod-id
|
||||||
|
ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/pod-123abc.pod-id -t 10
|
||||||
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-123abc.pod-id
|
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-123abc.pod-id
|
||||||
PIDFile=%t/pod-123abc.pid
|
PIDFile=%t/pod-123abc.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
@ -377,6 +388,7 @@ TimeoutStopSec=70
|
|||||||
ExecStartPre=/bin/rm -f %t/pod-123abc.pid %t/pod-123abc.pod-id
|
ExecStartPre=/bin/rm -f %t/pod-123abc.pid %t/pod-123abc.pod-id
|
||||||
ExecStartPre=/usr/bin/podman pod create --infra-conmon-pidfile %t/pod-123abc.pid --pod-id-file %t/pod-123abc.pod-id --name foo --label key={{someval}} --exit-policy=continue --replace
|
ExecStartPre=/usr/bin/podman pod create --infra-conmon-pidfile %t/pod-123abc.pid --pod-id-file %t/pod-123abc.pod-id --name foo --label key={{someval}} --exit-policy=continue --replace
|
||||||
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-123abc.pod-id
|
ExecStart=/usr/bin/podman pod start --pod-id-file %t/pod-123abc.pod-id
|
||||||
|
ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/pod-123abc.pod-id -t 10
|
||||||
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-123abc.pod-id
|
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/pod-123abc.pod-id
|
||||||
PIDFile=%t/pod-123abc.pid
|
PIDFile=%t/pod-123abc.pid
|
||||||
Type=forking
|
Type=forking
|
||||||
|
@ -566,6 +566,7 @@ var _ = Describe("Podman generate systemd", func() {
|
|||||||
Expect(session.OutputToString()).To(ContainSubstring("BindsTo=pod-foo.service"))
|
Expect(session.OutputToString()).To(ContainSubstring("BindsTo=pod-foo.service"))
|
||||||
Expect(session.OutputToString()).To(ContainSubstring("pod create --infra-conmon-pidfile %t/pod-foo.pid --pod-id-file %t/pod-foo.pod-id --exit-policy=stop --name foo"))
|
Expect(session.OutputToString()).To(ContainSubstring("pod create --infra-conmon-pidfile %t/pod-foo.pid --pod-id-file %t/pod-foo.pod-id --exit-policy=stop --name foo"))
|
||||||
Expect(session.OutputToString()).To(ContainSubstring("ExecStartPre=/bin/rm -f %t/pod-foo.pid %t/pod-foo.pod-id"))
|
Expect(session.OutputToString()).To(ContainSubstring("ExecStartPre=/bin/rm -f %t/pod-foo.pid %t/pod-foo.pod-id"))
|
||||||
|
Expect(session.OutputToString()).To(ContainSubstring("pod stop --ignore --pod-id-file %t/pod-foo.pod-id -t 10"))
|
||||||
Expect(session.OutputToString()).To(ContainSubstring("pod rm --ignore -f --pod-id-file %t/pod-foo.pod-id"))
|
Expect(session.OutputToString()).To(ContainSubstring("pod rm --ignore -f --pod-id-file %t/pod-foo.pod-id"))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user