Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1223547 - When a command cannot be found in a Docker container the error displayed complains about HTTP error code
When a command cannot be found in a Docker container the error displayed comp...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Container Management (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity medium (vote)
: GA
: Unused
Assigned To: Daniel Lobato Garcia
Lukas Pramuk
: ReleaseNotes, Triaged
Depends On:
Blocks: sat61-release-notes
  Show dependency treegraph
 
Reported: 2015-05-20 16:25 EDT by Og Maciel
Modified: 2016-07-27 07:17 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 07:17:34 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Error message displayed in the ui (121.22 KB, image/png)
2015-05-20 16:25 EDT, Og Maciel
no flags Details

  None (edit)
Description Og Maciel 2015-05-20 16:25:37 EDT
Created attachment 1027854 [details]
Error message displayed in the ui

Description of problem:

The attached screenshot shows that when the command that you pass to a Docker container cannot be found, an error complaining about the HTTP error code returned is displayed. This is not very useful because the real issue, the fact that the command passed cannot be found, is not being passed on to the user.

Version-Release number of selected component (if applicable):

* Satellite 6.1 GA SNAP 5

How reproducible:


Steps to Reproduce:
1. Try to provision a new Docker container
2. Pass a made up command (i.e. zebra) to the container
3.

Actual results:

The UI displays the error:  "Error - Expected([200, 201, 202, 203, 204, 304]) <=> Actual(404 Not Found)"

Expected results:

The UI should inform the user that the command was not found (equivalent to what you'd get if you were to run docker start on the container itself; see below)



Additional info:

[root@ibm-x3250m4-03 ~]# docker ps -a                                                CONTAINER ID        IMAGE                                                                                     COMMAND             CREATED             STATUS              PORTS               NAMES
c70697875e53        registry.access.redhat.com:443/rhel7:latest                                               "/usr/bin/top"      8 minutes ago                                               docker-rhel7-1
d912c458943b        centos:7                                                                                  "/bin/bash"         29 minutes ago      Up 15 minutes                           partha-test
7e5527c77e1a        registry.access.redhat.com:443/rhel7.0:latest                                             "/usr/bin/top"      About an hour ago                                           docker-rhel70-1
d9cb731b1d4f        mongo:latest                                                                              "/usr/bin/top"      About an hour ago                                           docker-mongo-1
4bf9e9e96ab9        registry.access.redhat.com:443/rhel7.1:latest                                             "top"               About an hour ago                                           docker-rhel71-1
b1c243a74c82        ibm-x3250m4-03.lab.eng.rdu2.redhat.com:5000/default_organization-dockerproduct-centos:7   "top"               About an hour ago   Up 10 minutes                           docker-centos-1
[root@ibm-x3250m4-03 ~]# docker start c70697875e53Error response from daemon: Cannot start container c70697875e53: [8] System error: exec: "/usr/bin/top": stat /usr/bin/top: no such file or directory
FATA[0000] Error: failed to start one or more containers
Comment 3 Daniel Lobato Garcia 2016-03-14 07:56:57 EDT
Can you try this out again? When I try to reproduce this and create a container with a made up command, I see this error (using the hub in case that mattered):

Error: Error - Cannot start container 7eca005cbe885a04a728f1a6a88978db2d745fd97b876fe77c3095d01486060d: [8] System error: exec: "zebra": executable file not found in $PATH 

I'm guessing that 404 came from the Docker API, and now it returns the full error so that's why it now displays the proper text
Comment 4 David O'Brien 2016-04-17 20:47:48 EDT
Reset docs contact <> daobrien
Comment 5 Lukas Pramuk 2016-06-21 09:48:05 EDT
VERIFIED.

@satellite-6.2.0-15.1.beta.el7sat.noarch

I created a container with non-existent command 'zebra' and upon running it I get popup with relevant error msg

(x) Error: Error - Cannot start container d9e2621f1b3dce1298ba4e878cbb6952c89179332d05d75137afc518522ee056: [8] System error: exec: "zebra": executable file not found in $PATH
Comment 6 Bryan Kearney 2016-07-27 07:17:34 EDT
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/RHBA-2016:1501

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