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.
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?
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.
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.
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.
I reproduced this issue in my test environment. Investigating a solution.
Proposed: https://github.com/openshift/openshift-ansible/pull/5555
$ git tag --contains 4dcc5042e6a5ab70de755e2d9d3bdab7e37d45f5 openshift-ansible-3.7.0-0.133.0
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)]
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