Bug 1413907

Summary: container_linux.go:247: starting container process caused "exec: \"run.sh\": executable file not found in $PATH
Product: Red Hat Enterprise Linux 7 Reporter: Alex Jia <ajia>
Component: atomicAssignee: Lokesh Mandvekar <lsm5>
Status: CLOSED NOTABUG QA Contact: atomic-bugs <atomic-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.3CC: gscrivan
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-28 15:14:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.