cloudfoundry / cloudfoundry/cloud_controller_ng
diagnostic message of failed `cf update-service-broker` is unfriendly
Open
Nobody has claimed this yet.
sapi
unscheduled
- Dominant language
- Ruby
- Stars
- 207
- Forks
- 373
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 56
Description
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-serviceand 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-serviceand 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the cf update-service-broker flow and its v2/catalog handling, then trace where error code 270012 turns the duplicate-name conflict into the current diagnostic. Reproduce the overview-broker sequence and make the failure report the catalog update, both service GUIDs, and the existing service-instance constraint as shown in the expected result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100