-
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
podman will duplicate some of the parameters of a container executed with a systemd unit file by generating it again #9776
Comments
Why do you want to regenerate the same file when you already have a running systemd unit? |
I only updated the scripts that podman 2.0.4 generated |
This makes sense. We already check for the --name flag so checking for other flags should be easy. |
wdym |
I was wondering why you would want to do this. Updating the files after a podman upgrade sounds reasonable to me. |
podman generate systemd --new inserts extra idfile arguments. The generated unit can break when the user did provide their own idfile arguments as they overwrite the arguments added by generate systemd. This also happens when a user tries to generate the systemd unit on a container already create with a --new unit. This should now create a identical unit. The solution is to remove all user provided idfile arguments. This commit also ensures that we do not remove arguments that are part off the containers entrypoint. Fixes containers#9776 Signed-off-by: Paul Holzinger <[email protected]>
podman generate systemd --new inserts extra idfile arguments. The generated unit can break when the user did provide their own idfile arguments as they overwrite the arguments added by generate systemd. This also happens when a user tries to generate the systemd unit on a container already create with a --new unit. This should now create a identical unit. The solution is to remove all user provided idfile arguments. This commit also ensures that we do not remove arguments that are part off the containers entrypoint. Fixes containers#9776 Signed-off-by: Paul Holzinger <[email protected]>
podman generate systemd --new inserts extra idfile arguments. The generated unit can break when the user did provide their own idfile arguments as they overwrite the arguments added by generate systemd. This also happens when a user tries to generate the systemd unit on a container already create with a --new unit. This should now create a identical unit. The solution is to remove all user provided idfile arguments. This commit also ensures that we do not remove arguments that are part off the containers entrypoint. Fixes containers#9776 Signed-off-by: Paul Holzinger <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
podman will duplicate some of the parameters of a container executed with a systemd unit file by generating it again
Steps to reproduce the issue:
Run the container
# podman run --name t --rm busybox sleep 810
generate systemd unit files
# podman generate systemd --files --new --name t
stop the container started in the first step
# podman stop t
Start the container with the unit file generated in step 2
# cp *.service -t /etc/systemd/system && systemctl start container-t
repeat step 2
Describe the results you received:
In the container: the --common-pidfile, --cidfile, --cgroups arguments repeat the arguments already in the previous systemd unit file on top of the podman generation
In pods: the --infra-conmon-pidfile parameter repeats the parameters of the last systemd unit file on top of those generated by podman
Describe the results you expected:
If in a container: only one podman-generated --conmon-pidfile, --cidfile, --cgroups parameter
If in a pod: only one podman-generated --infra-conmon-pidfile parameter
Additional information you deem important (e.g. issue happens only occasionally):
none
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
ArchLinux on VirtualBox
The text was updated successfully, but these errors were encountered: