Bug 1618969

Summary: installer checks for images with 'docker images -q'
Product: OpenShift Container Platform Reporter: Nicholas Schuetz <nick>
Component: InstallerAssignee: Russell Teague <rteague>
Status: CLOSED ERRATA QA Contact: Johnny Liu <jialiu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.11.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: 3.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Installer tasks used 'docker' command to check for container images which would fail if docker was not installed. Docker may not be installed if cri-o runtime is specified. Consequence: Installer tasks would fail when checking container images. Fix: Updated installer code to use the container image management tool based on the container runtime selected. Result: Installer uses the correct container image management tool based on the selected container runtime and installs successfully.
Story Points: ---
Clone Of:
: 1652282 (view as bug list) Environment:
Last Closed: 2018-10-11 07:25:20 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:
Bug Depends On:    
Bug Blocks: 1652282    

Description Nicholas Schuetz 2018-08-19 03:28:07 UTC
When installing 3.11 and using crio as the runtime, the image checks fail because docker is not installed.  You can simply 's/docker/crictl/' for those commands and then they work.  Otherwise, you have to make sure the docker runtime is also installed and running.

roles/openshift_node/tasks/config.yml:3
roles/etcd/tasks/static.yml:6
roles/openshift_control_plane/tasks/main.yml:14

Those commands should probably be parameter-ized (docker|crictl).

-Nick

Comment 1 Scott Dodson 2018-08-20 16:03:18 UTC
(In reply to Nicholas Nachefski from comment #0)
> When installing 3.11 and using crio as the runtime, the image checks fail
> because docker is not installed.  You can simply 's/docker/crictl/' for
> those commands and then they work.  Otherwise, you have to make sure the
> docker runtime is also installed and running.
> 
> roles/openshift_node/tasks/config.yml:3
> roles/etcd/tasks/static.yml:6
> roles/openshift_control_plane/tasks/main.yml:14
> 
> Those commands should probably be parameter-ized (docker|crictl).
> 
> -Nick

Agreed, we need to fix this.

BTW, You're doing cri-o only? Please be aware that there's no s2i without docker on the host.

Comment 2 Russell Teague 2018-08-30 03:36:30 UTC
Proposed: https://github.com/openshift/openshift-ansible/pull/9829

Comment 3 Russell Teague 2018-09-05 11:56:20 UTC
openshift-ansible-3.11.0-0.26.0

Comment 4 Johnny Liu 2018-09-05 16:55:49 UTC
Verified this bug with openshift-ansible-3.11.0-0.27.0.git.0.78b0bf9.el7.noarch, and PASS.

Trigger an install without docker installed, and setting openshift_use_crio=true
and openshift_use_crio_only=true in inventory file, installation is completed successfully.


TASK [openshift_node : Check that node image is present] ***********************
Thursday 06 September 2018  00:07:00 +0800 (0:00:00.044)       0:01:39.738 **** 
changed: [host-8-252-245.host.centralci.eng.rdu2.redhat.com] => {"changed": true, "cmd": ["crictl", "images", "-q", "registry.dev.redhat.io/openshift3/ose-node:v3.11.0"], "delta": "0:00:00.022681", "end": "2018-09-05 12:07:05.682454", "rc": 0, "start": "2018-09-05 12:07:05.659773", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}

TASK [etcd : Check that etcd image is present] *********************************
Thursday 06 September 2018  00:10:01 +0800 (0:00:00.074)       0:04:40.887 **** 
changed: [host-8-252-245.host.centralci.eng.rdu2.redhat.com] => {"changed": true, "cmd": ["crictl", "images", "-q", "registry.dev.redhat.io/rhel7/etcd:3.2.22"], "delta": "0:00:00.022508", "end": "2018-09-05 12:10:06.848721", "rc": 0, "start": "2018-09-05 12:10:06.826213", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}

TASK [openshift_control_plane : Check that origin image is present] ************
Thursday 06 September 2018  00:11:07 +0800 (0:00:00.049)       0:05:47.146 **** 
changed: [host-8-252-245.host.centralci.eng.rdu2.redhat.com] => {"changed": true, "cmd": ["crictl", "images", "-q", "registry.dev.redhat.io/openshift3/ose-control-plane:v3.11.0"], "delta": "0:00:00.019787", "end": "2018-09-05 12:11:13.089082", "rc": 0, "start": "2018-09-05 12:11:13.069295", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}

Comment 6 errata-xmlrpc 2018-10-11 07:25:20 UTC
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-2018:2652