Azure / meta-azure-service-broker

A service broker to manage multiple Azure services in Cloud Foundry
Apache License 2.0
39 stars 44 forks source link

Unbinding returns 410 instead of 500 for bindings which are not existed #191

Closed zhongyi-zhang closed 5 years ago

zhongyi-zhang commented 5 years ago

According to service broker API spec, the broker should return 410 (Gone) for bindings which are not existed. MASB currently returns 500.

The behavior is required for such a case: Unbinding timeout, CC supposes unbinding failed. But actually unbinding succeeded in MASB side. Then unbinding retries will fail forever.

Did an e2e test to validate the PR:

  1. Create a service and bind
  2. Manually delete the binding record in broker database
  3. Unbind successfully
  4. Did find 410 (Gone) with "cf logs meta-azure-service-broker --recent"
norshtein commented 5 years ago

LGTM

zhongyi-zhang commented 5 years ago

Thanks for the review!