openservicebrokerapi / servicebroker

Open Service Broker API Specification
https://openservicebrokerapi.org/
Apache License 2.0
1.19k stars 434 forks source link

Define more expected response codes for provisioning #277

Closed krancour closed 5 years ago

krancour commented 7 years ago

The spec is clear that if a request to provision instance x is received, and the attributes of that request match an existing instance, then the broker should respond with a 200 or 202, depending on whether provisioning is complete or ongoing. If the attributes are different, it's a conflict-- 409.

What's conspicuously absent is any expectation of what is returned if the attributes of the new provisioning request match an existing instance, but that instance is currently being deprovisioned. This scenario might not manifest with a well-behaved client, but for completeness, I believe the expected return code should be explicitly defined for this scenario.

Personally, I find a 409 to be the most reasonable option for this case.

duglin commented 7 years ago

409 seems reasonable to me.

mattmcneeney commented 5 years ago

I believe with the new ConcurrencyError error code this is now resolved.