openservicebrokerapi / servicebroker

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

Binding retries in stateless brokers #260

Closed nilebox closed 4 years ago

nilebox commented 7 years ago

According to OSB Bindings spec:

200 OK: MUST be returned if the binding already exists and the requested parameters are identical to the existing binding. The expected response body is below.

How can this requirement be achieved in stateless brokers (see https://github.com/openservicebrokerapi/servicebroker/issues/203 and https://github.com/openservicebrokerapi/servicebroker/issues/225#issuecomment-311230413)? This requirement implicitly stands that:

  1. Broker stores the request payload for each binding somewhere (i.e. broker is stateful).
  2. Broker is able to re-retrieve the credentials for existing Binding (despite that there is no GET endpoint).

I'm pretty sure that existing stateless brokers don't respect this requirement, otherwise they are stateful 😕 Shall we remove this requirement from the spec?

arschles commented 7 years ago

This seems to be a subset of #225

nilebox commented 7 years ago

@arschles it's related, but not a subset. The question for this issue is whether this requirement is always respected in the current world of brokers. If not, we should remove it from the spec.

Also see related issue in Service Catalog: #1062 If this requirement is respected, there is no need for preventing duplicate requests from the Service Catalog side.

duglin commented 7 years ago

related #291 proposal: https://github.com/openservicebrokerapi/servicebroker/issues/291#issuecomment-323344056

mattmcneeney commented 5 years ago

I'm not sure what a good solution to this issue is. I understand the reasoning behind a stateless broker not being able to respond with a 200 OK here as it can't remember what parameters were used originally, but those brokers could always just respond with a 409 Conflict:

409 Conflict: MUST be returned if a Service Binding with the same id, for the same Service Instance, already exists or is being created but with different parameters.

What do you think @fmui ?

fmui commented 5 years ago

Looks like we solved that already by accident. See #528

mattmcneeney commented 5 years ago

You're right, that does technically solve this, but I still think that the spec doesn't offer much guidance as to what service brokers should do if they don't have state and they can't determine if the configuration parameters were the same as before. Should they return a 200 or 409 in that case?

mattmcneeney commented 5 years ago

Is this a problem for anyone, or can we close this for now and wait until it becomes a problem?

mattmcneeney commented 4 years ago

Closing due to inactivity. Please reopen if this becomes a problem for anyone.