Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
When using `podman play kube <YAML FILE>` in RHEL8 (or, subsequently, RHEL7), the "command" directive is ignored, and instead defaults to /bin/bash.
Using this example for a YAML file:
version: v1
kind: Pod
metadata:
name: sleep-pod
spec:
containers:
- command: ["/usr/bin/sleep", "5"]
image: ubi8/ubi
name: sleep-container
status: {}
When we play the pod, we do not get '/usr/bin/sleep' as the CMD, but rather /bin/bash:
# podman play kube pod.yaml
Pod:
f2835d9b9a3aa9e02aea68b99d337d12391de4351830fe9ff9cf938492cdd3da
Container:
2867ab7738d4173ec4d60ffe4e5205e264b3fc4ecf98cbf0d3414c51b90b75d6
# podman pod ps
POD ID NAME STATUS CREATED # OF CONTAINERS INFRA ID
f2835d9b9a3a sleep-pod Running 3 minutes ago 1 9ce7bbce16bf
# podman ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2867ab7738d4 registry.access.redhat.com/ubi8/ubi /bin/bash 9 seconds ago Exited (0) 8 seconds ago sleep-container
This appears to be fixed by this commit:
https://github.com/containers/libpod/commit/fb9e1d7d9f332e513d392c7b8ccf1093807bb1a0
commit fb9e1d7d9f332e513d392c7b8ccf1093807bb1a0
Author: Chen Zhiwei <zhiweik>
Date: Wed Aug 14 07:13:24 2019 +0000
Fix play kube command in pod yaml
Signed-off-by: Chen Zhiwei <zhiweik>
If we use the next branch this is included in, the problem is resolved; I compiled 1.5.1 (compiling on the exact commit causes execution errors due to another bug):
$ git tag --contains=fb9e1d7d9f332e513d392c7b8ccf1093807bb1a0
v1.5.1
v1.6.0
v1.6.0-rc1
v1.6.0-rc2
v1.6.1
v1.6.1-rc1
v1.6.2
v1.6.2-rc1
v1.6.3
v1.6.4
v1.7.0
v1.7.0-rc1
v1.7.0-rc2
Opening this BZ to ensure this makes it into the next release from upstream as a backport.
Version-Release number of selected component (if applicable):
podman-1.4.2-6.module+el8.1.0+4830+f49150d7.x86_64
How reproducible:
Every time
Steps to Reproduce:
Steps are provided above with YAML file.
Actual results:
Command from `podman play kube` is always /bin/bash instead of actual container command
Expected results:
Command should always be specified container command.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2020:1650
Description of problem: When using `podman play kube <YAML FILE>` in RHEL8 (or, subsequently, RHEL7), the "command" directive is ignored, and instead defaults to /bin/bash. Using this example for a YAML file: version: v1 kind: Pod metadata: name: sleep-pod spec: containers: - command: ["/usr/bin/sleep", "5"] image: ubi8/ubi name: sleep-container status: {} When we play the pod, we do not get '/usr/bin/sleep' as the CMD, but rather /bin/bash: # podman play kube pod.yaml Pod: f2835d9b9a3aa9e02aea68b99d337d12391de4351830fe9ff9cf938492cdd3da Container: 2867ab7738d4173ec4d60ffe4e5205e264b3fc4ecf98cbf0d3414c51b90b75d6 # podman pod ps POD ID NAME STATUS CREATED # OF CONTAINERS INFRA ID f2835d9b9a3a sleep-pod Running 3 minutes ago 1 9ce7bbce16bf # podman ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 2867ab7738d4 registry.access.redhat.com/ubi8/ubi /bin/bash 9 seconds ago Exited (0) 8 seconds ago sleep-container This appears to be fixed by this commit: https://github.com/containers/libpod/commit/fb9e1d7d9f332e513d392c7b8ccf1093807bb1a0 commit fb9e1d7d9f332e513d392c7b8ccf1093807bb1a0 Author: Chen Zhiwei <zhiweik> Date: Wed Aug 14 07:13:24 2019 +0000 Fix play kube command in pod yaml Signed-off-by: Chen Zhiwei <zhiweik> If we use the next branch this is included in, the problem is resolved; I compiled 1.5.1 (compiling on the exact commit causes execution errors due to another bug): $ git tag --contains=fb9e1d7d9f332e513d392c7b8ccf1093807bb1a0 v1.5.1 v1.6.0 v1.6.0-rc1 v1.6.0-rc2 v1.6.1 v1.6.1-rc1 v1.6.2 v1.6.2-rc1 v1.6.3 v1.6.4 v1.7.0 v1.7.0-rc1 v1.7.0-rc2 Opening this BZ to ensure this makes it into the next release from upstream as a backport. Version-Release number of selected component (if applicable): podman-1.4.2-6.module+el8.1.0+4830+f49150d7.x86_64 How reproducible: Every time Steps to Reproduce: Steps are provided above with YAML file. Actual results: Command from `podman play kube` is always /bin/bash instead of actual container command Expected results: Command should always be specified container command.