Bug 1618395 - rhel_repos.yml contains reference to undefined openshift_version variable
Summary: rhel_repos.yml contains reference to undefined openshift_version variable
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.10.z
Assignee: Tomas Sedovic
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-16 14:33 UTC by jliberma@redhat.com
Modified: 2018-11-19 21:18 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-19 21:18:43 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description jliberma@redhat.com 2018-08-16 14:33:22 UTC
Description of problem:

Running install.yml fails with error related to undefined variable openshift_version:

(shiftstack) [cloud-user@bastion ~]$  ansible-playbook --user openshift -i /usr/share/ansible/openshift-ansible/playbooks/openstack/inventory.py -i inventory /usr/share/ansible/openshift-ansible/playbooks/openstack/openshift-cluster/install.yml

...

Failure summary:


  1. Hosts:    app-node-0.openshift.example.com, app-node-1.openshift.example.com, infra-node-0.openshift.example.com, master-0.openshift.example.com
     Play:     Setup yum repositories for all hosts
     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 '/usr/share/ansible/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

(shiftstack) [cloud-user@bastion ~]$ grep openshift_version /usr/share/ansible/openshift-ansible/roles/openshift_repos/tasks/rhel_repos.yml
               --enable="rhel-7-server-ose-{{ ( openshift_version ).split('.')[0:2] | join('.') }}-rpms" \

Adding openshift_version to all.yml and/or OSEv3.yml also fails. (unless I am just using wrong format, but I can't find variable documented anywhere.)

Version-Release number of the following components:
rpm -q openshift-ansible

openshift-ansible-3.10.21-1.git.0.6446011.el7.noarch

rpm -q ansible

ansible-2.5.7-1.el7ae.noarch

ansible --version

ansible 2.5.7
  config file = /home/cloud-user/ansible.cfg
  configured module search path = [u'/home/cloud-user/.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, May 31 2018, 09:41:32) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]

How reproducible:

Steps to Reproduce:
1. Here: https://gitlab.cee.redhat.com/gcharot/osp13-workshops/blob/master/content/staging/ocp_kuryr/lab9_ocp_install.md


NOTE: I am using only repos available to customers. (CDN)

I am not using any internal or engineering repos.

Actual results:
Please include the entire output from the last TASK line through the end of output if an error is generated

Expected results:

Additional info:
Please attach logs from ansible-playbook with the -vvv flag

Comment 1 Scott Dodson 2018-08-16 14:41:25 UTC
> rpm -q ansible
> ansible-2.5.7-1.el7ae.noarch

Please don't use ansible-2.5, we've not validated 2.5 and we never will. In OCP < 3.11 you should stick to ansible 2.4. I doubt that is root cause but we should remove that from our concerns.

I imagine the openstack playbooks aren't calling some initialization plays that set openshift_version but I'm not sure. Assigning to openstack folks but mgugino may need to help out.

Comment 2 jliberma@redhat.com 2018-08-16 14:57:15 UTC
Hi Scott, is this documented anywhere?

The only reference I have seen to Ansible versions is to use a minimum suppored version of 2.4.3 or higher:

https://github.com/openshift/openshift-ansible/blob/master/playbooks/openstack/README.md

Should I file a doc bug?

I have seen that none of this works with Ansible 2.6 btw.

Thanks, jacob

Comment 3 Scott Dodson 2018-08-16 15:23:02 UTC
The host preparation section instructs you as to which ansible repo to enable in 3.9 and later. Prior to 3.9 we shipped the desired version of ansible in the OCP repos, though that got a bit askew when they started shipping to Extras repo as well, but that's no longer happening.

https://docs.openshift.com/container-platform/3.10/install/host_preparation.html#host-registration

The 3.11 docs will tell them to enable ansible-2.6 repos.

Comment 4 Russell Teague 2018-11-19 21:18:43 UTC
There appear to be no active cases related to this bug. As such we're closing this bug in order to focus on bugs that are still tied to active customer cases. Please re-open this bug if you feel it was closed in error or a new active case is attached.


Note You need to log in before you can comment on or make changes to this bug.