openservicebrokerapi / servicebroker

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

Update existing service instance: not able to delete while update in progress #729

Closed snehalborse closed 2 years ago

snehalborse commented 4 years ago

What is the problem? 1) Provision a new service instance and delete it while creation in progress 2) Update an existing service instance and delete it while update in progress

for scenario 1 I was able to delete the service while it was still creating

for scenario 2 I get error if I try any operation while update in progress Server error, status code: 409, error code: 60016, message: An operation for service instance my-service is in progress.

Does service broker allow two operations simultaneously? Is this the expected behavior? If so, then why does it give error in case of update

Expected behavior Allow delete in both scenarios or give error in both scenarios

fmui commented 4 years ago

It's up to the broker if and when concurrent operations are allowed. The spec says this:

Service Brokers MAY choose the degree to which they support concurrent requests, ranging from not supporting them at all to only supporting them in selective situations. If a Service Broker receives a request that it is not able to process due a concurrency issue then the Service Broker MUST reject the request with a HTTP 422 Unprocessable Entity and a response body containing error code "ConcurrencyError" (see Service Broker Errors).

The first scenario is also explicitly covered by the spec:

If a Service Broker accepts the request to delete a Service Instance during the process of it being provisioned, then it MUST have the net effect of halting the current creation process and beginning the deletion of any resources associated with the Service Instance.

In the second scenario, the broker returns the wrong status code, though.

Does this answer your question? If so, please close this issue.

pivotal-marcela-campo commented 2 years ago

Closing this as the question was answer and there wasn't activity ever since.