Bug 1729369

Summary: podman play kube failed to setup the container's command based on the yaml file
Product: Red Hat Enterprise Linux 7 Reporter: Joy Pu <ypu>
Component: podmanAssignee: Peter Hunt <pehunt>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Jenner <mjenner>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.6CC: dwalsh, jligon, jnovy, lsm5, mheon, r.bruggink, umohnani
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: podman-1.5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-18 18:37:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joy Pu 2019-07-12 06:01:56 UTC
Description of problem:

Use podman play kube to create a pod and a container. The command can finished normally and the pod and container is created. But the command line in the container is not set up correctly as expect.


Version-Release number of selected component (if applicable):
podman-1.4.4-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare a test-pod.yml file for the test
# cat test-pod.yml 
Version: v1
kind: Pod
metadata:
  labels:
    app: pod-initcontainer
  name: pod-initcontainer
spec:
  containers:
  - name: test_container
    image: busybox
    command:
      - echo
      - "3600"
    imagePullPolicy: IfNotPresent
2. Create pod and container with podman play kube
# podman play kube test-pod.yml
3. Check the container with podman ps -a --pod
# podman ps -a --pod
4. Check the command run result with podman logs test_container
# podman logs test_container

Actual results:
Command shows in step 3 is "sh" but not "echo 3600" and podman logs shows nothing.
# podman  ps -a --pod
CONTAINER ID  IMAGE                 COMMAND  CREATED      STATUS                  PORTS  NAMES               POD
81ac82e4d4dc  busybox               sh       3 hours ago  Exited (0) 3 hours ago         test_container      a65776792cd0
f91f9171cd71  k8s.gcr.io/pause:3.1           3 hours ago  Up 3 hours ago                 a65776792cd0-infra  a65776792cd0

#podman logs test_container


Expected results:
Command shows in step 3 should be "echo 3600", and we can get "3600" from podman logs.

Additional info:

Comment 2 Peter Hunt 2019-07-17 16:56:41 UTC
I have opened a PR to fix this upstream as well as prevent similar regressions in the future:
https://github.com/containers/libpod/pull/3588

Comment 3 Daniel Walsh 2019-08-14 10:45:04 UTC
Fixed in podman 1.5.

Comment 7 Peter Hunt 2020-05-18 18:37:42 UTC
closing because podman 1.6.4 is in rhel 7.8. please reopen if you disagree with that decision