cloudfoundry / cloudfoundry/cloud_controller_ng

diagnostic message of failed `cf update-service-broker` is unfriendly

Open
#1,910 1 comment 0 reactions 0 assignees View on GitHub

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-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

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.