Bug 1496725 - Could not find the requested service container-engine while configuring "openshift_docker_use_system_container=false" in inventory file
Summary: Could not find the requested service container-engine while configuring "open...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.7.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: 3.7.0
Assignee: Steve Milner
QA Contact: Gan Huang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-28 08:46 UTC by Gan Huang
Modified: 2017-11-28 22:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: With specific inventory settings docker_use_system_container may be set to what is thought to be False, but is read as True. Example: $ python -c "print(bool('false'))" True Consequence: The wrong runtime is sensed from the variable causing install to fail. Fix: Use safe_get_bool() when reading docker_use_system_container to ensure that ansible accepted inputs are turned into real boolean results. Result: docker_use_system_container is always read as a bool as expected
Clone Of:
Environment:
Last Closed: 2017-11-28 22:13:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3188 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-29 02:34:54 UTC

Description Gan Huang 2017-09-28 08:46:53 UTC
Description of problem:
Could not find the requested service container-engine while configuring "openshift_docker_use_system_container=false" in inventory file
fatal: [ec2-54-85-194-178.compute-1.amazonaws.com]: FAILED! => {"attempts": 3, "changed": false, "failed": true, "msg": "Could not find the requested service container-engine: host"}

When "openshift_docker_use_system_container=false", installer should restart "docker" service, but not "container-engine", obviously, installer set openshift.docker.service_name to "container-engine" incorrectly.

Version-Release number of the following components:
openshift-ansible-3.7.0-0.128.0.git.0.89dcad2.el7.noarch.rpm

How reproducible:
always

Steps to Reproduce:
1.cat inventory_file
<--snip-->
openshift_docker_use_system_container=false
<--snip-->


Actual results:
RUNNING HANDLER [docker : restart docker] **************************************
Thursday 28 September 2017  06:38:03 +0000 (0:00:00.034)       0:00:42.890 **** 
FAILED - RETRYING: restart docker (3 retries left).
FAILED - RETRYING: restart docker (2 retries left).
FAILED - RETRYING: restart docker (1 retries left).
fatal: [ec2-54-85-194-178.compute-1.amazonaws.com]: FAILED! => {"attempts": 3, "changed": false, "failed": true, "msg": "Could not find the requested service container-engine: host"}

Expected results:

Additional info:
From the docker facts log, looks like openshift_facts didn't get a valid bool value from `openshift_docker_use_system_container=false`
$ grep -nir "use_system_container" roles/openshift_facts/library/openshift_facts.py 

1683:        if facts['docker']['use_system_container']:


TASK [openshift_docker_facts : Set docker facts] *******************************
docker": {"additional_registries": ["registry.xxx.openshift.com", "registry.access.redhat.com"], "api_version": 1.24, "blocked_registries": ["registry.hacker.com"], "disable_push_dockerhub": false, "gte_1_10": true, "hosted_registry_insecure": false, "hosted_registry_network": "172.30.0.0/16", "insecure_registries": ["xxxxxxxm:8888", "virt-openshift-05.lab.eng.nay.redhat.com:5000", "virt-openshift-05.lab.eng.nay.redhat.com:5001", "registry.ops.openshift.com", "asb-registry.usersys.redhat.com:5000"], "options": "--log-driver=journald", "service_name": "container-engine", "use_crio": false, "use_system_container": "false", "version": "1.12.6"}

Comment 1 Steve Milner 2017-09-28 18:11:07 UTC
Good catch Gan. I have a quick fix up at https://github.com/openshift/openshift-ansible/pull/5577.

Comment 2 Steve Milner 2017-09-28 18:27:49 UTC
3.6 backport https://github.com/openshift/openshift-ansible/pull/5578

Comment 3 Gan Huang 2017-10-09 10:00:01 UTC
Thanks, Steve!

Verified in openshift-ansible-3.7.0-0.143.1.git.0.89248df.el7.noarch.rpm

Comment 7 errata-xmlrpc 2017-11-28 22:13: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/RHSA-2017:3188


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