Bug 1422839
| Summary: | [3.3] Failed to upgrade 3.2 to 3.3 due to undefined variable openshift_master_default_subdomain | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | liujia <jiajliu> |
| Component: | Cluster Version Operator | Assignee: | ewolinet |
| Status: | CLOSED ERRATA | QA Contact: | Anping Li <anli> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.3.1 | CC: | abutcher, aos-bugs, bleanhar, ewolinet, jiajliu, jokerman, mmccomas |
| Target Milestone: | --- | ||
| Target Release: | 3.3.1 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause:
The openshift_hosted_metrics role required the 'openshift_master_default_subdomain' fact to be set when evaluating the value for 'openshift_hosted_metrics_public_url' but it wasn't being set correctly.
Consequence:
The play would fail.
Fix:
We correctly set the fact 'openshift_master_default_subdomain' prior to setting 'openshift_hosted_metrics_public_url'
Result:
The play completes successfully without needing to set 'openshift_master_default_subdomain' in the inventory file.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-04-05 08:53:11 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: | |||
workaround: add "openshift_master_default_subdomain=None" in the hosts file. Andrew, does the default for openshift_master_default_subdomain from https://github.com/openshift/openshift-ansible/pull/2450 need to be backported? I know the description says upgrading from 3.2 to 3.2 bug I'm assuming it meant 3.2 to 3.3 since QE set the version to 3.3.1. Brenton, that change would not impact upgrade but the fix may be similar. I'm unable to recreate this. Can you confirm that you're going from a 3.2 OCP installation to a 3.3 using the release specified above? Is the host file you pasted accurate in that you aren't also trying to install openshift_hosted_metrics? @ewolinet I meant to upgrade ocp3.2 to ocp3.3, just using above pasted inventory file in comment1. I can re-produce it again use above inventory file. Rpm install OCP3.2. Prepare 3.3 repo. Run upgrade playbook. atomic-openshift-utils-3.3.64-1.git.0.43bfb06.el7.noarch Can you please get me the contents of /etc/ansible/facts.d/openshift.fact after installing 3.2 and after the upgrade to 3.3 fails? Also, you're 100% certain that openshift_hosted_metrics_deploy is not set to true in your inventories either pre-upgrade or during? Version: atomic-openshift-utils-3.3.68-1.git.0.3792453.el7.noarch Steps: 1. Install ocp3.2 2. Upgrade 3.2 to 3.3 Result: Upgrade successfully. Change bug status to verify. 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-2017:0883 |
Description of problem: Trigger upgrade from 3.2 to 3.2, upgrade failed and exit at task [openshift_master_facts : Set master facts]: fatal: [openshift-149.x.x.x]: FAILED! => { "failed": true } MSG: the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: {{ openshift_hosted_metrics_public_url | default('hawkular-metrics.' ~ (openshift.master.default_subdomain | default(openshift_master_default_subdomain ))) | oo_hostname_from_url }}: 'openshift_master_default_subdomain' is undefined The error appears to have been in '/usr/share/ansible/openshift-ansible/roles/openshift_master_facts/tasks/main.yml': line 2, column 3, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: --- - name: Set master facts ^ here Version-Release number of selected component (if applicable): atomic-openshift-utils-3.3.64-1.git.0.43bfb06.el7.noarch How reproducible: always Steps to Reproduce: 1.install latest ocp3.2 2.upgrade 3.2 to 3.2 # ansible-playbook -i /tmp/hosts /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade.yml 3. Actual results: Upgrade failed. Expected results: Upgrade successfully. Additional info: