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.
Bug 1386321 - 'docker run IMAGE nonexistingcmd' error message is hard to get
Summary: 'docker run IMAGE nonexistingcmd' error message is hard to get
Keywords:
Status: CLOSED DUPLICATE of bug 1386320
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: oci-register-machine
Version: 7.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Lokesh Mandvekar
QA Contact: Martin Jenner
URL:
Whiteboard:
Depends On: 1380685
Blocks: 1386320
TreeView+ depends on / blocked
 
Reported: 2016-10-18 16:09 UTC by Lokesh Mandvekar
Modified: 2016-10-18 16:11 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1380685
Environment:
Last Closed: 2016-10-18 16:11:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Lokesh Mandvekar 2016-10-18 16:09:47 UTC
+++ This bug was initially created as a clone of Bug #1380685 +++

Description of problem:
I got back to docker after a long while and when I was going to run an image, I issued "docker run" command with swapped "IMAGE" and "-it" arguments, so I got command like the following:
# docker run fedora -it /usr/bin/bash

The command failed and I was sure there is a bug in docker because it printed out:
/usr/bin/docker-current: Error response from daemon: oci runtime error: exit status 1:.

There was no sign that docker tried to interpret "-it" as COMMAND


Version-Release number of selected component (if applicable):
docker-1.12.1-28.git9a3752d.fc26.x86_64

How reproducible:
Always

Steps to Reproduce:
1. # docker run fedora fdjalsjlhglajsfd
2.
3.

Actual results:
/usr/bin/docker-current: Error response from daemon: oci runtime error: exit status 1:.

Expected results:
'fdjalsjlhglajsfd' command not found

--- Additional comment from Antonio Murdaca on 2016-09-30 05:58:05 CDT ---

I'll take a look at this shortly but this seems similar to https://bugzilla.redhat.com/show_bug.cgi?id=1379706 which should have been fixed in build 28.

--- Additional comment from Antonio Murdaca on 2016-09-30 05:59:43 CDT ---

Can you disable selinux and try again please?

--- Additional comment from Jakub Filak on 2016-09-30 06:33 CDT ---

[root@photon ~]# setenforce 0
[root@photon ~]# getenforce 
Permissive
[root@photon ~]# MARK=$(date +"%F %H:%M:%S")
[root@photon ~]# docker run fedora -ti /usr/bin/bash
/usr/bin/docker-current: Error response from daemon: oci runtime error: exit status 1:.
[root@photon ~]# journalctl --since="$MARK" > /tmp/journald.txt

--- Additional comment from Antonio Murdaca on 2016-09-30 06:44:44 CDT ---

Thanks, I'll spin up a Rawhide vm and test this out.

--- Additional comment from Antonio Murdaca on 2016-10-17 06:45:02 CDT ---

This is an issue with "oci-register-machine" hook rather than a docker issue:

$ docker run busybox -ti sh
docker: Error response from daemon: oci runtime error: exit status 1:.

$ sudo mv /usr/libexec/oci/hooks.d/oci-register-machine /tmp/oci-register-machine 

The command above will prevent docker from running that hook, try re-running the original command now:

$ docker run busybox -ti sh                              
docker: Error response from daemon: oci runtime error: exec: "-ti": executable file not found in $PATH.

Now you can see the useful "executable file not found in $PATH" error.

--- Additional comment from Daniel Walsh on 2016-10-17 10:56:24 CDT ---

This looks like an old problem we had where the pid did not exist when oci-register-machine is called.  Which is not supposed to happen when using runc?

--- Additional comment from Daniel Walsh on 2016-10-17 10:58:09 CDT ---

Actually it looks like the problem is on Terminate.

Oct 17 11:56:44 dhcp-10-19-62-196.boston.devel.redhat.com oci-register-machine[31825]: 2016/10/17 11:56:44 Register machine: prestart b80799775658cf7cf95c75634a3a6f2f9f0a7196d346d94e3b075468f0919547 31807 /var/lib/docker/overlay2/3725ea6691c2a35bd0be05db96084424fa0cb77c3d9505c9f505d522eedeae61/merged
Oct 17 11:56:44 dhcp-10-19-62-196.boston.devel.redhat.com oci-register-machine[31840]: 2016/10/17 11:56:44 Register machine: poststop b80799775658cf7cf95c75634a3a6f2f9f0a7196d346d94e3b075468f0919547 0 /var/lib/docker/overlay2/3725ea6691c2a35bd0be05db96084424fa0cb77c3d9505c9f505d522eedeae61/merged
Oct 17 11:56:44 dhcp-10-19-62-196.boston.devel.redhat.com oci-register-machine[31840]: 2016/10/17 11:56:44 TerminateMachine failed: No machine 'b80799775658cf7cf95c75634a3a6f2f9f0a7196d346d94e3b075468f0919547' known

I think we need to check if the return from systemd is the UUID does not exist, just exit without a message.

--- Additional comment from Daniel Walsh on 2016-10-17 12:39:43 CDT ---

https://github.com/projectatomic/oci-register-machine/pull/28 should fix this bug.

--- Additional comment from Daniel Walsh on 2016-10-18 10:43:10 CDT ---

Fixed in oci-register-machine-0-2.7.gitbb20b00.fc26

Comment 1 Lokesh Mandvekar 2016-10-18 16:11:15 UTC

*** This bug has been marked as a duplicate of bug 1386320 ***


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