Bug 1893771
| Summary: | [4.6] pull secret is required during cluster creation, but not marked as required in swagger.yaml | ||||||
|---|---|---|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | mchernyk | ||||
| Component: | assisted-installer | Assignee: | Michael Filanov <mfilanov> | ||||
| assisted-installer sub component: | assisted-service | QA Contact: | Yuri Obshansky <yobshans> | ||||
| Status: | CLOSED ERRATA | Docs Contact: | |||||
| Severity: | unspecified | ||||||
| Priority: | unspecified | CC: | aos-bugs | ||||
| Version: | 4.6 | ||||||
| Target Milestone: | --- | ||||||
| Target Release: | 4.6.z | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | OCP-Metal-v1.0.11.1 | Doc Type: | No Doc Update | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2021-08-25 13:49:22 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: | |||||||
| Attachments: |
|
||||||
Created attachment 1725844 [details]
Swagger model screenshot
itsoiref if i remember correctly you already handled this no? We already validate that pull secret is set in the code but i updated swagger as well, after all this is our API documentation https://github.com/openshift/assisted-service/pull/655 Verified on: Staging environment assisted-installer: v1.0.11.1 facet-lib: v1.4.2 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 (OpenShift Container Platform 4.6.43 bug fix update), 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-2021:3197 |
Description of problem: Pull secret is not marked as mandatory field for Assisted Cluster creation by POST API request to /clusters, but it's presence is validated. Version-Release number of selected component (if applicable): v1.0.10.2, Staging env. How reproducible: 100% Steps to Reproduce: 1. Check that pull_secret is not listed in swagger.yaml under "required:" key for cluster-create-params: cluster-create-params: type: object required: - name - openshift_version 2. Execute script: AUTH="Authorization: Bearer <TOKEN>" API_ENDPOINT="<api endpoint url>" CLUSTER_OBJECT='{"name": "test-cluster","openshift_version": "4.6"}' curl -H 'Content-Type: application/json' -H "${AUTH}" "${API_ENDPOINT}"/clusters -d "${CLUSTER_OBJECT}" Actual results: POST request returns HTTP error 400, which contradicts documentation { "code": "400", "href": "", "id": 400, "kind": "Error", "reason": "Pull-secret must be provided" } Expected results: Either pull secret field is marked as mandatory in swagger.yaml or it's presence is not enforced. Additional info: