Bug 1568815

Summary: Service Catalog does not refresh ClusterServicePlan after removing from catalog
Product: OpenShift Container Platform Reporter: Zhang Cheng <chezhang>
Component: Service CatalogAssignee: Jay Boyd <jaboyd>
Status: CLOSED CURRENTRELEASE QA Contact: Zhang Cheng <chezhang>
Severity: high Docs Contact:
Priority: high    
Version: 3.9.0CC: jaboyd, jiazha, smunilla, wsun, zhsun, zitang
Target Milestone: ---   
Target Release: 3.9.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ose-service-catalog:v3.9.21-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-18 18:18:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Zhang Cheng 2018-04-18 09:38:58 UTC
Description of problem: 
Service Catalog does not refresh ClusterServicePlan after removing from catalog
This bug have been fixed in 3.9.10
Relate bug: https://bugzilla.redhat.com/show_bug.cgi?id=1548122#c20
Relate fix: https://github.com/openshift/origin/pull/19105 (need to merge to 3.9.z)


service-catalog & asb image using images from brew registry:
ose-service-catalog:v3.9.20-1
# service-catalog --version
v0.1.9


How reproducible:
Always


Steps to Reproduce:
I had to modify the Automation Broker to randomly fail so that it would remove some Service specs from the /v2/catalog response.

Steps to Reproduce:
1. Have a test broker return say 4 service class specs from the /v2/catalog endpoint
2. Verify that the Service Catalog has 4 ClusterServiceClasses
3. Provision 1 of the Service Classes
4. Have the test broker return 3 service class specs from the /v2/catalog, the one that is missing MUST BE the one provisioned in step 3.
5. Have the Service Catalog relist with the test broker
6. Verify that the Provisioned Service Class reference is marked with:
   removedFromBrokerCatalog: true

7. Now, have the test broker return all 4 service class specs from the /v2/catalog again.
8. Have the Service Catalog relist with the test broker
9. Verify that the flag for the provisioned Service Class / Service Plan ref again

Actual results:
9. The removedFromBrokerCatalog: flag in ClusterServiceClass can be back to "false", but ClusterServicePlan remains "true" forever.

Expected results:
9. The removedFromBrokerCatalog: flag both in ClusterServiceClass and ClusterServicePlan should flip back to false once the service back.


Addition info: 
We hit this issue in 3.9.z testing again, and it is blocking service catalog HA support.

Comment 1 Jay Boyd 2018-04-19 19:46:42 UTC
This is fixed in 3.9.z.  This is the PR:  https://github.com/openshift/ose/pull/1200

You need at least ose-service-catalog:v3.9.21-1 - - off by one release for what you tested in.

Comment 2 Zhang Cheng 2018-04-20 03:30:24 UTC
Verified with ose-service-catalog:v3.9.21-1

Test steps follow description of this bug, and traced by TC: https://polarion.engineering.redhat.com/polarion/#/project/OSE/workitem?id=OCP-15607