Bug 1750494
| Summary: | Improve error message when apiVersion is mispelled: no version was provided | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Robert Bost <rbost> |
| Component: | Installer | Assignee: | Patrick Dillon <padillon> |
| Installer sub component: | openshift-installer | QA Contact: | gaoshang <sgao> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | medium | ||
| Priority: | medium | CC: | padillon |
| Version: | 4.1.0 | ||
| Target Milestone: | --- | ||
| Target Release: | 4.3.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause: validation of api version was using a different library than other validation code.
Consequence: when an incorrect api version was provided, an error message was presented but the field was not specified, so the user did not know the error message referred to the apiversion.
Fix: update the code to use the same package as other validation packages.
Result: when there is an error in the apiversion, the error message indicates that the error pertains to the apiversion field.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-01-23 11:05:47 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: | |||
|
Description
Robert Bost
2019-09-09 17:41:23 UTC
This bug has been verified and passed on openshift build 4.3.0-0.nightly-2019-10-16-010826, change status to VERIFIED. Version-Release: 4.3.0-0.nightly-2019-10-16-010826 # ./openshift-install version ./openshift-install v4.3.0 built from commit b63593362e750d4a92edf5ec0d260618a102e754 release image registry.svc.ci.openshift.org/ocp/release@sha256:d9c36fb738d5aecae427b4cf5b630be6ba30eeefc36e583c0ded60057df44ed9 Steps: 1. Create install config # ./openshift-install create --dir=$DIR_NAME install-config 2. Modify install-config.yaml, remove apiVersion value and create cluster, check error message # head -n 1 cluster-0/install-config.yaml apiVersion: # ./openshift-install create cluster --dir cluster-0/ --log-level debug DEBUG OpenShift Installer v4.3.0 DEBUG Built from commit b63593362e750d4a92edf5ec0d260618a102e754 DEBUG Fetching Terraform Variables... DEBUG Loading Terraform Variables... DEBUG Loading Cluster ID... DEBUG Loading Install Config... DEBUG Loading SSH Key... DEBUG Using SSH Key loaded from state file DEBUG Loading Base Domain... DEBUG Loading Platform... DEBUG Using Platform loaded from state file DEBUG Using Base Domain loaded from state file DEBUG Loading Cluster Name... DEBUG Loading Base Domain... DEBUG Using Cluster Name loaded from state file DEBUG Loading Pull Secret... DEBUG Using Pull Secret loaded from state file DEBUG Loading Platform... FATAL failed to fetch Terraform Variables: failed to load asset "Install Config": failed to upconvert install config: apiVersion: Required value: no version was provided 3. Modify install-config.yaml, remove apiVersion all line and create cluster, check error message # head -n 1 cluster-0/install-config.yaml baseDomain: qe.devcluster.openshift.com # ./openshift-install create cluster --dir cluster-0/ --log-level debug DEBUG OpenShift Installer v4.3.0 DEBUG Built from commit b63593362e750d4a92edf5ec0d260618a102e754 DEBUG Fetching Terraform Variables... DEBUG Loading Terraform Variables... DEBUG Loading Cluster ID... DEBUG Loading Install Config... DEBUG Loading SSH Key... DEBUG Using SSH Key loaded from state file DEBUG Loading Base Domain... DEBUG Loading Platform... DEBUG Using Platform loaded from state file DEBUG Using Base Domain loaded from state file DEBUG Loading Cluster Name... DEBUG Loading Base Domain... DEBUG Using Cluster Name loaded from state file DEBUG Loading Pull Secret... DEBUG Using Pull Secret loaded from state file DEBUG Loading Platform... FATAL failed to fetch Terraform Variables: failed to load asset "Install Config": failed to upconvert install config: apiVersion: Required value: no version was provided 4. Modify install-config.yaml again, set wrong apiVersion and create cluster, check error message # head -n 1 cluster-0/install-config.yaml apiVersion: ddd # ./openshift-install create cluster --dir cluster-0/ --log-level debug DEBUG OpenShift Installer v4.3.0 DEBUG Built from commit b63593362e750d4a92edf5ec0d260618a102e754 DEBUG Fetching Terraform Variables... DEBUG Loading Terraform Variables... DEBUG Loading Cluster ID... DEBUG Loading Install Config... DEBUG Loading SSH Key... DEBUG Using SSH Key loaded from state file DEBUG Loading Base Domain... DEBUG Loading Platform... DEBUG Using Platform loaded from state file DEBUG Using Base Domain loaded from state file DEBUG Loading Cluster Name... DEBUG Loading Base Domain... DEBUG Using Cluster Name loaded from state file DEBUG Loading Pull Secret... DEBUG Using Pull Secret loaded from state file DEBUG Loading Platform... FATAL failed to fetch Terraform Variables: failed to load asset "Install Config": failed to upconvert install config: apiVersion: Invalid value: "ddd": cannot upconvert from version ddd 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-2020:0062 |