-
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
Array-like --entrypoint [ "cmd" ] syntax not supported in podman run (in systemd file), but supported in podman create (via podman-compose)? #12477
Comments
Thanks for reaching out. Can you share a reproducer that we can copy-paste one-by-one? |
As I am not sure what exactly causes this issue I am a little afraid I cannot. The YAML file itself is quite big and I would need to remove a lot of sensitive stuff etc. But for sure I'll soon try that again with Nextcloud v23. |
Thank you, @rugk, I appreciate it! |
Okay, same error with Nextcloud v23…
Also I tried generating the systemd unit files without
The first thing, Here is podman compose:
|
Thank you, that should give me enough to chew on. Probably related to |
No, but |
Can you replace |
The notation in brackets isn't supported in create/run but I wonder: did |
Yes it did. 🙃 Or well… somewhat…
Yeees. Thaaanks a lot! This actually solved it. 🎉 It does not really explain why my previous try with re-using containers without |
Alos, BTW, when you fix that, is there anything you can do to (also or at least) improve that crazy error message? Saying
|
Ohh, maybe it is about the difference of $ podman run --entrypoint /hello hello-world # -> works
$ podman run --entrypoint ["/hello"] hello-world # -> fails (or variants of that)
$ podman start $(podman create -q --entrypoint /hello hello-world) # -> works
$ podman start $(podman create -q --entrypoint [/hello] hello-world) # -> fails (or variants of that) Okay no, that works as expected. Huh, I wonder why that |
The error message comes from the runtime (e.g., runc or crun). I understand it's confusing in this specific issue but I have no idea how we could improve the error message. Thanks for tracking the issue down. I will have a close look and see what we can do. |
Found the issue and prepared a fix in #12545. If the specified entrypoint is an array/slice, then it must be specified as a JSON string. |
Make sure to preserve the quoting of entrypoint JSON strings. Fixes: containers#12477 Signed-off-by: Valentin Rothberg <[email protected]>
That sounds great, thanks! 🙂 And thanks a lot your work and debugging that! 👍 |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Starting my
Steps to reproduce the issue:
I used podman-compose to create podman containers/a pod.
The thing is, with podman-compose everything starts fine, but as soon as I use
podman
to generate systemd units out of it and start it as rootless (i.e.--user
) services, it fails.Specifically, I see issues with the Nextcloud Cron service.
Here is the YAML part:
The references YAML variables are:
Here the generated service with `podman generate systemd "$serviceName" --restart-policy=always --new --name --files
Describe the results you received:
Specifically, I get this error:
Which indicates it cannot find the included cron script inside of the container, which is absolutely strange. To workaround this, I tried manually editing the command line and replaced
--entrypoint ["/cron.sh"]
with--entrypoint ["sh", "/cron.sh"]
, whcih should be the same.Interestingly, I get a completely strange PIDFile error from podman then:
Describe the results you expected:
Start as usual, file needs to be found.
Additional information you deem important (e.g. issue happens only occasionally):
N/A
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)
Not easily doable, however only a minor release is between the current one and I checked the changelog and found nothing apparent.
Additional environment details (AWS, VirtualBox, physical, etc.):
Physical, Fedora CoreOs Stable v35.20211029.3.0 (2021-11-17T23:45:08Z)
Starting via
podman-compose
:Also, the same YAML file has worked previously and I am not sure what has changed now. I alos, unsuccessfully, tried rebooting, in case that CIDFile error was some overflow of too many files (due to the healthcheck system properly stops containers and restarts them trying to fix that crazy issue).
The text was updated successfully, but these errors were encountered: