Bug 1721597 - Template Service Broker does not clean up Cluster Scoped Resources
Summary: Template Service Broker does not clean up Cluster Scoped Resources
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Broker
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.1.z
Assignee: Shawn Hurley
QA Contact: Cuiping HUO
URL:
Whiteboard:
Depends On: 1721516
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-18 16:19 UTC by Shawn Hurley
Modified: 2019-10-16 18:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1721516
Environment:
Last Closed: 2019-10-16 18:07:59 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:3004 None None None 2019-10-16 18:08:08 UTC
Github openshift template-service-broker-operator pull 50 None None None 2019-09-19 21:20:10 UTC

Description Shawn Hurley 2019-06-18 16:19:53 UTC
+++ This bug was initially created as a clone of Bug #1721516 +++

Description of problem:
When the TemplateServiceBroker resource is deleted, cluster role bindings, cluster roles, and cluster service brokers are left behind by the template service broker operator.

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


How reproducible:
100%

Steps to Reproduce:
1. Create TSB resource
2. Delete TSB resource
3. Look at Cluster service brokers

Actual results:
cluster service broker still exists

Expected results:
cluster service broker should no longer exist after some time (service catalog needs to clean it up which takes a minute or two).

Additional info:

--- Additional comment from Shawn Hurley on 2019-06-18 16:18:09 UTC ---

PR: https://github.com/openshift/template-service-broker-operator/pull/49

Comment 3 Cuiping HUO 2019-09-30 02:48:37 UTC
Build not ready for testing, change status back to modified.

Comment 5 Cuiping HUO 2019-10-10 06:24:11 UTC
Verified.
cluster version: 4.1.0-0.nightly-2019-10-09-143458
ose-template-service-broker-operator:v4.1.18-201909270916
ose-template-service-broker:v4.1.18-201909270916


1. Create TSB resource
$ oc get templateservicebroker -n openshift-template-service-broker
NAME                      AGE
template-service-broker   4m45s

$ oc get templateservicebroker -n openshift-template-service-broker
NAME                      AGE
template-service-broker   19m

$ oc get clusterrole | grep template
openshift-template-service-broker-88gcz-admin                          27m
openshift-template-service-broker-88gcz-edit                           27m
openshift-template-service-broker-88gcz-view                           27m
openshifttemplateservicebrokeroperator.v4.1.18-20190927091r6bnw        27m
system:openshift:controller:template-instance-controller               4h54m
system:openshift:controller:template-instance-finalizer-controller     4h54m
system:openshift:controller:template-service-broker                    4h54m
system:openshift:templateservicebroker-client                          4h54m
template-service-broker-openshift-template-service-broker              19m
template-service-broker-openshift-template-service-broker-client       19m
templateservicebrokers.osb.openshift.io-v1-admin                       20m
templateservicebrokers.osb.openshift.io-v1-crdview                     20m
templateservicebrokers.osb.openshift.io-v1-edit                        20m
templateservicebrokers.osb.openshift.io-v1-view                        20m

$ oc get clusterrolebinding | grep template
openshifttemplateservicebrokeroperator.v4.1.18-20190927091xr5pc                   27m
system:openshift:controller:template-instance-controller                          4h54m
system:openshift:controller:template-instance-controller:admin                    4h54m
system:openshift:controller:template-instance-finalizer-controller                4h54m
system:openshift:controller:template-instance-finalizer-controller:admin          4h54m
system:openshift:controller:template-service-broker                               4h54m
template-service-broker-openshift-template-service-broker                         19m
template-service-broker-openshift-template-service-broker-client                  19m

2. Delete TSB resource
$ oc delete templateservicebroker template-service-broker -n openshift-template-service-broker
templateservicebroker.osb.openshift.io "template-service-broker" deleted
$ oc get templateservicebroker -n openshift-template-service-broker
No resources found.
$ oc get clusterrole | grep template
openshift-template-service-broker-88gcz-admin                          28m
openshift-template-service-broker-88gcz-edit                           28m
openshift-template-service-broker-88gcz-view                           28m
openshifttemplateservicebrokeroperator.v4.1.18-20190927091r6bnw        28m
system:openshift:controller:template-instance-controller               4h55m
system:openshift:controller:template-instance-finalizer-controller     4h55m
system:openshift:controller:template-service-broker                    4h55m
system:openshift:templateservicebroker-client                          4h55m
templateservicebrokers.osb.openshift.io-v1-admin                       21m
templateservicebrokers.osb.openshift.io-v1-crdview                     21m
templateservicebrokers.osb.openshift.io-v1-edit                        21m
templateservicebrokers.osb.openshift.io-v1-view                        21m

clusterrole 
"template-service-broker-openshift-template-service-broker" 
"template-service-broker-openshift-template-service-broker-client " 
are deleted.

$ oc get clusterrolebinding | grep template
openshifttemplateservicebrokeroperator.v4.1.18-20190927091xr5pc                   28m
system:openshift:controller:template-instance-controller                          4h55m
system:openshift:controller:template-instance-controller:admin                    4h55m
system:openshift:controller:template-instance-finalizer-controller                4h55m
system:openshift:controller:template-instance-finalizer-controller:admin          4h55m
system:openshift:controller:template-service-broker                               4h55m
clusterrolebinding  
"template-service-broker-openshift-template-service-broker"
"template-service-broker-openshift-template-service-broker-client"
are deleted.

Comment 7 errata-xmlrpc 2019-10-16 18:07:59 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/RHBA-2019:3004


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