Bug 1536088 - bind PUT causes broker panic and 502 when ServiceInstance not found
Summary: bind PUT causes broker panic and 502 when ServiceInstance not found
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Broker
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.9.0
Assignee: Michael Hrivnak
QA Contact: Zihan Tang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-18 15:40 UTC by Michael Hrivnak
Modified: 2018-03-28 14:20 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-03-28 14:20:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
reproducer script (731 bytes, application/x-shellscript)
2018-01-18 15:40 UTC, Michael Hrivnak
no flags Details
verify script (954 bytes, application/x-shellscript)
2018-01-25 10:02 UTC, Zihan Tang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift ansible-service-broker issues 652 0 None None None 2018-01-18 17:40:23 UTC
Red Hat Product Errata RHBA-2018:0489 0 None None None 2018-03-28 14:20:59 UTC

Description Michael Hrivnak 2018-01-18 15:40:40 UTC
Created attachment 1382947 [details]
reproducer script

Reported upstream: https://github.com/openshift/ansible-service-broker/issues/652

Description of problem:
I tried to PUT /v2/service_instances/$INSTANCE_ID/service_bindings/$BINDING_ID?accepts_incomplete=true where $INSTANCE_ID does not exist.

This causes the broker to panic, resulting in a 502 response.

Version-Release number of selected component (if applicable):
master

How reproducible:
always

Steps to Reproduce:
1. Configure the broker to run APBs for bind and unbind, and to auto-escalate.
2. Run the attached script.

Actual results:
broker panic

Expected results:
400 response per OSB API spec

Comment 2 Zhang Cheng 2018-01-19 03:45:55 UTC
zitang, Please keep trace and try to reproduce.

Comment 4 Zihan Tang 2018-01-25 10:00:57 UTC
Verified.
asb image: registry.access.stage.redhat.com/openshift3/ose-ansible-service-broker:v3.9.0-0.23.0.1
asb version : 1.1.7

[root@dhcp-140-42 script]# sh ./reproducer.sh asb-1338-openshift-ansible-service-broker.apps.0125-tqt.qe.rhcloud.com
asb-1338-openshift-ansible-service-broker.apps.0125-tqt.qe.rhcloud.com/ansible-service-broker/v2/service_instances/0aa60c8e-9b53-419f-b245-435906257c7d/service_bindings/f06f157d-c8d6-4ec8-ad8f-04bb59b6b907?accepts_incomplete=true
HTTP/1.1 400 Bad Request
Content-Type: application/json
Date: Thu, 25 Jan 2018 09:54:08 GMT
Content-Length: 33
Set-Cookie: 89a6d633054ded194d4e1360cdc1fbef=e2b8f07960b52ab9f5242c04f027c1e1; path=/; HttpOnly; Secure

{
  "description": "not found"
}

ASB Log:
[2018-01-25T09:54:08.602Z] [ERROR] - Could not find a service instance in dao - 100: Key not found (/service_instance/0aa60c8e-9b53-419f-b245-435906257c7d) [262]
10.129.0.1 - - [25/Jan/2018:09:54:08 +0000] "PUT /ansible-service-broker/v2/service_instances/0aa60c8e-9b53-419f-b245-435906257c7d/service_bindings/f06f157d-c8d6-4ec8-ad8f-04bb59b6b907?accepts_incomplete=true HTTP/1.1" 400 33

Comment 5 Zihan Tang 2018-01-25 10:02:03 UTC
Created attachment 1385992 [details]
verify script

Comment 8 errata-xmlrpc 2018-03-28 14:20:40 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, 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-2018:0489


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