Red Hat Bugzilla – Bug 1476320
Docker configured and checked on non-Docker hosts when containerized=true
Last modified: 2017-08-10 09:35:47 EDT
Description of problem:
When a user sets "containerized=true" globally in their inventory it is applied even to host types for which we have no containerized components or any business installing Docker on via this installer: nfs / glusterfs / lb hosts. Docker is installed and the Docker checks run and report problems.
Version-Release number of the following components:
openshift3/ose-ansible:v3.6 installer image
Steps to Reproduce:
1. Create an inventory with containerized=true and some nfs/lb/glusterfs hosts.
2. Run the pre-install checks e.g.
docker run -u `id -u`
3. See output and rpm -q docker on the hosts
1. Host: <nfs host>
Play: Verify Requirements
Message: One or more checks failed
Details: check "docker_storage":
Use of loopback devices with the Docker devicemapper storage driver
(the default storage configuration) is unsupported in production.
Please use docker-storage-setup to configure a backing storage volume.
See http://red.ht/2rNperO for further information.
# rpm -q docker
Should not have anything to do or say about Docker on these hosts, even though they are marked containerized.
The obvious workaround is to update the inventory so these hosts are not set to containerized. If "containerized=true" is set globally in the [OSEv3:vars] section it can easily be overridden with an entry per-host.
Logic at https://github.com/openshift/openshift-ansible/blob/167117dc280e4448b76ac95868ca33f527383d20/roles/openshift_version/meta/main.yml#L17-L18 could be refined to include the docker role only on hosts we know could actually need Docker, regardless of what containerized says. Alternately, the logic for setting openshift.common.is_containerized could be modified. Or the docker role could exempt itself when not invoked on whitelisted host groups.
Health check logic at https://github.com/openshift/openshift-ansible/blob/167117dc280e4448b76ac95868ca33f527383d20/roles/openshift_health_checker/openshift_checks/mixins.py#L28-L30 could be similarly modified.