This issue describes the findings regarding the service instance endpoints.
We made the assumption that a service instance which is in state update failed or delete failed, is still in a functioning state. The next OSBAPI spec version 2.16 "Allow[s] Service Brokers to indicate if a Service Instance is still usable after a failed update or deprovisioning" (https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#changes-since-v215), which is currently not supported by the Cloud Controller. Furthermore, "If the broker does not indicate in the Error response or Last Operation response whether the Service Instance is usable or not, the Platform SHOULD assume it is still usable" (https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#response-5).
Service Instances
POST /v3/service_instances (i.e. cf create-service) for already existing service instance
1: 409 Conflict / An operation for service instance <instance name> is in progress..
DELETE /v3/service_instances (i.e. cf delete-service) for already existing service-instance
Resource State
Observed Behaviour
Wanted Behaviour
PR
Fixed in main
none (synchronous case)
:question:
:heavy_minus_sign:
create succeeded
accepts request
:white_check_mark:
:heavy_minus_sign:
create in progress
accepts request
:white_check_mark:
:heavy_minus_sign:
create failed
accepts request
:white_check_mark:
:heavy_minus_sign:
update succeeded
accepts request
:white_check_mark:
:heavy_minus_sign:
update in progress
rejects request (1)
:white_check_mark:
:heavy_minus_sign:
update failed
accepts request
:white_check_mark:
:heavy_minus_sign:
delete failed
accepts request
:white_check_mark:
:heavy_minus_sign:
delete in progress
rejects request (1)
:white_check_mark:
:heavy_minus_sign:
1: UnprocessableEntity / There is an operation in progress for the service instance..
POST /v3/spaces/:guid/actions/apply_manifest (i.e. cf push) for already existing service-instance
Resource State
Observed Behaviour
Wanted Behaviour
PR
Fixed in main
none (synchronous case)
:question:
:heavy_minus_sign:
create succeeded
accepts request
:white_check_mark:
:heavy_minus_sign:
create in progress
space.apply_manifest fails (1)
:white_check_mark:
:heavy_minus_sign:
create failed
space.apply_manifest succeeds, binding is being created
returns an error
#2756
:white_check_mark:
update succeeded
space.apply_manifest succeeds, binding is being created
:white_check_mark:
:heavy_minus_sign:
update in progress
space.apply_manifest fails (1)
:white_check_mark:
:heavy_minus_sign:
update failed
space.apply_manifest succeeds, binding is being created
:white_check_mark:
:heavy_minus_sign:
delete failed
space.apply_manifest succeeds, binding is being created
:white_check_mark:
:heavy_minus_sign:
delete in progress
space.apply_manifest fails (1)
:white_check_mark:
:heavy_minus_sign:
1: UnprocessableEntity / For application '<app name>': For service 'instance name': There is an operation in progress for the service instance.
POST /v3/service_instances/:guid/relationships/shared_spaces (i.e. cf share-service) for already existing service-instance
Resource State
Observed Behaviour
Wanted Behaviour
PR
Fixed in main
none (synchronous case)
:question:
:heavy_minus_sign:
create succeeded
Accepts request, service instance is being shared with another space
:white_check_mark:
:heavy_minus_sign:
create in progress
Accepts request, service instance is being shared with another space
returns an error (1)
#2739
:white_check_mark:
create failed
Accepts request, service instance is being shared with another space
returns an error (not exists)
#2739
:white_check_mark:
update succeeded
Accepts request, service instance is being shared with another space
:white_check_mark:
:heavy_minus_sign:
update in progress
Accepts request, service instance is being shared with another space
:white_check_mark:
:heavy_minus_sign:
update failed
Accepts request, service instance is being shared with another space
:white_check_mark:
:heavy_minus_sign:
delete failed
Accepts request, service instance is being shared with another space
:white_check_mark:
:heavy_minus_sign:
delete in progress
Accepts request, service instance is being shared with another space
delete in progress error msg
#2739
:white_check_mark:
1: The service instance creation could still fail, in which case we reject requests. So it makes sense to reject requests until the service instance has been created successfully
GET /v3/service_instances/:guid/parameters for already existing service-instance
Resource State
Observed Behaviour
Wanted Behaviour
PR
Fixed in main
none (synchronous case)
:question:
:heavy_minus_sign:
create succeeded
accepts request
:white_check_mark:
:heavy_minus_sign:
create in progress
rejects request (1)
:white_check_mark:
:heavy_minus_sign:
create failed
accepts request
returns an error (not exists)
#2750
:white_check_mark:
update succeeded
accepts request
:white_check_mark:
:heavy_minus_sign:
update in progress
rejects request (1)
:white_check_mark:
:heavy_minus_sign:
update failed
accepts request
:white_check_mark:
:heavy_minus_sign:
delete failed
accepts request
:white_check_mark:
:heavy_minus_sign:
delete in progress
rejects request (1)
:white_check_mark:
:heavy_minus_sign:
1: 409 Conflict / An operation for service instance <instance name> is in progress..
Legend
V3 API
The introduction of the Failed State for Broker operations does come with some unwanted behaviour in some cases. A first analysis and fix of the service binding endpoints was done here: https://github.com/cloudfoundry/cloud_controller_ng/issues/2637
This issue describes the findings regarding the service instance endpoints.
We made the assumption that a service instance which is in state
update failed
ordelete failed
, is still in a functioning state. The next OSBAPI spec version 2.16 "Allow[s] Service Brokers to indicate if a Service Instance is still usable after a failed update or deprovisioning" (https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#changes-since-v215), which is currently not supported by the Cloud Controller. Furthermore, "If the broker does not indicate in the Error response or Last Operation response whether the Service Instance is usable or not, the Platform SHOULD assume it is still usable" (https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#response-5).Service Instances
POST /v3/service_instances (i.e. cf create-service) for already existing service instance
UnprocessableEntity
/The service instance name is taken: <instance name>
.PATCH /v3/service_instances/:guid (i.e. cf update-service / upgrade-service) for already existing service-instance
409 Conflict
/An operation for service instance <instance name> is in progress.
.DELETE /v3/service_instances (i.e. cf delete-service) for already existing service-instance
UnprocessableEntity
/There is an operation in progress for the service instance.
.POST /v3/spaces/:guid/actions/apply_manifest (i.e. cf push) for already existing service-instance
UnprocessableEntity
/For application '<app name>': For service 'instance name': There is an operation in progress for the service instance
.POST /v3/service_instances/:guid/relationships/shared_spaces (i.e. cf share-service) for already existing service-instance
GET /v3/service_instances/:guid/parameters for already existing service-instance
409 Conflict
/An operation for service instance <instance name> is in progress.
.