Bug 1893771 - [4.6] pull secret is required during cluster creation, but not marked as required in swagger.yaml
Summary: [4.6] pull secret is required during cluster creation, but not marked as requ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: assisted-installer
Version: 4.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.6.z
Assignee: Michael Filanov
QA Contact: Yuri Obshansky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-02 15:03 UTC by mchernyk
Modified: 2021-08-25 13:49 UTC (History)
1 user (show)

Fixed In Version: OCP-Metal-v1.0.11.1
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-25 13:49:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Swagger model screenshot (160.09 KB, image/png)
2020-11-02 15:04 UTC, mchernyk
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:3197 0 None None None 2021-08-25 13:49:35 UTC

Description mchernyk 2020-11-02 15:03:43 UTC
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:

Comment 1 mchernyk 2020-11-02 15:04:36 UTC
Created attachment 1725844 [details]
Swagger model screenshot

Comment 2 Michael Filanov 2020-11-02 15:09:04 UTC
itsoiref if i remember correctly you already handled this no?

Comment 3 Michael Filanov 2020-11-09 15:29:46 UTC
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

Comment 4 mchernyk 2020-11-16 19:07:25 UTC
Verified on:
Staging environment 
assisted-installer: v1.0.11.1
facet-lib: v1.4.2

Comment 7 errata-xmlrpc 2021-08-25 13:49:22 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 (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


Note You need to log in before you can comment on or make changes to this bug.