Closed sujitdmello closed 4 years ago
Seems to be related to re-using the same instanceid. This is a bit of a gray area in the spec (see https://github.com/openservicebrokerapi/servicebroker/blob/v2.15/spec.md#provisioning) Caller is responsible for creating a globally unique id and the broker must return a 409 if the instanceid references an existing instance. Nothing said about re-use of an instanceid after a service is destroyed.
Is this uniqueness to allow you to track it later?
Deprovisioning spec says that "When a Service Broker receives a deprovision request from a Platform, it MUST delete any resources it created during the provision. Usually this means that all resources are immediately reclaimed for future provisions."
That makes it sound like you could re-provision things that were deprovisioned
The only "resource" left is a row in the internal database that has captured the successful deprovision.
| tf:ebmysql1: | 2020-02-11 11:08:50 | deprovision | succeeded |
Could update broker to delete that row and re-provisioning with the recycled instanceid would work. No platform is ever going to do this though.
Discussed with Ernie and considering that non-humans will be providing the instance-id, will keep the logic as intended. instance-id should be historically unique so that it can be later tracked. Ernie will look into fixing the error condition and returning a 409 instead.
Running cloud-service-broker serve on my Windows PC using Windows Subsystem for Linux
Provision a new Azure MySQL database instance using the cloud-service-broker client (successfully created in Azure)
Deprovision the above instance (successfully deletes it from Azure)
Provision a new MySQL database instance Expecting a new instance to be created in Azure but instead throws this error on the client:
Server shows this error:
Manually delete the entries from the _terraformdeployments table in the servicebroker database using mysql CLI.
Provision a new MySQL database instance (successfully created in Azure)