summaryrefslogtreecommitdiff
path: root/docs/source/markdown
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-09-13 09:38:42 +0200
committerValentin Rothberg <vrothberg@redhat.com>2022-09-13 10:59:57 +0200
commit0ea5080c9156853b7806879226e23ab0405815d6 (patch)
tree1a706b88a6aee2740d21b85c0e1c9dc7ecc48f7c /docs/source/markdown
parent4aeaeafde54eb223468ae3ea8425ab548e90e8e8 (diff)
downloadpodman-0ea5080c9156853b7806879226e23ab0405815d6.tar.gz
podman-0ea5080c9156853b7806879226e23ab0405815d6.tar.bz2
podman-0ea5080c9156853b7806879226e23ab0405815d6.zip
generate systemd: warn on --restart without --new
Emit a warning to the user when generating a unit with --new on a container that was created with a custom --restart policy. As shown in #15284, a custom --restart policy in that case can lead to issues on system shutdown where systemd attempts to nuke the unit but Podman keeps on restarting the container. Fixes: #15284 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Diffstat (limited to 'docs/source/markdown')
-rw-r--r--docs/source/markdown/podman-generate-systemd.1.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/source/markdown/podman-generate-systemd.1.md b/docs/source/markdown/podman-generate-systemd.1.md
index ee649c95b..b733cff8d 100644
--- a/docs/source/markdown/podman-generate-systemd.1.md
+++ b/docs/source/markdown/podman-generate-systemd.1.md
@@ -85,7 +85,9 @@ Set the systemd unit requires (`Requires=`) option. Similar to wants, but declar
#### **--restart-policy**=*policy*
Set the systemd restart policy. The restart-policy must be one of: "no", "on-success", "on-failure", "on-abnormal",
-"on-watchdog", "on-abort", or "always". The default policy is *on-failure*.
+"on-watchdog", "on-abort", or "always". The default policy is *on-failure* unless the container was created with a custom restart policy.
+
+Note that generating a unit without `--new` on a container with a custom restart policy can lead to issues on shutdown; systemd will attempt to stop the unit while Podman tries to restart it. It is recommended to to create the container without `--restart` and use the `--restart-policy` option instead when generating the unit file.
#### **--restart-sec**=*time*