Bug 1505300
| Summary: | Build AMI failed cause normalize openshift_release has no effect | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Wenkai Shi <weshi> |
| Component: | Installer | Assignee: | Chris Callegari <ccallega> |
| Status: | CLOSED ERRATA | QA Contact: | sheng.lao <shlao> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 3.7.0 | CC: | aos-bugs, jokerman, kwoodson, mmccomas, weshi |
| Target Milestone: | --- | ||
| Target Release: | 3.11.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | No Doc Update | |
| Doc Text: |
undefined
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-10-11 07:19:06 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: | |||
So far I could work around by not setting "openshift_release: v3.7" in provisioning_vars.yml, if this looks good to you, it could be fix by modify the document. # cat provisioning_vars.yml.example ... # openshift_release must be specified. Use whatever version of openshift # that is supported by openshift-ansible that you wish. #openshift_release: # v3.7 ... # cat /usr/share/ansible/openshift-ansible/playbooks/aws/README.md ... # Minimum mandatory provisioning variables. See provisioning_vars.yml.example. # for more information. openshift_deployment_type: # 'origin' or 'openshift-enterprise' openshift_release: # example: v3.7 openshift_pkg_version: # example: -3.7.0 openshift_aws_ssh_key_name: # example: myuser_key openshift_aws_base_ami: # example: ami-12345678 openshift_aws_iam_cert_path: # example: '/path/to/wildcard.<clusterid>.example.com.crt' openshift_aws_iam_key_path: # example: '/path/to/wildcard.<clusterid>.example.com.key' ... Wenkai, Thanks for looking at this openshift_version issue. Could you also try using 'openshift_version: 3.7'? I think that the 'v' in 'v3.7' is causing the issue. I generally specify 'openshift_pkg_version=-3.7.0' in my inventory file and this solves the version. Thanks. Kenny,
I try to use "openshift_version: 3.7" in provisioning_vars.yml, it still failed.
I'm wonder if "openshift_release: v3.7" necessary in provisioning_vars.yml? Cause "openshift_release: v3.7" could setting in inventory.yml which works very well.
# 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.7
openshift_release: 3.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:35
ok: [ec2-xx-xx-xx-xx.compute-1.amazonaws.com] => {
"ansible_facts": {
"openshift_release": "3.7"
},
"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:45
fatal: [ec2-xx-xx-xx-xx.compute-1.amazonaws.com]: FAILED! => {
"failed": true,
"msg": "The conditional check 'not openshift_release | match('\\d+(\\.\\d+){1,3}$')' failed. The error was: Unexpected templating type error occurred on ({% if not openshift_release | match('\\d+(\\.\\d+){1,3}$') %} True {% else %} False {% endif %}): expected string or buffer\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/roles/openshift_sanitize_inventory/tasks/main.yml': line 45, 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"
}
...
Kenny, Russ, and Mike to brainstorm and come up with a solution for avoiding use of extra vars. Since CI/CD/Ops teams are not blocked by this we're pushing this out to 3.10 but if we can fix it before 3.9 that's fine too. 1. Test result: Passed # ansible-playbook -i inventory.yml -e @provisioning_vars.yml playbooks/aws/openshift-cluster/build_ami.yml ... ... TASK [openshift_aws : terminate temporary instance] ********************************************************************************* Thursday 09 August 2018 11:33:58 -0400 (0:00:00.028) 0:11:00.148 ******* changed: [localhost] PLAY RECAP ********************************************************************************* xxxxxxxxx : ok=144 changed=21 unreachable=0 failed=0 localhost : ok=18 changed=4 unreachable=0 failed=0 2. Environment: # git describe openshift-ansible-3.11.0-0.12.0-2-g44b45aa 3. Parameters: openshift_release: '3.7' # v3.7 openshift_pkg_version: '-3.7.61' # -3.7.0 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 |
Description of problem: Follow steps in [1] to build an AMI. Set "openshift_release: v3.7" in provisioning_vars.yml, build AMI with command [2]. It failed cause openshift_release is invalid. Installer could pass the TASK when remove "openshift_release: v3.7" in provisioning_vars.yml. [1]. /usr/share/ansible/openshift-ansible/playbooks/aws/README.md [2]. ansible-playbook -i inventory.yml /usr/share/ansible/openshift-ansible/playbooks/aws/openshift-cluster/build_ami.yml -e @provisioning_vars.yml -vvv Version-Release number of selected component (if applicable): openshift-ansible-3.7.0-0.174.0.git.0.01932ad.el7 ansible-2.4.0.0-5.el7 How reproducible: 100% Steps to Reproduce: 1. Prepare configure files # 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.7 openshift_release: v3.7 ... 2. Build AMI # ansible-playbook -i inventory.yml /usr/share/ansible/openshift-ansible/playbooks/aws/openshift-cluster/build_ami.yml -e @provisioning_vars.yml -vvv 3. 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:35 ok: [ec2-xx-xx-xx-xx.compute-1.amazonaws.com] => { "ansible_facts": { "openshift_release": "3.7" }, "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:45 fatal: [ec2-xx-xx-xx-xx.compute-1.amazonaws.com]: FAILED! => { "changed": false, "failed": true, "msg": "openshift_release is \"v3.7\" which is not a valid version string.\nPlease set it to a version string like \"3.4\"." } to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/aws/openshift-cluster/build_ami.retry ... Expected results: normalize openshift_release should has effect Additional info: