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

Azure Redis cache doesn't support updating service instance #181

Closed volpav closed 6 years ago

volpav commented 6 years ago

As per Open Service Broker API, you can implement PATCH /v2/service_instances/:instance_id to allow updating an existing service broker instance. This doesn't seem to be supported by Azure Redis service:

cf update-service [service-instance-name] -c '[parameters JSON]'
Updating service instance [service-instance-name] as [username]...
FAILED
Server error, status code: 504, error code: 10001, message: The request to the service broker timed out: [service-instance-url]

Looking at https://github.com/Azure/meta-azure-service-broker/blob/master/lib/services/azurerediscache/index.js, the Handlers.update is never defined.

The workaround is to delete existing service instance and provision a new one with the desired set of parameters.

When it comes to implementation details, looks like the same REST API endpoint on Azure Redis side can be leveraged for both "create" and "update" operations (former is already supported): https://docs.microsoft.com/en-us/rest/api/redis/redis/create

zhongyi-zhang commented 6 years ago

@volpav thanks for raising it. I'll implement the Update API to support updating service plan next week.

zhongyi-zhang commented 6 years ago

Fixed via #183.