Bug 1615278 - [asb] openshift-ansible not delete crd and clusterrole when uninstallation
Summary: [asb] openshift-ansible not delete crd and clusterrole when uninstallation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Broker
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.11.0
Assignee: Jason Montleon
QA Contact: Zihan Tang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-13 08:49 UTC by Zihan Tang
Modified: 2018-10-11 07:25 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-11 07:24:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2652 0 None None None 2018-10-11 07:25:07 UTC

Description Zihan Tang 2018-08-13 08:49:38 UTC
Description of problem:
when uninstall asb by openshift-ansible, it not delete asb related crd resource ,and clusterrole

Version-Release number of selected component (if applicable):
openshift-ansible-3.11.0-0.14.0

How reproducible:
always

Steps to Reproduce:
1.using openshift-ansible to uninstall asb , setting param with:
ansible_service_broker_install=false
ansible_service_broker_remove=true
2.
3.

Actual results:
1. the job succeed. but crd and cluterrole still exit.
[root@qe-zitang-r2-1-master-etcd-1 ~]# oc get crd
NAME                                          CREATED AT
bundlebindings.automationbroker.io            2018-08-13T08:33:08Z
bundleinstances.automationbroker.io           2018-08-13T08:33:10Z
bundles.automationbroker.io                   2018-08-13T08:33:11Z
catalogsources.operators.coreos.com           2018-08-13T02:24:30Z
clusterserviceversions.operators.coreos.com   2018-08-13T02:24:29Z
installplans.operators.coreos.com             2018-08-13T02:24:31Z
subscriptions.operators.coreos.com            2018-08-13T02:24:32Z
[root@qe-zitang-r2-1-master-etcd-1 ~]# oc get clusterrole | grep asb
asb-access
asb-auth
asb-user-access

Expected results:
delete these resouce successfull after uninstallation.

Additional info:
openshift-ansible log:

TASK [ansible_service_broker : include_tasks] **********************************
Monday 13 August 2018  08:32:39 +0000 (0:00:00.083)       0:02:19.666 ********* 
included: /usr/share/ansible/openshift-ansible/roles/ansible_service_broker/tasks/remove.yml for host-8-248-212.host.centralci.eng.rdu2.redhat.com

TASK [ansible_service_broker : Unbind admin cluster-role to asb serviceaccount] ***
Monday 13 August 2018  08:32:39 +0000 (0:00:00.167)       0:02:19.834 ********* 
changed: [host-8-248-212.host.centralci.eng.rdu2.redhat.com]

TASK [ansible_service_broker : Unbind auth cluster role to asb service account] ***
Monday 13 August 2018  08:32:41 +0000 (0:00:02.084)       0:02:21.918 ********* 
changed: [host-8-248-212.host.centralci.eng.rdu2.redhat.com]

TASK [ansible_service_broker : Unbind asb-access role to asb-client service account] ***
Monday 13 August 2018  08:32:43 +0000 (0:00:01.650)       0:02:23.569 ********* 
changed: [host-8-248-212.host.centralci.eng.rdu2.redhat.com]

TASK [ansible_service_broker : remove ansible-service-broker serviceaccount] ***
Monday 13 August 2018  08:32:44 +0000 (0:00:01.450)       0:02:25.019 ********* 
changed: [host-8-248-212.host.centralci.eng.rdu2.redhat.com]

TASK [ansible_service_broker : remove ansible-service-broker client serviceaccount] ***
Monday 13 August 2018  08:32:46 +0000 (0:00:01.443)       0:02:26.463 ********* 
changed: [host-8-248-212.host.centralci.eng.rdu2.redhat.com]

TASK [ansible_service_broker : remove asb-auth cluster role] *******************
Monday 13 August 2018  08:32:47 +0000 (0:00:01.535)       0:02:27.998 ********* 
changed: [host-8-248-212.host.centralci.eng.rdu2.redhat.com]

TASK [ansible_service_broker : remove asb-access cluster role] *****************
Monday 13 August 2018  08:32:50 +0000 (0:00:02.085)       0:02:30.083 ********* 
changed: [host-8-248-212.host.centralci.eng.rdu2.redhat.com]

TASK [ansible_service_broker : remove asb-registry auth secret] ****************
Monday 13 August 2018  08:32:51 +0000 (0:00:01.589)       0:02:31.673 ********* 
changed: [host-8-248-212.host.centralci.eng.rdu2.redhat.com]

TASK [ansible_service_broker : remove asb-client token secret] *****************
Monday 13 August 2018  08:32:53 +0000 (0:00:01.524)       0:02:33.197 ********* 
ok: [host-8-248-212.host.centralci.eng.rdu2.redhat.com]

TASK [ansible_service_broker : remove ansible-service-broker service] **********
Monday 13 August 2018  08:32:54 +0000 (0:00:01.421)       0:02:34.619 ********* 
changed: [host-8-248-212.host.centralci.eng.rdu2.redhat.com]

TASK [ansible_service_broker : remove route for ansible-service-broker service] ***
Monday 13 August 2018  08:32:56 +0000 (0:00:01.557)       0:02:36.177 ********* 
changed: [host-8-248-212.host.centralci.eng.rdu2.redhat.com]

TASK [ansible_service_broker : remove route for dashboard-redirector service] ***
Monday 13 August 2018  08:32:57 +0000 (0:00:01.773)       0:02:37.950 ********* 
skipping: [host-8-248-212.host.centralci.eng.rdu2.redhat.com]

TASK [ansible_service_broker : remove Ansible Service Broker deployment config] ***
Monday 13 August 2018  08:32:58 +0000 (0:00:00.096)       0:02:38.047 ********* 
changed: [host-8-248-212.host.centralci.eng.rdu2.redhat.com]

TASK [ansible_service_broker : remove secret for broker auth] ******************
Monday 13 August 2018  08:32:59 +0000 (0:00:01.754)       0:02:39.801 ********* 
ok: [host-8-248-212.host.centralci.eng.rdu2.redhat.com]

TASK [ansible_service_broker : remove config map for ansible-service-broker] ***
Monday 13 August 2018  08:33:00 +0000 (0:00:01.126)       0:02:40.928 ********* 
changed: [host-8-248-212.host.centralci.eng.rdu2.redhat.com]

TASK [ansible_service_broker : remove custom resource definitions for asb] *****
Monday 13 August 2018  08:33:02 +0000 (0:00:01.518)       0:02:42.447 ********* 
changed: [host-8-248-212.host.centralci.eng.rdu2.redhat.com] => (item=/usr/share/ansible/openshift-ansible/roles/ansible_service_broker/files/bundlebindings.automationbroker.io.yaml)
changed: [host-8-248-212.host.centralci.eng.rdu2.redhat.com] => (item=/usr/share/ansible/openshift-ansible/roles/ansible_service_broker/files/bundleinstances.automationbroker.io.yaml)
changed: [host-8-248-212.host.centralci.eng.rdu2.redhat.com] => (item=/usr/share/ansible/openshift-ansible/roles/ansible_service_broker/files/bundles.automationbroker.io.yaml)

TASK [ansible_service_broker : shell] ******************************************
Monday 13 August 2018  08:33:06 +0000 (0:00:03.616)       0:02:46.063 ********* 
ok: [host-8-248-212.host.centralci.eng.rdu2.redhat.com]

TASK [ansible_service_broker : remove broker object from the catalog] **********
Monday 13 August 2018  08:33:07 +0000 (0:00:01.353)       0:02:47.417 ********* 
skipping: [host-8-248-212.host.centralci.eng.rdu2.redhat.com]

TASK [ansible_service_broker : remove openshift-ansible-service-broker project] ***
Monday 13 August 2018  08:33:07 +0000 (0:00:00.084)       0:02:47.501 ********* 
changed: [host-8-248-212.host.centralci.eng.rdu2.redhat.com]

Comment 1 Jason Montleon 2018-08-14 20:16:09 UTC
The only one of these I could reproduce is:
asb-user-access

We don't have a task to delete this (we should, that's easy to fix if we can get to the bottom of the rest).

Can you retry with the latest openshift-ansible and with -vvvvv so we can see what's going on in more detail if it fails?

Comment 2 Zihan Tang 2018-08-15 10:10:06 UTC
I use openshift-ansible-3.11.0-0.14.0 re-run uninstallation, the result is the same with you.
crd is deleted, asb-user-access not delete.

Comment 4 Zihan Tang 2018-08-29 09:12:16 UTC
verified.
clusterrole asb-user-access is deleted.

Comment 6 errata-xmlrpc 2018-10-11 07:24:39 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-2018:2652


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