Bug 1496174 - filter get_router_replicas is missing in Ansible 2.4.0.0
Summary: filter get_router_replicas is missing in Ansible 2.4.0.0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.7.0
Assignee: Russell Teague
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-26 15:18 UTC by Hongkai Liu
Modified: 2017-11-28 22:13 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Renamed filter plugin modules. Filter plugin modules should have unique names to not conflict with core Ansible modules. (Ansible 2.4)
Clone Of:
Environment:
Last Closed: 2017-11-28 22:13:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
inv. file (5.66 KB, text/plain)
2017-09-26 15:18 UTC, Hongkai Liu
no flags Details


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 Hongkai Liu 2017-09-26 15:18:29 UTC
Created attachment 1331165 [details]
inv. file

Description of problem:
byo playbook failed with Ansible 2.4.0.0

Version-Release number of the following components:
rpm -q openshift-ansible
Use github repo
~/openshift-ansible # git log --oneline -1
1a181eb Merge pull request #5269 from rparulek/nuage-ansible

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

ansible --version

ansible 2.4.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.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.13 (default, Jan 12 2017, 17:59:37) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)]


How reproducible:

Steps to Reproduce:
1. ansible-playbook openshift-ansible/playbooks/byo/config.yml
The inv file

Actual results:
TASK [openshift_hosted : set_fact replicas] ************************************
Monday 25 September 2017  20:04:17 +0000 (0:00:00.031)       0:26:37.097 ****** 
fatal: [ec2-34-223-226-228.us-west-2.compute.amazonaws.com]: FAILED! => {"failed": true, "msg": "template error while templating string: no filter named 'get_router_replicas'. String: {{ openshift.hosted.router.replicas|default(None) | get_router_replicas(router_nodes) }}"}

Expected results:
Run the playbook successfully.

Additional info:
This issue occurred when using Ansible 2.4.0.0.
All works great if using Ansible 2.3.2.0.

Comment 1 Scott Dodson 2017-09-26 15:27:08 UTC
Hongkai,

Any chance you have openshift-ansible RPMs installed on the host of an older version and you're attempting to run from a github checkout?

Comment 2 Hongkai Liu 2017-09-26 15:49:44 UTC
Thanks for the quick reply, Scott.

We run byo playbook on our Jenkins slave with ansible 2.4.0.0. There is no openshift pkg installed there.

# rpm -aq | grep openshift

###returns nothing.


===
More info of what we did:

When we copied to inv file on to master node (ansible 2.3.2.0) of the openshift cluster, run byo and it succeeded.

That was the point when we felt it is ansible version problem.

Then we updraded ansible to 2.4.0.0 on master, we had the same error message.

Comment 3 Hongkai Liu 2017-09-26 15:52:14 UTC
https://github.com/openshift/openshift-ansible/issues/2553

By the way, we saw your comment on the above issue, it helped with other errors we met.
Not directly related to the current one though.

Comment 4 Johnny Liu 2017-09-27 08:22:46 UTC
QE run a batch of installation to rpeoduce his bug.

openshift-ansible-3.7.0-0.126.6.git.0.a60fe67.el7.noarch + ansible 2.4: PASS
openshift-ansible-3.7.0-0.128.0.git.0.89dcad2.el7.noarch + ansible 2.4: FAIL
openshift-ansible-3.7.0-0.128.0.git.0.89dcad2.el7.noarch + ansible 2.3: PASS


Because https://trello.com/c/Y0DgB0Ys/500-1-test-ansible-24-ga, which is targeted to 3.7, so raise its priority, and set testblocker keyword. It is blocking QE's testing with ansible-2.4.

Comment 5 Russell Teague 2017-09-27 13:35:19 UTC
I reproduced this issue in my test environment.  Investigating a solution.

Comment 6 Russell Teague 2017-09-27 14:51:36 UTC
Proposed: https://github.com/openshift/openshift-ansible/pull/5555

Comment 7 Russell Teague 2017-09-28 19:09:36 UTC
$ git tag --contains 4dcc5042e6a5ab70de755e2d9d3bdab7e37d45f5
openshift-ansible-3.7.0-0.133.0

Comment 8 Hongkai Liu 2017-10-02 17:37:40 UTC
Tested on instances with atomic-openshift.x86_64(3.7.0-0.126.4.git.0.5c9dddf.el7) where I found the problem.

I do not see the error in the bz.
Installation is successful.

[root@installer-jenkins-slave-3 private-openshift-ansible]# git log -1 --oneline 
e54cb26 Merge pull request #5618 from vshn/defstorageclasstyp1

# git branch  --contains 4dcc5042e6a5ab70de755e2d9d3bdab7e37d45f5
* (HEAD detached at e54cb26)

[root@installer-jenkins-slave-3 private-openshift-ansible]# ansible --version
ansible 2.4.0.0
  config file = /home/slave3/workspace/Launch Environment Flexy/private-openshift-ansible/ansible.cfg
  configured module search path = [u'/root/.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.13 (default, Jan 12 2017, 17:59:37) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)]

Comment 12 errata-xmlrpc 2017-11-28 22:13:02 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.