|
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 |
|
@@ -703,9 +703,9 @@ containing error code `"ConcurrencyError"` (see
|
703 | 703 | a helpful error message in the `description` field such as `"Another operation
|
704 | 704 | for this Service Instance is in progress."`.
|
705 | 705 |
|
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. |
| 706 | +This error response does not cause orphan mitigation to be initiated (see the |
| 707 | +[Orphan Mitigation](#orphan-mitigation) section). Therefore, Platforms receiving |
| 708 | +this error response SHOULD resend the request at a later time. |
709 | 709 |
|
710 | 710 | Brokers MAY choose to treat the creation of a Service Binding as a mutation of
|
711 | 711 | the corresponding Service Instance - it is an implementation choice. Doing so
|
@@ -779,11 +779,10 @@ For success responses, the following fields are defined:
|
779 | 779 | }
|
780 | 780 | ```
|
781 | 781 |
|
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. |
| 782 | +For asynchronous provision operations, if the response contains |
| 783 | +`"state": "failed"`, then the Platform MAY need to send a deprovision request to |
| 784 | +the Service Broker to prevent an orphan being created (see the |
| 785 | +[Orphan Mitigation](#orphan-mitigation) section). |
787 | 786 |
|
788 | 787 | ## Polling Last Operation for Service Bindings
|
789 | 788 |
|
@@ -857,9 +856,9 @@ For success responses, the following fields are defined:
|
857 | 856 | }
|
858 | 857 | ```
|
859 | 858 |
|
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. |
| 859 | +If the response contains `"state": "failed"`, then the Platform MAY need to send |
| 860 | +an unbind request to the Service Broker to prevent an orphan being created (see |
| 861 | +the [Orphan Mitigation](#orphan-mitigation) section). |
863 | 862 |
|
864 | 863 | ## Polling Interval and Duration
|
865 | 864 |
|
@@ -949,11 +948,10 @@ $ curl http://username:password@service-broker-url/v2/service_instances/:instanc
|
949 | 948 | | 409 Conflict | MUST be returned if a Service Instance with the same id already exists but with different attributes. |
|
950 | 949 | | 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 | 950 |
|
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. |
| 951 | +Responses with any other status code MUST be interpreted as a failure. If a |
| 952 | +failure occurs, then the Platform MAY need to send a deprovision request to the |
| 953 | +Service Broker to prevent an orphan being created (see |
| 954 | +[Orphan Mitigation](#orphan-mitigation)). |
957 | 955 |
|
958 | 956 | #### Body
|
959 | 957 |
|
@@ -1341,11 +1339,10 @@ $ curl http://username:password@service-broker-url/v2/service_instances/:instanc
|
1341 | 1339 | | 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 | 1340 | | 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 | 1341 |
|
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. |
| 1342 | +Responses with any other status code MUST be interpreted as a failure. If a |
| 1343 | +failure occurs, then the Platform MAY need to send an unbind request to the |
| 1344 | +Service Broker to prevent an orphan being created (see |
| 1345 | +[Orphan Mitigation](#orphan-mitigation)). |
1349 | 1346 |
|
1350 | 1347 | #### Body
|
1351 | 1348 |
|
@@ -1616,40 +1613,49 @@ For success responses, the following fields are defined:
|
1616 | 1613 | }
|
1617 | 1614 | ```
|
1618 | 1615 |
|
1619 |
| -## Orphans |
| 1616 | +## Orphan Mitigation |
1620 | 1617 |
|
1621 | 1618 | The Platform is the source of truth for Service Instances and Service Bindings.
|
1622 | 1619 | Service Brokers are expected to have successfully provisioned all of the Service
|
1623 | 1620 | Instances and Service Bindings that the Platform knows about, and none that it
|
1624 | 1621 | doesn't.
|
1625 | 1622 |
|
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. |
| 1623 | +Orphaned Service Instances and Service Bindings MAY be created by in any of the |
| 1624 | +following scenarios: |
| 1625 | +* The Service Broker does not return a response before a request from the |
| 1626 | +Platform times out (typically 60 seconds). The Service Broker might eventually |
| 1627 | +succeed in creating a resource, however the Platform MAY have already considered |
| 1628 | +the request a failure. |
| 1629 | +* A synchronous [Provisioning](#provisioning) request fails. |
| 1630 | +* A call to the |
| 1631 | +[Polling Last Operation for Service Instances](#polling-last-operation-for-service-instances) |
| 1632 | +endpoint returns `"state": "failed"` for an asynchronous provisioning request |
| 1633 | +* A synchronous [Binding](#binding]) request fails |
| 1634 | +* A call to the |
| 1635 | +[Polling Last Operation for Service Bindings](#polling-last-operation-for-service-bindings) |
| 1636 | +endpoint returns `"state": "failed"` for an asynchronous binding request |
| 1637 | +* The Platform encounters an internal error creating a Service Instance or |
| 1638 | +Service Binding (for example, saving to the database fails). |
1632 | 1639 |
|
1633 |
| -To mitigate orphan Service Instances and Service Bindings, the Platform SHOULD |
| 1640 | +To mitigate orphaned Service Instances and Service Bindings, the Platform SHOULD |
1634 | 1641 | attempt to delete resources it cannot be sure were successfully created, and
|
1635 | 1642 | SHOULD keep trying to delete them until the Service Broker responds with a
|
1636 |
| -success. |
| 1643 | +success. Service Brokers MAY automatically delete any resources they believe to |
| 1644 | +be orphaned on their own. Note that the Platform MAY allow end users to |
| 1645 | +determine when orphan mitigation occurs, in order to allow end users to |
| 1646 | +investigate any failures. |
1637 | 1647 |
|
1638 | 1648 | Platforms SHOULD initiate orphan mitigation in the following scenarios:
|
1639 | 1649 |
|
1640 | 1650 | | Status Code Of Service Broker Response | Platform Interpretation Of Response | Platform Initiates Orphan Mitigation? |
|
1641 | 1651 | | --- | --- | --- |
|
1642 | 1652 | | 200 | Success | No |
|
1643 | 1653 | | 200 with malformed response | Failure | No |
|
| 1654 | +| 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 | 1655 | | 201 | Success | No |
|
1645 | 1656 | | 201 with malformed response | Failure | Yes |
|
1646 | 1657 | | All other 2xx | Failure | Yes |
|
1647 | 1658 | | 408 | Client timeout failure (request not received at the server) | No |
|
1648 | 1659 | | All other 4xx | Request rejected | No |
|
1649 | 1660 | | 5xx | Service Broker error | Yes |
|
1650 | 1661 | | 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