-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ci:docs] Add a notice to remove pods/containers before starting the systemd service #9050
[ci:docs] Add a notice to remove pods/containers before starting the systemd service #9050
Conversation
@vrothberg PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not needed any more. The generated unit files take care of removing. May be you're running an older version of Podman?
I'm using podman version 2.2.1 which is the latest for fedora 33. Is there any way to install a newer one? Maybe you are refering to podman 3.0 which is not available to fedora 33 yet? |
|
||
# The corresponding pod/container previously created must be removed before starting the pod/container through the systemd service | ||
$ podman stop bc219740a210455fa27deacc96d50a9e20516492f1417507c13ce1533dbdcd9d | ||
$podman rm bc219740a210455fa27deacc96d50a9e20516492f1417507c13ce1533dbdcd9d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one must not be replaced. I just reran the script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix it after we figure out the complete instruction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@xcffl, can you elaborate why the pods/containers must be removed before starting the systemd units? I see two cases where this would be needed:
|
Here is what I do: ❯ cat create-pod-systemd-service.sh
#!/bin/bash
POD_NAME=${PWD##*/}
podman-compose down && podman-compose up -d
podman generate systemd --new --files --name $POD_NAME
cp *.service $HOME/.config/systemd/user
podman-compose down
systemctl --user daemon-reload
systemctl --user enable --now pod-$POD_NAME If I remove the second |
@xcffl can you share the error you're seeing? |
And the original pod is still alive |
Can you check via I propose to reword the proposed changes a bit to: "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." |
Thanks! This should not happen as the unit files should be generated with |
|
need rebase to one commit |
923a942
to
74a00a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Signed-off-by: xcffl <[email protected]>
Sure. Done. |
74a00a7
to
94f96c7
Compare
@zhangguanzhang @rhatdan PTAL |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: xcffl The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The pods/containers have to be removed before starting the corresponding systemd service. Otherwise the service will fail. That hasn't been written into the doc. This PR adds that.