Bug 1516526

Summary: OpenShift Facts should not be called on all hosts when only a single group is being modified with certain playbooks.
Product: OpenShift Container Platform Reporter: Ryan Howe <rhowe>
Component: InstallerAssignee: Michael Gugino <mgugino>
Status: CLOSED ERRATA QA Contact: Gaoyun Pei <gpei>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.6.0CC: aos-bugs, fabian, jokerman, mmccomas
Target Milestone: ---   
Target Release: 3.10.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-30 19:09:00 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:

Description Ryan Howe 2017-11-22 20:14:49 UTC
Description of problem:
OpenShift Facts should not be called on all hosts when only a single group is being modified. 

Example when running  	redeploy-etcd-ca.yml or redeploy-etcd-certificates.yml openshift facts is gathered on all node hosts causing the installer to take to much unneed time to redploy etcd certs. 

Version-Release number of the following components:
└──> rpm -q openshift-ansible

└──> rpm -q ansible

└──> ansible --version
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/cloud-user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, May  3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]

How reproducible:

Steps to Reproduce:
1. $ ansible-playbook -i <inventory_file> \

Actual results:
Openshift facts gets call 2 times and ran on all nodes listed in hosts file

Expected results:
facts are only run on etcd hosts.

Comment 1 Scott Dodson 2017-11-22 20:23:14 UTC
Thanks, we're aware of the problem and we'll make sure that we fix this as part of a larger effort to refactor playbooks into smaller components.

Comment 4 Michael Gugino 2018-02-08 21:58:05 UTC
PR Created: https://github.com/openshift/openshift-ansible/pull/7078

Comment 6 Gaoyun Pei 2018-05-16 08:18:38 UTC
Verify this bug with openshift-ansible-3.10.0-0.46.0.git.0.85c3afd.el7.noarch.

Tried with the following several playbooks, no useless "Gathering Facts" or "Verify Requirements" tasks run on the nodes now.  

Comment 8 errata-xmlrpc 2018-07-30 19:09:00 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.