Closed mhrivnak closed 6 years ago
I'll work on a fix.
The root cause and possible solutions are being discussed here: https://github.com/openshift/ansible-service-broker/pull/680
Tracked here as well: https://bugzilla.redhat.com/show_bug.cgi?id=1543521
@mhrivnak referenced wrong issue. apologies :)
What happened: I made exactly the same async bind call twice in rapid succession. When the second call was made, the first operation was still running on the server.
Per the proposed OSB API spec, the second call should return the same token as the first in the body and a response code of 202. Instead it returned the provision credentials and a 200.
The first response:
The second response:
What you expected to happen: Same response twice in a row
What the proposed spec says A 202 http response code "MUST be returned if the binding is in progress. This triggers the Platform to poll the Polling Last Operation for Service Bindings endpoint for operation status. Information regarding the Service Binding (i.e. credentials) MUST NOT be returned in this asynchronous request. Note that a re-sent PUT request MUST return a 202 Accepted, not a 200 OK, if the binding is not yet fully created."
https://github.com/mattmcneeney/servicebroker/blob/a57c1723960490bc5b31096c204cbd21d266cea3/spec.md#response-5
Likely Cause: I suspect that when the second request is processed, it finds a record of the in-progress binding and misinterprets that as the binding already existing, and then defaults to returning whatever credentials it finds, which are only the provision credentials. But that's just a vague theory.
How to reproduce it:
accepts_complete=true
in rapid succession