Bug 1578737 - Failed to build AMI in task "Abort when openshift_release is invalid"
Summary: Failed to build AMI in task "Abort when openshift_release is invalid"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.11.0
Assignee: Chris Callegari
QA Contact: sheng.lao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-16 10:25 UTC by Wenkai Shi
Modified: 2018-10-11 07:20 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-11 07:20:00 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:20:21 UTC

Description Wenkai Shi 2018-05-16 10:25:31 UTC
Description of problem:
Failed to build AMI in task "Abort when openshift_release is invalid".

Version-Release number of the following components:
openshift-ansible-3.10.0-0.46.0.git.0.85c3afd.el7

How reproducible:
100%

Steps to Reproduce:
1. Follow document(https://github.com/openshift/openshift-ansible/tree/master/playbooks/aws) to build an AMI.
2. Set openshift_release to v3.10 in provisioning_vars.yml as example(https://github.com/openshift/openshift-ansible/blob/master/playbooks/aws/provisioning_vars.yml.example)

cat provisioning_vars.yml
...
# openshift_release must be specified.  Use whatever version of openshift
# that is supported by openshift-ansible that you wish.
openshift_release: v3.10 # v3.7
...
3. Execute build_ami playbook as step 1(https://github.com/openshift/openshift-ansible/tree/master/playbooks/aws#step-1):
# ansible-playbook -i inventory.yml build_ami.yml -e @provisioning_vars.yml

Actual results:
# ansible-playbook -i inventory.yml /usr/share/ansible/openshift-ansible/playbooks/aws/openshift-cluster/build_ami.yml -e @provisioning_vars.yml -vvv
...
TASK [openshift_sanitize_inventory : Normalize openshift_release] ****************************************************************************************************************************
task path: /usr/share/ansible/openshift-ansible/roles/openshift_sanitize_inventory/tasks/main.yml:12
Wednesday 16 May 2018  05:41:13 -0400 (0:00:00.034)       0:00:03.977 ********* 
ok: [ec2-xx-xx-xx-xx.compute-1.amazonaws.com] => {
    "ansible_facts": {
        "openshift_release": "3.10"
    }, 
    "changed": false, 
    "failed": false
}

TASK [openshift_sanitize_inventory : ] ****************************************************************************************************************
task path: /usr/share/ansible/openshift-ansible/roles/openshift_sanitize_inventory/tasks/main.yml:22
Wednesday 16 May 2018  05:41:13 -0400 (0:00:00.036)       0:00:04.013 ********* 
fatal: [ec2-xx-xx-xx-xx.compute-1.amazonaws.com]: FAILED! => {
    "changed": false, 
    "failed": true, 
    "msg": "openshift_release is \"v3.10\" which is not a valid version string.\nPlease set it to a version string like \"3.4\"."
}

PLAY RECAP ***********************************************************************************************************************************************************************************
ec2-xx-xx-xx-xx.compute-1.amazonaws.com : ok=11   changed=0    unreachable=0    failed=1   
localhost                  : ok=14   changed=1    unreachable=0    failed=0   

Expected results:
Should pass the task.

Additional info:
This issue can work around by this:

# cat provisioning_vars.yml
...
# openshift_release must be specified.  Use whatever version of openshift
# that is supported by openshift-ansible that you wish.
openshift_release: "3.10" # v3.7
...

# ansible-playbook -i inventory.yml /usr/share/ansible/openshift-ansible/playbooks/aws/openshift-cluster/build_ami.yml -e @provisioning_vars.yml -vvv
...
TASK [openshift_sanitize_inventory : Normalize openshift_release] ****************************************************************************************************************************
task path: /usr/share/ansible/openshift-ansible/roles/openshift_sanitize_inventory/tasks/main.yml:12
Wednesday 16 May 2018  05:52:22 -0400 (0:00:00.035)       0:00:03.997 ********* 
ok: [ec2-xx-xx-xx-xx.compute-1.amazonaws.com] => {
    "ansible_facts": {
        "openshift_release": "3.10"
    }, 
    "changed": false, 
    "failed": false
}

TASK [openshift_sanitize_inventory : Abort when openshift_release is invalid] ****************************************************************************************************************
task path: /usr/share/ansible/openshift-ansible/roles/openshift_sanitize_inventory/tasks/main.yml:22
Wednesday 16 May 2018  05:52:22 -0400 (0:00:00.038)       0:00:04.036 ********* 
skipping: [ec2-xx-xx-xx-xx.compute-1.amazonaws.com] => {
    "changed": false, 
    "skip_reason": "Conditional result was False", 
    "skipped": true
}
...

Comment 2 Chris Callegari 2018-08-16 19:27:00 UTC
Tasks have been updated.  I no longer see this behavior.

$ cat provisioning_vars.yml | grep version
# openshift_release must be specified.  Use whatever version of openshift
openshift_version: 3.10

.....

TASK [Gathering Facts] ***********************************************************************************************************************************************
ok: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : include_tasks] ******************************************************************************************************************
included: /home/ccallega/git/openshift-ansible/roles/openshift_sanitize_inventory/tasks/deprecations.yml for ec2-54-173-140-108.compute-1.amazonaws.com

TASK [openshift_sanitize_inventory : Check for usage of deprecated variables] ****************************************************************************************
ok: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : debug] **************************************************************************************************************************
skipping: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : set_stats] **********************************************************************************************************************
skipping: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : Assign deprecated variables to correct counterparts] ****************************************************************************
included: /home/ccallega/git/openshift-ansible/roles/openshift_sanitize_inventory/tasks/__deprecations_metrics.yml for ec2-54-173-140-108.compute-1.amazonaws.com
included: /home/ccallega/git/openshift-ansible/roles/openshift_sanitize_inventory/tasks/__deprecations_logging.yml for ec2-54-173-140-108.compute-1.amazonaws.com

TASK [openshift_sanitize_inventory : conditional_set_fact] ***********************************************************************************************************
ok: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : conditional_set_fact] ***********************************************************************************************************
ok: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : set_fact] ***********************************************************************************************************************
ok: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : Standardize on latest variable names] *******************************************************************************************
ok: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : Normalize openshift_release] ****************************************************************************************************
ok: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : Abort when openshift_release is invalid] ****************************************************************************************
skipping: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : include_tasks] ******************************************************************************************************************
included: /home/ccallega/git/openshift-ansible/roles/openshift_sanitize_inventory/tasks/unsupported.yml for ec2-54-173-140-108.compute-1.amazonaws.com

TASK [openshift_sanitize_inventory : Ensure that openshift_use_dnsmasq is true] **************************************************************************************
skipping: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : Ensure that openshift_node_dnsmasq_install_network_manager_hook is true] ********************************************************
skipping: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : set_fact] ***********************************************************************************************************************
skipping: [ec2-54-173-140-108.compute-1.amazonaws.com] => (item=openshift_hosted_registry_storage_kind)
ok: [ec2-54-173-140-108.compute-1.amazonaws.com] => (item=openshift_metrics_storage_kind)
ok: [ec2-54-173-140-108.compute-1.amazonaws.com] => (item=openshift_logging_storage_kind)

TASK [openshift_sanitize_inventory : Ensure that dynamic provisioning is set if using dynamic storage] ***************************************************************
skipping: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : Ensure the hosted registry's GlusterFS storage is configured correctly] *********************************************************
skipping: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : Ensure the hosted registry's GlusterFS storage is configured correctly] *********************************************************
skipping: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : Ensure clusterid is set along with the cloudprovider] ***************************************************************************
skipping: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : Ensure ansible_service_broker_remove and ansible_service_broker_install are mutually exclusive] *********************************
skipping: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : Ensure template_service_broker_remove and template_service_broker_install are mutually exclusive] *******************************
skipping: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : Ensure that all requires vsphere configuration variables are set] ***************************************************************
skipping: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : ensure provider configuration variables are defined] ****************************************************************************
skipping: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : Ensure removed web console extension variables are not set] *********************************************************************
skipping: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : Ensure that web console port matches API server port] ***************************************************************************
skipping: [ec2-54-173-140-108.compute-1.amazonaws.com]

TASK [openshift_sanitize_inventory : At least one master is schedulable] *********************************************************************************************
skipping: [ec2-54-173-140-108.compute-1.amazonaws.com]

Comment 3 Chris Callegari 2018-08-16 19:27:21 UTC
Retest on master please

Comment 7 errata-xmlrpc 2018-10-11 07:20:00 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.