Bug 1729369 - podman play kube failed to setup the container's command based on the yaml file
Summary: podman play kube failed to setup the container's command based on the yaml file
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: podman
Version: 7.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Peter Hunt
QA Contact: Martin Jenner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-12 06:01 UTC by Joy Pu
Modified: 2020-05-18 18:37 UTC (History)
7 users (show)

Fixed In Version: podman-1.5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-18 18:37:42 UTC
Target Upstream Version:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.