summaryrefslogtreecommitdiff
path: root/docs/source/markdown
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-03-26 15:59:12 +0000
committerGitHub <noreply@github.com>2021-03-26 15:59:12 +0000
commit47006d32ed6648d4e4e3904ce480a2dbfab056cd (patch)
tree2b50463a64a7bf84010e0d2612cbcd571d911b7c /docs/source/markdown
parentfa6ba9b00fb5f77ead67b624be510ec50b2f4f5e (diff)
parent748826fc88fcdba373dfcb0986bc3c08b8b858fe (diff)
downloadpodman-47006d32ed6648d4e4e3904ce480a2dbfab056cd.tar.gz
podman-47006d32ed6648d4e4e3904ce480a2dbfab056cd.tar.bz2
podman-47006d32ed6648d4e4e3904ce480a2dbfab056cd.zip
Merge pull request #9726 from tunacado/add_runroot_mount_require_to_systemd_gen
Add RequiresMountsFor= to systemd generate
Diffstat (limited to 'docs/source/markdown')
-rw-r--r--docs/source/markdown/podman-generate-systemd.1.md9
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/source/markdown/podman-generate-systemd.1.md b/docs/source/markdown/podman-generate-systemd.1.md
index 00b13669a..43cb30f59 100644
--- a/docs/source/markdown/podman-generate-systemd.1.md
+++ b/docs/source/markdown/podman-generate-systemd.1.md
@@ -61,7 +61,7 @@ Set the systemd unit name separator between the name/id of a container/pod and t
### Generate and print a systemd unit file for a container
-Generate a systemd unit file for a container running nginx with an *always* restart policy and 1-second timeout to stdout.
+Generate a systemd unit file for a container running nginx with an *always* restart policy and 1-second timeout to stdout. Note that the **RequiresMountsFor** option in the **Unit** section ensures that the container storage for both the GraphRoot and the RunRoot are mounted prior to starting the service. For systems with container storage on disks like iSCSI or other remote block protocols, this ensures that Podman is not executed prior to any necessary storage operations coming online.
```
$ podman create --name nginx nginx:latest
@@ -73,6 +73,9 @@ $ podman generate systemd --restart-policy=always -t 1 nginx
[Unit]
Description=Podman container-de1e3223b1b888bc02d0962dd6cb5855eb00734061013ffdd3479d225abacdc6.service
Documentation=man:podman-generate-systemd(1)
+Wants=network.target
+After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/container/storage
[Service]
Restart=always
@@ -101,6 +104,7 @@ Description=Podman container-busy_moser.service
Documentation=man:podman-generate-systemd(1)
Wants=network.target
After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/container/storage
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
@@ -140,6 +144,9 @@ Description=Podman pod-systemd-pod.service
Documentation=man:podman-generate-systemd(1)
Requires=container-amazing_chandrasekhar.service container-jolly_shtern.service
Before=container-amazing_chandrasekhar.service container-jolly_shtern.service
+Wants=network.target
+After=network-online.target
+RequiresMountsFor=/var/lib/containers/storage /var/run/container/storage
[Service]
Restart=on-failure