Bug 1500048 - APBs in the service broker need to have globally unique plan IDs
Summary: APBs in the service broker need to have globally unique plan IDs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Broker
Version: 3.7.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 3.7.0
Assignee: Jesus M. Rodriguez
QA Contact: Zhang Cheng
URL:
Whiteboard:
: 1500173 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-09 18:50 UTC by Dylan Murray
Modified: 2017-11-28 22:15 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The serviceplans were moved to top level. The broker was using the plan.name as the plan.id which was not a problem before because they were namespaced by the serviceclass. Consequence: serviceplans from different services were merging together or being skipped altogether. Fix: Now that the serviceplans are top level, the names need to be unique. Since we used to rely on the serviceclass name, the new id will be a UUID. Result: The serviceplans now use a UUID as their IDs which prevents the merging or skipping.
Clone Of:
Environment:
Last Closed: 2017-11-28 22:15:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3188 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-29 02:34:54 UTC

Description Dylan Murray 2017-10-09 18:50:10 UTC
Description of problem:
Right now the service-catalog errors out when trying to reconcile serviceplans on the ansibleplaybookbundle organization due to the fact that there are multiple plans labeled 'default'. We are assigning the planID as the plan name which conflicts since all of our APBs has a 'default' plan. 

Version-Release number of selected component (if applicable):
3.7.0

How reproducible:
100%

Steps to Reproduce:
1. Bring up the latest service catalog images with APBs in ansibleplaybookbundle as of 10/7


Actual results:
The following error in the controller manager pod:

I1009 18:17:31.270156      22 controller_broker.go:572] Found existing servicePlan "default"; updating
E1009 18:17:31.272688      22 controller_broker.go:590] Error updating ServicePlan "default": Operation cannot be fulfilled on serviceplans "default": the object has been modified; please apply your changes to the latest version and try again
W1009 18:17:31.272712      22 controller_broker.go:337] Error reconciling servicePlan "default" (broker "ansible-service-broker"): Operation cannot be fulfilled on serviceplans "default": the object has been modified; please apply your changes to the latest version and try again
I1009 18:17:31.272743      22 controller_broker.go:640] Updating ready condition for ServiceBroker ansible-service-broker to False
I1009 18:17:31.272816      22 event.go:218] Event(v1.ObjectReference{Kind:"ServiceBroker", Namespace:"", Name:"ansible-service-broker", UID:"3fc6e1ff-ad1c-11e7-8591-0242ac110002", APIVersion:"servicecatalog.k8s.io", ResourceVersion:"105", FieldPath:""}): type: 'Warning' reason: 'ErrorSyncingCatalog' Error reconciling servicePlan "default" (broker "ansible-service-broker"): Operation cannot be fulfilled on serviceplans "default": the object has been modified; please apply your changes to the latest version and try again
I1009 18:17:31.283227      22 controller_broker.go:645] Updated ready condition for ServiceBroker "ansible-service-broker" to False
I1009 18:17:31.283245      22 controller.go:232] Error syncing ServiceBroker ansible-service-broker: Operation cannot be fulfilled on serviceplans "default": the object has been modified; please apply your changes to the latest version and try again

Expected results:
All APBs are available and listed

Additional info:
We simply need to be setting planID to something globally unique

Comment 1 Jesus M. Rodriguez 2017-10-10 01:23:02 UTC
https://github.com/openshift/ansible-service-broker/pull/480

Comment 2 Jesus M. Rodriguez 2017-10-10 01:27:52 UTC
$ oc get serviceplans
NAME                                   KIND
a78ed2af-ad55-11e7-9447-c85b76145add   ServicePlan.v1alpha1.servicecatalog.k8s.io
a79ac311-ad55-11e7-9447-c85b76145add   ServicePlan.v1alpha1.servicecatalog.k8s.io
a7a77477-ad55-11e7-9447-c85b76145add   ServicePlan.v1alpha1.servicecatalog.k8s.io
a7abbd8d-ad55-11e7-9447-c85b76145add   ServicePlan.v1alpha1.servicecatalog.k8s.io
dh-etherpad-apb-default                ServicePlan.v1alpha1.servicecatalog.k8s.io
dh-hastebin-apb-default                ServicePlan.v1alpha1.servicecatalog.k8s.io
dh-hello-world-apb-default             ServicePlan.v1alpha1.servicecatalog.k8s.io
dh-hello-world-db-apb-default          ServicePlan.v1alpha1.servicecatalog.k8s.io
dh-jenkins-apb-default                 ServicePlan.v1alpha1.servicecatalog.k8s.io
dh-mediawiki123-apb-default            ServicePlan.v1alpha1.servicecatalog.k8s.io
dh-pyzip-demo-apb-default              ServicePlan.v1alpha1.servicecatalog.k8s.io
dh-pyzip-demo-db-apb-default           ServicePlan.v1alpha1.servicecatalog.k8s.io
dh-rhscl-mariadb-apb-dev               ServicePlan.v1alpha1.servicecatalog.k8s.io
dh-rhscl-mariadb-apb-prod              ServicePlan.v1alpha1.servicecatalog.k8s.io
dh-rhscl-postgresql-apb-dev            ServicePlan.v1alpha1.servicecatalog.k8s.io
dh-rhscl-postgresql-apb-prod           ServicePlan.v1alpha1.servicecatalog.k8s.io
dh-rocketchat-apb-default              ServicePlan.v1alpha1.servicecatalog.k8s.io
dh-thelounge-apb-default               ServicePlan.v1alpha1.servicecatalog.k8s.io
dh-wordpress-ha-apb-default            ServicePlan.v1alpha1.servicecatalog.k8s.io

Comment 3 John Matthews 2017-10-16 21:21:14 UTC
*** Bug 1500173 has been marked as a duplicate of this bug. ***

Comment 8 errata-xmlrpc 2017-11-28 22:15:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:3188


Note You need to log in before you can comment on or make changes to this bug.