Closed gberche-orange closed 3 years ago
We have created an issue in Pivotal Tracker to manage this:
https://www.pivotaltracker.com/story/show/175305440
The labels on this github issue will be updated when the story is started.
@gberche-orange, I have managed to re-create this using the instructions above using both V2 and V3 endpoints. The subtlety is to update the service name and ID, but not to change the plan name or ID.
This what OSBAPI says about the plan ID:
An identifier used to correlate this Service Plan in future requests to the Service Broker. This MUST be globally unique such that Platforms (and their users) MUST be able to assume that seeing the same value (no matter what Service Broker uses it) will always refer to this Service Plan and for the same Service Offering. MUST be a non-empty string. Using a GUID is RECOMMENDED.
Also see https://github.com/openservicebrokerapi/servicebroker/issues/306 for a discussion about the plan ID being globally unique.
Because a plan ID is globally unique, it is an error to change a service ID without changing the plan ID (because the same plan ID value will always refer to this Service Plan and for the same Service Offering). But how should a platform handle this error?
I'm thinking that catalog validation should fail in a way that's analogous to having a duplicate plan ID. Something like plan ID abc... is already used by another service
. What are your thoughts?
thanks @blgm for looking into this issue !
Because a plan ID is globally unique, it is an error to change a service ID without changing the plan ID (because the same plan ID value will always refer to this Service Plan and for the same Service Offering). But how should a platform handle this error?
I'm thinking that catalog validation should fail in a way that's analogous to having a duplicate plan ID. Something like plan ID abc... is already used by another service. What are your thoughts?
+1 for failing the service catalog in this case.
I think it would be useful to hint the service broker operator/author with a more specific message
Unable to register service name=[service_name] with guid=[service_guid] has its plan name=[plan_name] guid=[plan_guid] is already used by service name=[existing_service_name] with guid=[existing_service_guid] offered by broker name=[broker_name]
The service broker catalog was not loaded. Please consider fixing the service broker catalog, or deleting the service broker with the conflicting planid
The fix for this issue was released in capi-release 1.105. Thank you for raising this issue!
Great thanks @blgm and @elenasharma !
Issue
a service broker that is evolving its catalog by removing some service offerings (but not service plans) never gets its old service offerings removed from CC
diagnostic message of failed
cf update-service-broker
is unfriendly in the following scenariooverview-service
and guid G1, and plan small with guid S1overview-service
overview-service-2
and guid G2, and plan small with guid S1cf update-service-broker
overview-service
andoverview-service-2
Context
As a CF admin
Steps to Reproduce
cf create-service overview-service small gberche
cf update-service-broker
Expected result
This would be similar to https://github.com/cloudfoundry/cloud_controller_ng/blob/17402a48fe38e2f0f8cc36a316e60427fc79f0f1/lib/services/service_brokers/service_manager.rb#L175-L181
Current result