Bug 1622629 - Build_ami play is failing due to extra_vars openshift_release
Summary: Build_ami play is failing due to extra_vars openshift_release
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.11.0
Assignee: Chris Callegari
QA Contact: sheng.lao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-27 15:41 UTC by Chris Callegari
Modified: 2018-10-11 07:26 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-11 07:25:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2652 0 None None None 2018-10-11 07:26:26 UTC

Description Chris Callegari 2018-08-27 15:41:45 UTC
Description of problem:
Build_ami play is failing due to extra_vars openshift_release

Version-Release number of selected component (if applicable):
master branch

How reproducible:
Always

Steps to Reproduce:
1. rm -rf $HOME/ansible
2. ansible-playbook -i 3.10-hosts openshift-cluster/build_ami.yml -e @provisioning_vars.yml
3.

Actual results:
extra_vars / openshift_release commented out
TASK [openshift_repos : Enable RHEL repositories] **************************************************************************************************
task path: /home/ccallega/git/openshift-ansible/roles/openshift_repos/tasks/rhel_repos.yml:25
fatal: [ec2-18-205-28-146.compute-1.amazonaws.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 '/home/ccallega/git/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"
}



extra_vars / openshift_release: v3.10 # per extra_vars example
TASK [openshift_sanitize_inventory : Abort when openshift_release is invalid] **********************************************************************
task path: /home/ccallega/git/openshift-ansible/roles/openshift_sanitize_inventory/tasks/main.yml:22
fatal: [ec2-18-205-28-146.compute-1.amazonaws.com]: FAILED! => {
    "changed": false,
    "msg": "openshift_release is \"v3.10\" which is not a valid version string.\nPlease set openshift_release to a version string and ensure that the value is quoted, ex: openshift_release=\"3.4\"."
}


extra_vars / openshift_release: 3.10
TASK [openshift_sanitize_inventory : Abort when openshift_release is invalid] **********************************************************************
task path: /home/ccallega/git/openshift-ansible/roles/openshift_sanitize_inventory/tasks/main.yml:22
fatal: [ec2-18-205-28-146.compute-1.amazonaws.com]: FAILED! => {
    "msg": "The conditional check 'not (openshift_release is match('^\\d+(\\.\\d+){1,3}$'))' failed. The error was: Unexpected templating type error occurred on ({% if not (openshift_release is match('^\\d+(\\.\\d+){1,3}$')) %} True {% else %} False {% endif %}): expected string or buffer\n\nThe error appears to have been in '/home/ccallega/git/openshift-ansible/roles/openshift_sanitize_inventory/tasks/main.yml': line 22, 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: Abort when openshift_release is invalid\n  ^ here\n"
} 


extra_vars / openshift_release: '3.10'
TASK [openshift_repos : Enable RHEL repositories] **************************************************************************************************
task path: /home/ccallega/git/openshift-ansible/roles/openshift_repos/tasks/rhel_repos.yml:25
fatal: [ec2-18-205-28-146.compute-1.amazonaws.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 '/home/ccallega/git/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"
}


Expected results:
Play is expected to complete successfully


Additional info:


Description of problem:

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

How reproducible:

Steps to Reproduce:
1.
2.
3.

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 2 Chris Callegari 2018-08-30 03:13:54 UTC
pull/9804 is merged.  Please test from master.

Comment 3 sheng.lao 2018-08-30 09:45:06 UTC
Test version:  openshift-ansible-3.11.0-0.25.0-18-gb03aaef

1) extra_vars / openshift_release commented out
build_ami will uses the default values in: roles/openshift_version/defaults/main.yml

2) extra_vars / openshift_release: v3.10 
3) extra_vars / openshift_release: 3.10
It's correct to reporte error, setting the wrong vaule

4) extra_vars / openshift_release: '3.10'
It works well.

Comment 4 Chris Callegari 2018-08-30 12:48:43 UTC
openshift_release is no longer a valid key in extra_vars.  Please remove it completely.

Retest using valid key and values in Ansible inv file

Comment 6 errata-xmlrpc 2018-10-11 07:25:54 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-2018:2652


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