-
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 play kube bin/sh syntax error #8428
Comments
@haircommander I seem to recall that |
if you only set the entry point, then it only uses the entry point for the command. https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes |
hm but neither are set in the yaml, which means we're not correctly getting the command from the image |
@PinkJohnOfUs Any chance you can try with the Podman 2.2.0 RC? We did a rewrite of the |
@mheon the bug appeared after rewrite of
Can't tell you wich commit is causing this bug, but at least it isn't in issue with commit: |
I can confirm that this is not working with Podman 2.2.0 RC. |
@PinkJohnOfUs Can you confirm that this only appeared after 2.2.0-rc1? Your original bug report was filed against 2.1.1. Does the bug happen with both, or just 2.2.0-rc1? |
@mheon I can confirm that this appeared after 2.2.0-rc1, it is not happening with 2.1.1. The output of |
Also tested it with v2.2.0 and it is still not working.
|
Hi, I am observing the same problem with podman version 2.2+ (up to latest master) on Arch Linux. When I updated, I experienced continuously restarting containers in pods, started from apiVersion: v1
kind: Pod
metadata:
labels:
app: web
name: web_pod
spec:
restartPolicy: Never
containers:
- name: nginx
image: docker.io/nginx:mainline-alpine I did a bit of digging and found out that the combination of FROM docker.io/alpine:latest
ENTRYPOINT ["/bin/sh", "-c"]
CMD ["while true; do cat /etc/os-release; sleep 1; done"] Note: moving the For me this bug is a show-stopper. I did see the extent of breakage after updating on my server. I am using the |
In light of this, the following line doesn't seem right: podman/pkg/specgen/generate/kube/kube.go Line 119 in 5c6b5ef
Additionally the code doesn't seem to care about imageData.Config.Cmd .
|
fix: |
Should be fixed by #8807 |
/kind bug
When starting a container with podman play kube that uses /bin/sh as Entry point and a shell script as command,
container is behaving unexpected on start. If starting the same script from within the container and not on "Build Time", meaning setting only entrypoint to /bin/sh and starting run.sh by hand without setting cmd in Dockerfile, it is working.
It is not possible to use a shell script as CMD["myshellscript"] in Dockerfile to build a container that starts this script with an kube.yml file with podman play kube.
podman build . --tag bugimage
https://gist.github.com/PinkJohnOfUs/848bfa32186cb562bf853e303ac93649#file-dockerfile
https://gist.github.com/PinkJohnOfUs/848bfa32186cb562bf853e303ac93649#file-run-sh
Run the container with play kube:
podman play kube playkube.yml
https://gist.github.com/PinkJohnOfUs/848bfa32186cb562bf853e303ac93649#file-playkube-yml
Take a look into bugreport container logs:
podman logs bash-bug-pod-0-bugcontainer
Result:
Logs showing:
I would expect logs showing
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):That is strange expected to be 2.2.0 ??
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Tested with release candidate 2.2. on physical device
The text was updated successfully, but these errors were encountered: