cloud_controller_ng
cloud_controller_ng copied to clipboard
diagnostic message of failed `cf update-service-broker` is unfriendly
Issue
diagnostic message of failed cf update-service-broker
is unfriendly in the following scenario
- given a service broker has registered a service with name
overview-service
and guid G1 - given an existing service instance for service
overview-service
- given a broker updates changes response from its v2/catalog to return a service with name
overview-service
and guid G2 - when admin executes
cf update-service-broker
- then the admin sees
Server error, status code: 502, error code: 270012, message: Service broker catalog is invalid:
Service names must be unique within a broker. Services with names ["overview-service"] already exist
The message is unfriendly in the sense that:
- the catalog per se is valid
- however, given existing provisionned service instances, the service offering with guid G1 can not be unloaded and thus conflicts with offering with guid G2
Context
As a CF admin
- in order to be productive with CF API
- I need helpful friendly diagnostic messages on errors
Steps to Reproduce
- deploy broker from https://github.com/cloudfoundry/overview-broker
- register the broker and enable its service plan
- provision a service instance
cf create-service overview-service small
- restart the broker, this results into catalog to be regenerated with different guid, see https://github.com/cloudfoundry/overview-broker/issues/71
-
cf update-service-broker
Expected result
Server error, status code: 502, error code: 270012, message: Service broker catalog can not be updated:
Service names must be unique within a broker. Service with name "overview-service" and guid "a49cb559-5539-447b-9fdd-bdaa3970606d" already exists with guid "cf40e289-d0ac-4f80-a82c-36dbad79ede1" and can not be unloaded as there are existing service instances attached.
Current result
Server error, status code: 502, error code: 270012, message: Service broker catalog is invalid:
Service names must be unique within a broker. Services with names ["overview-service"] already exist
We have created an issue in Pivotal Tracker to manage this:
https://www.pivotaltracker.com/story/show/175305036
The labels on this github issue will be updated when the story is started.