-
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 run --cidfile creates cid file containing cid in the long form but podman rm --cidfile expects the short form #11356
Comments
This looks like a red herring (i.e., we're looking at the wrong thing). What makes you conclude that Can try a simple reproducer? |
The result is: |
@PavelSosin-320, did you execute the entire command as pasted?
|
@vrothberg The above command sequence works for me on Podman-Fedora34-WSL Podman 3.2.3 but the following doesn't work on the native Podman 3.3 - Fedora34:
[pavelsosin@fedora user]$ ls $XDG_RUNTIME_DIR/ Regression? |
@vrothberg Related: maybe, ConditionPathExists=!%t/container-theiaUnit.ctr-id is more reliable than rm files for keeping the running container singleton. It writes to the log only: |
This looks good to me. Please share a minimal reproducer . IMHO |
The differences between minimal reproducer and my scenario are
|
Sorry, I do not understand what's going on. The short-form vs. long-form thing does not hold to be true. If the Doesn't the systemd unit handle the case already when the container has been removed? See **--ignore **. |
Ignore potentially changes the state without the notice. I don't know if the container stopped and removed Systemd manages the Unit's lifecycle but not the container's lifecycle. Theia can eventually fail to load vscode plugins and it happens. A simple restart of the Theia container recovers Theia. But I can't run Theia again because TCP port, name, and workspace volumes are in use. Podman run and Podman restart is not the same things. Early or later I will need systemctl restart and Restart-on-failure with tiny restart drop-in containing only podman restart -l line. |
Further testa pointed that the root cause of the systemd unit instability is a simple bug in the Podman run command: when I use the --replace option I expect that both pid and conmon pid files are replaced unconditionally. Podman container rm must cleanup pid files too without any additional actions because these files will contain incorrect values. So rm files command as PreExec action is redundant. The cost of rm action is significant because it creates a separate process that has the potential to become zombie. Since systemd sees conmon as a main process PID and it always can be achieved using systemctl [--user] show --property =MainPid --conmon-pidfile creates an additional file to memorize the property that is already memorized by the Sytemd manager. |
That is not how --replace works (nor how it's documented to work). I like the idea but I don't see it as a bug. --replace will only replace the container but not any cid or pid files.
That would be a breaking change. Some users may very well depend on these files to not be removed. That's why the generated unit files do it during ExecStartPre.
I doubt that a
Systemd only sees conmon as the main PID because Podman is writing the PID file. Otherwise, systemd may chose another process in cgroup as the main (e.g., podman or fuse-overlayfs). Again. Please share a reproducer that supports your theories. The generated units are well tested and unless they have been changed manually, they should work. Given that WSL 2 doesn't support systemd yet, I cannot exclude the chance of the custom systemd on your machine having issues. But again, without a clear reproducer, I am unable to resolve the issue and I don't want to speculate. |
@vrothberg Hi, This is exactly the issue: I'm testing on the plain Fedora34 WS with Podman 3.3 in the regular GNome session's terminal. But nothing works as expected:
|
@PavelSosin-320, can you share the exact commands to reproduce the issue? Step by step. |
@vrothberg Sorry! This is actually the dup #4678 but with huge complications: My local WiFi network is actually pure IPV6 because my ISP advertises this configuration via my WiFi router The only active link from my LinuxWS to the outside world is wlo1 with IPV6 address. My LAN has IPV6 address including DNS forwarder inside my OpenWRT router IPV6 enabled. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Generated by Podman systemd unit fails because Podman stop and Podman rm commands generated for
ExecStart=, ExecStop=, ExecStopPost= SystemdUnit.service values of the Service file produce and expect different CID formats
Steps to reproduce the issue:
Describe the results you received:
The unit fails because although the container is running,cid file exists, the podman stop and podman rm fail to run using the long format
Describe the results you expected:
Podman container is manageable using generated Systemd unit
Additional information you deem important (e.g. issue happens only occasionally):
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? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Plain Fedora 34 Workstation.
P.S. The generated timeout values have to take into account the time of all Pre and Post actions like
google-chrome --app http://localhost:3000 --new-window ... takes time even in the kiosk mode.
The text was updated successfully, but these errors were encountered: