Bug 1642331

Summary: The variable openshift_version isn't set in the OpenStack provision playbook
Product: OpenShift Container Platform Reporter: Christian Hernandez <chernand>
Component: InstallerAssignee: Scott Dodson <sdodson>
Status: CLOSED DUPLICATE QA Contact: Johnny Liu <jialiu>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.11.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-24 12:34:50 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 Christian Hernandez 2018-10-24 08:08:28 UTC
Description of problem:

In the openstack playbook; the openshift_version variable doesn't get set.

Version-Release number of the following components:

bash-4.2$ rpm -q ansible  
ansible-2.6.5-1.el7.noarch
bash-4.2$ ansible --version
ansible 2.6.5
  config file = /tmp/ocp-on-ose-hackathon.d/ansible.cfg
  configured module search path = [u'/opt/app-root/src/.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, Jul 13 2018, 13:06:57) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]


How reproducible:

Always

Steps to Reproduce:
1. Checkout 3.11 of openshift-ansible
2. set your vars in the inventory
3. run the openshift-ansible/playbooks/openstack/openshift-cluster/provision_install.yml playbook

Actual results:

TASK [openshift_repos : Enable RHEL repositories] ***************************************************************************************************************************
Wednesday 24 October 2018  07:22:23 +0000 (0:00:29.245)       0:03:08.025 ***** 
fatal: [master-0.openshift.casl-test.osp.rht-labs.com]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'openshift_version' is undefined\n\nThe error appears to have been in '/tmp/ocp-on-ose-hackathon.d/openshift-ansible/roles/openshift_repos/tasks/rhel_repos.yml': line 25, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Enable RHEL repositories\n  ^ here\n"}
fatal: [app-node-0.openshift.casl-test.osp.rht-labs.com]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'openshift_version' is undefined\n\nThe error appears to have been in '/tmp/ocp-on-ose-hackathon.d/openshift-ansible/roles/openshift_repos/tasks/rhel_repos.yml': line 25, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Enable RHEL repositories\n  ^ here\n"}
fatal: [infra-node-0.openshift.casl-test.osp.rht-labs.com]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'openshift_version' is undefined\n\nThe error appears to have been in '/tmp/ocp-on-ose-hackathon.d/openshift-ansible/roles/openshift_repos/tasks/rhel_repos.yml': line 25, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Enable RHEL repositories\n  ^ here\n"}

NO MORE HOSTS LEFT **********************************************************************************************************************************************************

PLAY RECAP ******************************************************************************************************************************************************************
app-node-0.openshift.casl-test.osp.rht-labs.com : ok=20   changed=3    unreachable=0    failed=1   
infra-node-0.openshift.casl-test.osp.rht-labs.com : ok=20   changed=3    unreachable=0    failed=1   
localhost                  : ok=59   changed=17   unreachable=0    failed=0   
master-0.openshift.casl-test.osp.rht-labs.com : ok=22   changed=3    unreachable=0    failed=1   

Wednesday 24 October 2018  07:22:23 +0000 (0:00:00.170)       0:03:08.195 ***** 
=============================================================================== 
openshift_repos : Disable all repositories -------------------------------------------------------------------------------------------------------------------------- 29.25s
openshift_openstack : Handle the Stack (create/delete) -------------------------------------------------------------------------------------------------------------- 23.32s
openshift_repos : Discover enabled RHEL rhui repositories ----------------------------------------------------------------------------------------------------------- 17.79s
openshift_repos : Ensure libselinux-python is installed ------------------------------------------------------------------------------------------------------------- 17.58s
rhel_subscribe : Attach to OpenShift Pool --------------------------------------------------------------------------------------------------------------------------- 11.73s
openshift_openstack : Dry-run the stack (update) --------------------------------------------------------------------------------------------------------------------- 6.07s
Gathering Facts ------------------------------------------------------------------------------------------------------------------------------------------------------ 5.34s
openshift_openstack : fail ------------------------------------------------------------------------------------------------------------------------------------------- 4.92s
openshift_openstack : Try to get flavor facts ------------------------------------------------------------------------------------------------------------------------ 4.47s
openshift_openstack : validate the Heat template --------------------------------------------------------------------------------------------------------------------- 3.63s
openshift_openstack : Add private node records ----------------------------------------------------------------------------------------------------------------------- 3.43s
openshift_openstack : Check if the stack exists ---------------------------------------------------------------------------------------------------------------------- 3.43s
openshift_openstack : Add public node records ------------------------------------------------------------------------------------------------------------------------ 3.39s
openshift_openstack : Create the Cinder Registry volume -------------------------------------------------------------------------------------------------------------- 3.36s
Wait for the the nodes to come up ------------------------------------------------------------------------------------------------------------------------------------ 3.26s
rhel_subscribe : Install Red Hat Subscription manager ---------------------------------------------------------------------------------------------------------------- 3.17s
openshift_repos : Ensure RHEL repositories are enabled --------------------------------------------------------------------------------------------------------------- 2.67s
openshift_openstack : Try to get image facts ------------------------------------------------------------------------------------------------------------------------- 2.59s
openshift_openstack : Try to show keypair ---------------------------------------------------------------------------------------------------------------------------- 2.05s
openshift_openstack : Check for Neutron trunk support ---------------------------------------------------------------------------------------------------------------- 2.04s


Failure summary:


  1. Hosts:    app-node-0.openshift.casl-test.osp.rht-labs.com, infra-node-0.openshift.casl-test.osp.rht-labs.com, master-0.openshift.casl-test.osp.rht-labs.com
     Play:     Optionally subscribe the RHEL nodes
     Task:     Enable RHEL repositories
     Message:  The task includes an option with an undefined variable. The error was: 'openshift_version' is undefined
               
               The error appears to have been in '/tmp/ocp-on-ose-hackathon.d/openshift-ansible/roles/openshift_repos/tasks/rhel_repos.yml': line 25, column 3, but may
               be elsewhere in the file depending on the exact syntax problem.
               
               The offending line appears to be:
               
               
               - name: Enable RHEL repositories
                 ^ here


Expected results:

The var is set and playbook continues

Additional info:

Setting openshift_version manually makes this work

Comment 1 Scott Dodson 2018-10-24 12:34:50 UTC

*** This bug has been marked as a duplicate of bug 1642379 ***