Skip to content
This repository has been archived by the owner on Jul 23, 2020. It is now read-only.

OSO proxy error in deleting workspace #3580

Closed
ldimaggi opened this issue May 17, 2018 · 5 comments
Closed

OSO proxy error in deleting workspace #3580

ldimaggi opened this issue May 17, 2018 · 5 comments

Comments

@ldimaggi
Copy link
Collaborator

In the course of debugging automated API tests, I inadvertently created an OSIO space with an invalid name - where the name included characters that the UI would prevent a user from using in a spacename: ldimaggi@redhat.com-SDD-space-2018-05-17T09:13:56

In trying to delete this space through the API:

It is possible to GET the space:
curl -s -X GET -H "Authorization: Bearer ${THE_TOKEN}" --header 'Accept: application/json' 'https://openshift.io/api/spaces/cb495986-5df1-41d1-b340-ac9a2b83ab12'

But - in trying to delete the space - this API call:
curl -s -X DELETE -H "Authorization: Bearer ${THE_TOKEN}" --header 'Accept: application/json' 'https://openshift.io/api/spaces/cb495986-5df1-41d1-b340-ac9a2b83ab12'

Fails to communicate with the OSO proxy - and returns this this error:

{"errors":[{"code":"internal_error","detail":"could not retrieve space ldimaggi@redhat.com-SDD-space-2018-05-17T09:13:56: failed to GET url http://f8osoproxy/oapi/v1/namespaces/ldimaggi/buildconfigs?labelSelector=space%!D(MISSING)ldimaggi%!r(MISSING)edhat.com-SDD-space-2018-05-17T09%!A(MISSING)13%!A(MISSING)56 due to status code 400","status":"500","title":"Internal error"}]}

@alexeykazakov
Copy link
Member

https://errortracking.prod-preview.openshift.io/openshift_io/fabric8-wit/issues/2083/

could not retrieve space ldimaggi@redhat.com-SDD-space-2018-05-17T09:13:56: failed to GET url http://f8osoproxy/oapi/v1/namespaces/ldimaggi/buildconfigs?labelSelector=space%3Dldimaggi%40redhat.com-SDD-space-2018-05-17T09%3A13%3A56 due to status code 400

@alexeykazakov
Copy link
Member

@xcoulon please take a look

@rgarg1
Copy link
Collaborator

rgarg1 commented May 18, 2018

Good catch Len

@xcoulon
Copy link
Collaborator

xcoulon commented May 23, 2018

ok, @alexeykazakov ;)

@xcoulon xcoulon self-assigned this May 23, 2018
@xcoulon xcoulon added this to the Sprint 149 milestone May 23, 2018
xcoulon added a commit to xcoulon/fabric8-wit that referenced this issue May 24, 2018
This will prevent creating spaces with a name that cannot be used
as a value in pod labels.
The regexp used in the controller replaces the validation function
that was previously used at the design level, which allows for returning
proper JSON-API errors to the clients.

Fixes openshiftio/openshift.io#3580

Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
xcoulon added a commit to xcoulon/fabric8-wit that referenced this issue May 24, 2018
This will prevent creating spaces with a name that cannot be used
as a value in pod labels (matching max length and pattern).
The regexp and length checks in the controller replace the validation function
that was previously used at the design level, which allows for returning
proper JSON-API errors to the clients.

Fixes openshiftio/openshift.io#3580

Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
xcoulon added a commit to xcoulon/fabric8-wit that referenced this issue May 24, 2018
This will prevent creating spaces with a name that cannot be used
as a value in pod labels (matching max length and pattern).
The regexp and length checks in the controller replace the validation function
that was previously used at the design level, which allows for returning
proper JSON-API errors to the clients.

Fixes openshiftio/openshift.io#3580

Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
@joshuawilson joshuawilson modified the milestones: Sprint 149, Sprint 150 May 29, 2018
@joshuawilson joshuawilson modified the milestones: Sprint 150, Sprint 151 Jun 21, 2018
@GeorgeActon GeorgeActon added the priority/P4 Normal label Jul 31, 2018
@xcoulon xcoulon removed their assignment Nov 20, 2018
@alexeykazakov
Copy link
Member

It duplicates #3503 at some extent.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants