Skip to content

Commit

Permalink
Merge pull request #9050 from xcffl/doc-rm-pod-before-start-systemd-s…
Browse files Browse the repository at this point in the history
…ervice

[ci:docs] Add a notice to remove pods/containers before starting the systemd service
  • Loading branch information
openshift-merge-robot authored Jan 22, 2021
2 parents f02aba6 + 94f96c7 commit 47616fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/source/markdown/podman-auto-update.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ $ podman generate systemd --new --files bc219740a210455fa27deacc96d50a9e20516492
# Load the new systemd unit and start it
$ mv ./container-bc219740a210455fa27deacc96d50a9e20516492f1417507c13ce1533dbdcd9d.service ~/.config/systemd/user
$ systemctl --user daemon-reload
# If the previously created containers or pods are using shared resources, such as ports, make sure to remove them before starting the generated systemd units.
$ podman stop bc219740a210455fa27deacc96d50a9e20516492f1417507c13ce1533dbdcd9d
$ podman rm bc219740a210455fa27deacc96d50a9e20516492f1417507c13ce1533dbdcd9d
$ systemctl --user start container-bc219740a210455fa27deacc96d50a9e20516492f1417507c13ce1533dbdcd9d.service
# Auto-update the container
Expand Down
2 changes: 2 additions & 0 deletions docs/source/markdown/podman-generate-systemd.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ Create and enable systemd unit files for a pod using the above examples as refer

Since systemctl defaults to using the root user, all the changes using the systemctl can be seen by appending sudo to the podman cli commands. To perform `systemctl` actions as a non-root user use the `--user` flag when interacting with `systemctl`.

Note: If the previously created containers or pods are using shared resources, such as ports, make sure to remove them before starting the generated systemd units.

```
$ systemctl --user start pod-systemd-pod.service
$ podman pod ps
Expand Down

0 comments on commit 47616fe

Please sign in to comment.