Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1622629 - Build_ami play is failing due to extra_vars openshift_release
Build_ami play is failing due to extra_vars openshift_release
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
3.10.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.11.0
Assigned To: Chris Callegari
sheng.lao
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-08-27 11:41 EDT by Chris Callegari
Modified: 2018-10-11 03:26 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-10-11 03:25:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2652 None None None 2018-10-11 03:26 EDT

  None (edit)
Description Chris Callegari 2018-08-27 11:41:45 EDT
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-29 23:13:54 EDT
pull/9804 is merged.  Please test from master.
Comment 3 sheng.lao 2018-08-30 05:45:06 EDT
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 08:48:43 EDT
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 03:25:54 EDT
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.