Bug 1413907 - container_linux.go:247: starting container process caused "exec: \"run.sh\": executable file not found in $PATH
Summary: container_linux.go:247: starting container process caused "exec: \"run.sh\": ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: atomic
Version: 7.3
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Lokesh Mandvekar
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-17 10:02 UTC by Alex Jia
Modified: 2017-02-28 15:14 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-28 15:14:57 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Alex Jia 2017-01-17 10:02:18 UTC
Description of problem:
Failed to start a simple system container and got error as summary.

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


[root@atomic-host-test-986 ~]# atomic host status
State: idle
Deployments:
● rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard
       Version: 7.3.2 (2017-01-13 22:00:41)
        Commit: 96826a0d917d7ff10f9fd0289581649f2ffbddd76f3b80efd3d95cc11915cacb
        OSName: rhel-atomic-host

[root@atomic-host-test-986 ~]# rpm -q atomic docker skopeo
atomic-1.14.1-5.el7.x86_64
docker-1.12.5-14.el7.x86_64
skopeo-0.1.17-1.el7.x86_64

[root@atomic-host-test-986 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Atomic Host release 7.3

How reproducible:
always

Steps to Reproduce:
1. atomic --debug install --system busybox
2. systemctl daemon-reload
3. systemctl enable busybox
4. systemctl start busybox

Actual results:

# atomic --debug install --system busybox
Pulling layer 4b0bc1c4050b03c95ef2a8e36e25feac42fd31283e8c30b3ee5df6b043155d3c
Extracting to /var/lib/containers/atomic/busybox.0
systemctl daemon-reload
systemctl enable busybox

# atomic images list -a
   REPOSITORY         TAG      IMAGE ID       CREATED            VIRTUAL SIZE   TYPE        
   <none>             <none>   4b0bc1c4050b   2017-01-17 09:25                  ostree    
   busybox            latest   7968321274dc   2017-01-17 09:25                  ostree

NOTE: the TYPE is 'ostree' not 'system', is it an expected result?

# systemctl daemon-reload
# systemctl enable busybox
# systemctl status busybox
● busybox.service - busybox
   Loaded: loaded (/etc/systemd/system/busybox.service; enabled; vendor preset: disabled)
   Active: inactive (dead)

Jan 17 09:25:37 atomic-host-test-986.localdomain systemd[1]: [/etc/systemd/system/busybox.service:8] Failed to parse service restart specifier, ignoring: on-crash
Jan 17 09:25:37 atomic-host-test-986.localdomain systemd[1]: [/etc/systemd/system/busybox.service:8] Failed to parse service restart specifier, ignoring: on-crash
Jan 17 09:29:58 atomic-host-test-986.localdomain systemd[1]: [/etc/systemd/system/busybox.service:8] Failed to parse service restart specifier, ignoring: on-crash
Jan 17 09:30:27 atomic-host-test-986.localdomain systemd[1]: [/etc/systemd/system/busybox.service:8] Failed to parse service restart specifier, ignoring: on-crash

[root@atomic-host-test-986 ~]# atomic containers list -a
   CONTAINER ID IMAGE                COMMAND              CREATED          STATE     RUNTIME   
   busybox      busybox              run.sh               2017-01-17 09:25 inactive  ostree

NOTE: the RUNTIME is 'ostree' is not 'runc', is it an expected result?

# systemctl start busybox

# systemctl status busybox
● busybox.service - busybox
   Loaded: loaded (/etc/systemd/system/busybox.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2017-01-17 09:32:02 UTC; 4s ago
  Process: 14632 ExecStop=/bin/runc kill busybox (code=exited, status=1/FAILURE)
  Process: 14614 ExecStart=/bin/runc run busybox (code=exited, status=1/FAILURE)
 Main PID: 14614 (code=exited, status=1/FAILURE)

Jan 17 09:32:02 atomic-host-test-986.localdomain systemd[1]: Started busybox.
Jan 17 09:32:02 atomic-host-test-986.localdomain systemd[1]: Starting busybox...
Jan 17 09:32:02 atomic-host-test-986.localdomain runc[14614]: container_linux.go:247: starting container process caused "exec: \"run.sh\": executable file not found in $PATH"
Jan 17 09:32:02 atomic-host-test-986.localdomain systemd[1]: busybox.service: main process exited, code=exited, status=1/FAILURE
Jan 17 09:32:02 atomic-host-test-986.localdomain runc[14632]: container "busybox" does not exists
Jan 17 09:32:02 atomic-host-test-986.localdomain systemd[1]: busybox.service: control process exited, code=exited status=1
Jan 17 09:32:02 atomic-host-test-986.localdomain systemd[1]: Unit busybox.service entered failed state.
Jan 17 09:32:02 atomic-host-test-986.localdomain systemd[1]: busybox.service failed.


Expected results:
fix it.

Additional info:

Comment 2 Giuseppe Scrivano 2017-02-28 15:14:57 UTC
yes this is an expected result, since busybox is not a system container image and can't work automatically.

We allow images to be installed anyway as an user can still manually change the config.json file before running the service.


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