-
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
'--infra-command' parameter in pod create not working as expected #7167
Comments
In case another image is specified, we default to the image's entrypoint. I think that behaviour is sane. However, if we specify a custom @mheon, I'll hand this over to you as I won't be able to tackle it today. Feel free to reassign to me if you don't find time today.
I also noted that containers.conf doesn't account for arguments, so we could shlex the input from there as well. It looks like there are a couple of things to unpack. We also need tests for infra-command. |
I think what we should do if have InfraCommand and InfraArgs - InfraCommand can be the entrypoint and remains a string, and we gain the ability to set arguments for it with InfraArgs, a []string appended to the command. It's a little awkward but it keeps backwards compat. |
I (weakly) prefer |
Why not make it compatible with |
Pods don't need to have infra containers - we actually have (loose) plans to replace them with pinned namespaces in the future - so I'm hesitant to make their arguments a required part of the pod command. |
A friendly reminder that this issue had no activity for 30 days. |
@mheon, I assigned the issue to you. I simply forgot to unassign myself before. |
@ParkerVR PTAL |
- podman network create: new test - podman pull by-sha + podman images -a (containers#7651) - podman image mount: new test - podman pod: --infra-image and --infra-command (containers#7167) For convenience and robustness, build a new testimage containing a custom file /home/podman/testimage-id with contents YYYYMMDD (same as image tag). The image-mount test checks that this file exists and has the desired content. New testimage also includes a dummy 'pause' executable, for testing pod infra. Updates from testimage:20200902 to :20200917 Signed-off-by: Ed Santiago <[email protected]>
I believe this is now fixed, reopen if I am mistaken. |
/kind bug
Description
Running the following command
podman pod create --infra-image alpine --infra-command 'sleep 1000' --name pod-1
will create
pod-1
with and infra container whose command is/bin/bash
and notsleep 1000
as specified in the arguments.I would expect that the infra container created would now have an EntryPoint equal to
sleep
1000`. Instead I get the following configuration.Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Package info (e.g. output of
rpm -q podman
orapt list podman
):The text was updated successfully, but these errors were encountered: