|
29 | 29 | - [Fetching a Service Binding](#fetching-a-service-binding) |
30 | 30 | - [Unbinding](#unbinding) |
31 | 31 | - [Deprovisioning](#deprovisioning) |
32 | | - - [Orphans](#orphans) |
| 32 | + - [Orphan Mitigation](#orphan-mitigation) |
33 | 33 |
|
34 | 34 | ## API Overview |
35 | 35 |
|
@@ -250,10 +250,11 @@ Where the `value`, when decoded, is: |
250 | 250 | ``` |
251 | 251 |
|
252 | 252 | Note that not all messages sent to a Service Broker are initiated by an |
253 | | -end-user of the Platform. For example, during orphan mitigation or during the |
254 | | -querying of the Service Broker's catalog, the Platform might not have an |
255 | | -end-user with which to associate the request, therefore in those cases the |
256 | | -originating identity header would not be included in those messages. |
| 253 | +end-user of the Platform. For example, during |
| 254 | +[Orphan Mitigation](#orphan-mitigation) or during the querying of the Service |
| 255 | +Broker's catalog, the Platform might not have an end-user with which to |
| 256 | +associate the request, therefore in those cases the originating identity header |
| 257 | +would not be included in those messages. |
257 | 258 |
|
258 | 259 | ## Vendor Extension Fields |
259 | 260 |
|
@@ -703,9 +704,9 @@ containing error code `"ConcurrencyError"` (see |
703 | 704 | a helpful error message in the `description` field such as `"Another operation |
704 | 705 | for this Service Instance is in progress."`. |
705 | 706 |
|
706 | | -Note that per the [Orphans](#orphans) section, this error response does not |
707 | | -cause orphan mitigation to be initiated. Therefore, Platforms receiving this |
708 | | -error response SHOULD resend the request at a later time. |
| 707 | +This error response MUST not cause orphan mitigation to be initiated (see the |
| 708 | +[Orphan Mitigation](#orphan-mitigation) section). Therefore, Platforms receiving |
| 709 | +this error response SHOULD resend the request at a later time. |
709 | 710 |
|
710 | 711 | Brokers MAY choose to treat the creation of a Service Binding as a mutation of |
711 | 712 | the corresponding Service Instance - it is an implementation choice. Doing so |
@@ -779,11 +780,10 @@ For success responses, the following fields are defined: |
779 | 780 | } |
780 | 781 | ``` |
781 | 782 |
|
782 | | -If the response contains `"state": "failed"` then the Platform MUST send a |
783 | | -deprovision request to the Service Broker to prevent an orphan being created on |
784 | | -the Service Broker. However, while the Platform will attempt |
785 | | -to send a deprovision request, Service Brokers MAY automatically delete |
786 | | -any resources associated with the failed provisioning request on their own. |
| 783 | +For asynchronous provision operations, if the response contains |
| 784 | +`"state": "failed"`, then the Platform MAY need to send a deprovision request to |
| 785 | +the Service Broker to prevent an orphan being created (see the |
| 786 | +[Orphan Mitigation](#orphan-mitigation) section). |
787 | 787 |
|
788 | 788 | ## Polling Last Operation for Service Bindings |
789 | 789 |
|
@@ -857,9 +857,9 @@ For success responses, the following fields are defined: |
857 | 857 | } |
858 | 858 | ``` |
859 | 859 |
|
860 | | -If the response contains `"state": "failed"` then the Platform MUST send an |
861 | | -unbind request to the Service Broker to prevent an orphan being created on |
862 | | -the Service Broker. |
| 860 | +If the response contains `"state": "failed"`, then the Platform MAY need to send |
| 861 | +an unbind request to the Service Broker to prevent an orphan being created (see |
| 862 | +the [Orphan Mitigation](#orphan-mitigation) section). |
863 | 863 |
|
864 | 864 | ## Polling Interval and Duration |
865 | 865 |
|
@@ -949,11 +949,10 @@ $ curl http://username:password@service-broker-url/v2/service_instances/:instanc |
949 | 949 | | 409 Conflict | MUST be returned if a Service Instance with the same id already exists but with different attributes. | |
950 | 950 | | 422 Unprocessable Entity | MUST be returned if the Service Broker only supports asynchronous provisioning for the requested plan and the request did not include `?accepts_incomplete=true`. The response body MUST contain error code `"AsyncRequired"` (see [Service Broker Errors](#service-broker-errors)). The error response MAY include a helpful error message in the `description` field such as `"This Service Plan requires client support for asynchronous service operations."`. | |
951 | 951 |
|
952 | | -Responses with any other status code MUST be interpreted as a failure. See |
953 | | -the [Orphans](#orphans) section for more information related to whether |
954 | | -orphan mitigation needs to be applied. While a Platform might attempt |
955 | | -to send a deprovision request, Service Brokers MAY automatically delete |
956 | | -any resources associated with the failed provisioning request on their own. |
| 952 | +Responses with any other status code MUST be interpreted as a failure. If a |
| 953 | +failure occurs, then the Platform MAY need to send a deprovision request to the |
| 954 | +Service Broker to prevent an orphan being created (see the |
| 955 | +[Orphan Mitigation](#orphan-mitigation) section). |
957 | 956 |
|
958 | 957 | #### Body |
959 | 958 |
|
@@ -1341,11 +1340,10 @@ $ curl http://username:password@service-broker-url/v2/service_instances/:instanc |
1341 | 1340 | | 409 Conflict | MUST be returned if a Service Binding with the same id, for the same Service Instance, already exists but with different parameters. | |
1342 | 1341 | | 422 Unprocessable Entity | MUST be returned if the Service Broker requires that `app_guid` be included in the request body. The response body MUST contain error code `"RequiresApp"` (see [Service Broker Errors](#service-broker-errors)). The error response MAY include a helpful error message in the `description` field such as `"This Service supports generation of credentials through binding an application only."`. Additionally, if the Service Broker rejects the request due to a concurrent request to create a Service Binding for the same Service Instance, then this error MUST be returned (see [Blocking Operations](#blocking-operations)). This MUST also be returned if the Service Broker only supports asynchronous bindings for the Service Instance and the request did not include `?accepts_incomplete=true`. In this case, the response body MUST contain error code `"AsyncRequired"` (see [Service Broker Errors](#service-broker-errors)). The error response MAY include a helpful error message in the `description` field such as `"This Service Instance requires client support for asynchronous binding operations."`. | |
1343 | 1342 |
|
1344 | | -Responses with any other status code MUST be interpreted as a failure and an |
1345 | | -unbind request MUST be sent to the Service Broker to prevent an orphan being |
1346 | | -created on the Service Broker. However, while the platform will attempt |
1347 | | -to send an unbind request, Service Brokers MAY automatically delete |
1348 | | -any resources associated with the failed bind request on their own. |
| 1343 | +Responses with any other status code MUST be interpreted as a failure. If a |
| 1344 | +failure occurs, then the Platform MAY need to send an unbind request to the |
| 1345 | +Service Broker to prevent an orphan being created (see the |
| 1346 | +[Orphan Mitigation](#orphan-mitigation) section). |
1349 | 1347 |
|
1350 | 1348 | #### Body |
1351 | 1349 |
|
@@ -1616,40 +1614,49 @@ For success responses, the following fields are defined: |
1616 | 1614 | } |
1617 | 1615 | ``` |
1618 | 1616 |
|
1619 | | -## Orphans |
| 1617 | +## Orphan Mitigation |
1620 | 1618 |
|
1621 | 1619 | The Platform is the source of truth for Service Instances and Service Bindings. |
1622 | 1620 | Service Brokers are expected to have successfully provisioned all of the Service |
1623 | 1621 | Instances and Service Bindings that the Platform knows about, and none that it |
1624 | 1622 | doesn't. |
1625 | 1623 |
|
1626 | | -Orphans can result if the Service Broker does not return a response before a |
1627 | | -request from the Platform times out (typically 60 seconds). For example, if a |
1628 | | -Service Broker does not return a response to a provision request before the |
1629 | | -request times out, the Service Broker might eventually succeed in provisioning |
1630 | | -a Service Instance after the Platform considers the request a failure. This |
1631 | | -results in an orphan Service Instance on the Service Broker's side. |
| 1624 | +Orphaned Service Instances and Service Bindings MAY be created by in any of the |
| 1625 | +following scenarios: |
| 1626 | +* The Service Broker does not return a response before a request from the |
| 1627 | +Platform times out (typically 60 seconds). The Service Broker might eventually |
| 1628 | +succeed in creating a resource, however the Platform MAY have already considered |
| 1629 | +the request a failure. |
| 1630 | +* A synchronous [Provisioning](#provisioning) request fails. |
| 1631 | +* A call to the |
| 1632 | +[Polling Last Operation for Service Instances](#polling-last-operation-for-service-instances) |
| 1633 | +endpoint returns `"state": "failed"` for an asynchronous provisioning request |
| 1634 | +* A synchronous [Binding](#binding]) request fails |
| 1635 | +* A call to the |
| 1636 | +[Polling Last Operation for Service Bindings](#polling-last-operation-for-service-bindings) |
| 1637 | +endpoint returns `"state": "failed"` for an asynchronous binding request |
| 1638 | +* The Platform encounters an internal error creating a Service Instance or |
| 1639 | +Service Binding (for example, saving to the database fails). |
1632 | 1640 |
|
1633 | | -To mitigate orphan Service Instances and Service Bindings, the Platform SHOULD |
| 1641 | +To mitigate orphaned Service Instances and Service Bindings, the Platform SHOULD |
1634 | 1642 | attempt to delete resources it cannot be sure were successfully created, and |
1635 | 1643 | SHOULD keep trying to delete them until the Service Broker responds with a |
1636 | | -success. |
| 1644 | +success. Service Brokers MAY automatically delete any resources they believe to |
| 1645 | +be orphaned on their own. Note that the Platform MAY allow end users to |
| 1646 | +determine when orphan mitigation occurs, in order to allow end users to |
| 1647 | +investigate any failures. |
1637 | 1648 |
|
1638 | 1649 | Platforms SHOULD initiate orphan mitigation in the following scenarios: |
1639 | 1650 |
|
1640 | 1651 | | Status Code Of Service Broker Response | Platform Interpretation Of Response | Platform Initiates Orphan Mitigation? | |
1641 | 1652 | | --- | --- | --- | |
1642 | 1653 | | 200 | Success | No | |
1643 | 1654 | | 200 with malformed response | Failure | No | |
| 1655 | +| 200 with `"state": "failed"` (applicable to [Polling Last Operation for Service Instances](#polling-last-operation-for-service-instances) and [Polling Last Operation for Service Bindings](#polling-last-operation-for-service-bindings) endpoints) | Failure | Yes | |
1644 | 1656 | | 201 | Success | No | |
1645 | 1657 | | 201 with malformed response | Failure | Yes | |
1646 | 1658 | | All other 2xx | Failure | Yes | |
1647 | 1659 | | 408 | Client timeout failure (request not received at the server) | No | |
1648 | 1660 | | All other 4xx | Request rejected | No | |
1649 | 1661 | | 5xx | Service Broker error | Yes | |
1650 | 1662 | | Timeout | Failure | Yes | |
1651 | | - |
1652 | | -If the Platform encounters an internal error provisioning a Service Instance or |
1653 | | -Service Binding (for example, saving to the database fails), then it MUST at |
1654 | | -least send a single delete or unbind request to the Service Broker to prevent |
1655 | | -the creation of an orphan. |
|
0 commit comments