Bug 1774412

Summary: OCP 3.11 upgrade playbook fails with an error 'openshift_hosted_router_edits' is undefined
Product: OpenShift Container Platform Reporter: Abhijeet Sadawarte <asadawar>
Component: InstallerAssignee: Russell Teague <rteague>
Installer sub component: openshift-ansible QA Contact: liujia <jiajliu>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: jialiu, ronny.pettersen
Version: 3.11.0   
Target Milestone: ---   
Target Release: 3.11.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-16 11:57:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
playbook execution logs none

Description Abhijeet Sadawarte 2019-11-20 09:38:16 UTC
Created attachment 1638049 [details]
playbook execution logs

This bug was initially created as a copy of Bug #1749024

I am copying this bug because: 

- The initial bug is already closed with errata hence I've been asked to open a new one

Description of problem:


IHAC (support case is linked) who is still facing this issue with openshift-ansible-3.11.153-2.git.0.ee699b5.el7.noarch

Ran playbook /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_11/upgrade_control_plane.yml -v

Returned:
  1. Hosts:    alt-win-mas01.corp.telenor.no
     Play:     Install packages necessary for installer
     Task:     Ensure minimum kernel version
     Message:  The conditional check 'ansible_facts.distribution == "RedHat"' failed. The error was: error while evaluating conditional (ansible_facts.distribution == "RedHat"): 'openshift_hosted_router_edits' is undefined
               
               The error appears to have been in '/usr/share/ansible/openshift-ansible/playbooks/init/base_packages.yml': line 30, column 5, but may
               be elsewhere in the file depending on the exact syntax problem.
               
               The offending line appears to be:
               
               
                 - name: Ensure minimum kernel version
                   ^ here

The current workaround was to set this in inventory:

openshift_hosted_router_edits=''


Attaching the ansible logs.

Comment 1 Russell Teague 2019-11-20 13:34:33 UTC
What version of Ansible is installed?

Comment 2 Abhijeet Sadawarte 2019-11-20 13:57:52 UTC
$ ansible --version
  ansible 2.6.19
  config file = /home/ocp/ansible/ansible.cfg
  configured module search path = [u'/home/ocp/.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, Jun 11 2019, 14:33:56) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]


And the package is openshift-ansible-3.11.153-2.git.0.ee699b5.el7.noarch

Comment 10 liujia 2019-12-04 09:03:33 UTC
# rpm -qa|grep openshift
openshift-ansible-playbooks-3.11.153-2.git.0.ee699b5.el7.noarch
openshift-clients-redistributable-4.3.0-201910181317.git.1.19d81d5.el7.x86_64
openshift-ansible-roles-3.11.153-2.git.0.ee699b5.el7.noarch
openshift-ansible-3.11.153-2.git.0.ee699b5.el7.noarch
openshift-ansible-docs-3.11.153-2.git.0.ee699b5.el7.noarch

Can not reproduce against the upgrade path v3.11.83-v3.11.153.

oc v3.11.83
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://ip-172-18-0-214.ec2.internal:8443
openshift v3.11.83
kubernetes v1.11.0+d4cacc0

# oc version
oc v3.11.153
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://ip-172-18-0-214.ec2.internal:8443
openshift v3.11.153
kubernetes v1.11.0+d4cacc0

Comment 11 liujia 2019-12-05 03:51:12 UTC
Version:
openshift-ansible-3.11.157-1.git.0.10b76ed.el7.noarch

1. install ocp v3.11.83
[root@ip-172-18-10-130 ~]# oc version
oc v3.11.83
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://ip-172-18-10-130.ec2.internal:8443
openshift v3.11.83

2. edit /etc/ansible/facts.d/openshift.fact files on all hosts to add 'hosted' item

3. run upgrade succeed, and installer remove the 'hosted' item from the openshift.fact file. 
[root@ip-172-18-10-130 ~]# oc version
oc v3.11.157
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://ip-172-18-10-130.ec2.internal:8443
openshift v3.11.157
kubernetes v1.11.0+d4cacc0

Comment 13 errata-xmlrpc 2019-12-16 11:57:11 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-2019:4050