Bug 1516469

Summary: Install playbook fails to run if ansible version is 2.4.1
Product: OpenShift Container Platform Reporter: Eric Jones <erjones>
Component: InstallerAssignee: Russell Teague <rteague>
Status: CLOSED ERRATA QA Contact: Gaoyun Pei <gpei>
Severity: high Docs Contact:
Priority: urgent    
Version: 3.5.1CC: ahmed, aos-bugs, erich, gpei, jokerman, knakayam, ksuzumur, mmccomas, sdodson, smulholland
Target Milestone: ---   
Target Release: 3.5.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Custom openshift-ansible modules were not being loaded due to a missing dependency configuration. The issue was first identified when using Ansible 2.4.1 which included a change in how tasks/roles were dynamically included at runtime.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-14 21:02:32 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 Eric Jones 2017-11-22 16:57:15 UTC
Description of problem:
running playbook [0] with ansible version 2.4.1 installed, the playbook fails almost immediately with errors that seem to be related to modules and deprecations [1].

[0] openshift-ansible/playbooks/byo/config.yml

Version-Release number of the following components:
rpm -q openshift-ansible
openshift-ansible-3.5.132-1.git.0.a5c4a4d.el7.noarch

rpm -q ansible
ansible-2.4.1.0-1.el7.noarch

ansible --version
ansible 2.4.1.0
  config file = /home/quicklab/ansible.cfg
  configured module search path = [u'/home/quicklab/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /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:
100%

Steps to Reproduce:
1. update ansible to 2.4.1
2. run that playbook [0]

Actual results:
[1]


Expected results:
install.

Additional info:
Customer from case attached found this with OpenShift 3.6 cluster (not 3.5 like my tests).

[1]
$ ansible-playbook openshift-ansible/playbooks/byo/config.yml -i hosts 
[DEPRECATION WARNING]: 'include' for playbook includes. You should use 'import_playbook' instead. This feature will be removed in version 2.8. Deprecation warnings can 
be disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: The use of 'include' for tasks has been deprecated. Use 'import_tasks' for static inclusions or 'include_tasks' for dynamic inclusions. This 
feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: include is kept for backwards compatibility but usage is discouraged. The module documentation details page may explain more about this 
rationale.. This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.

The error appears to have been in '/usr/share/ansible/openshift-ansible/roles/etcd/tasks/system_container.yml': line 22, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: Install or Update Etcd system container package
  ^ here


The error appears to have been in '/usr/share/ansible/openshift-ansible/roles/etcd/tasks/system_container.yml': line 22, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: Install or Update Etcd system container package
  ^ here

exception type: <class 'ansible.errors.AnsibleParserError'>
exception: no action detected in task. This often indicates a misspelled module name, or incorrect module path.

The error appears to have been in '/usr/share/ansible/openshift-ansible/roles/etcd/tasks/system_container.yml': line 22, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: Install or Update Etcd system container package
  ^ here

Comment 2 Scott Dodson 2017-11-22 17:58:10 UTC
The workaround of course is to simply downgrade ansible on the control host.

`yum downgrade ansible-2.3.2.0`

Comment 7 Russell Teague 2017-11-22 20:42:36 UTC
Th etcd role is trying to use oc_atomic_container which is a module from lib_openshift.  Opening a PR to add needed meta dependencies.  This dependency is already present for 3.6 forward.

Comment 8 Russell Teague 2017-11-22 20:46:43 UTC
Proposed: https://github.com/openshift/openshift-ansible/pull/6239

Comment 9 Scott Dodson 2017-11-24 17:41:08 UTC
*** Bug 1517324 has been marked as a duplicate of this bug. ***

Comment 12 Gaoyun Pei 2017-12-06 02:50:07 UTC
Verify this bug with openshift-ansible-3.5.146-1.git.0.fee1c99.el7.noarch.rpm & ansible-2.4.1.0-1.el7.noarch, no such error during ocp-3.5 cluster installation.

Comment 15 errata-xmlrpc 2017-12-14 21:02:32 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-2017:3438