Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1615227 - The clusterservicebroker "ansible-service-broker" should be deleted when uninstall the ASB
The clusterservicebroker "ansible-service-broker" should be deleted when unin...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Broker (Show other bugs)
3.11.0
Unspecified Unspecified
medium Severity medium
: ---
: 3.11.0
Assigned To: Jason Montleon
Jian Zhang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-08-13 01:30 EDT by Jian Zhang
Modified: 2018-10-11 03:25 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-10-11 03:24:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2652 None None None 2018-10-11 03:25 EDT

  None (edit)
Description Jian Zhang 2018-08-13 01:30:53 EDT
Description of problem:
After uninstall the ASB, the clusterservicebroker "ansible-service-broker" still exist.

Version-Release number of selected component (if applicable):
openshift-ansible master branch
The latest commit:
[jzhang@localhost openshift-ansible]$ git log
commit 7bd4429f71ae1b45f3ac7eba49d6f65c2e4bf831
Author: AOS Automation Release Team <aos-team-art@redhat.com>
Date:   Sun Aug 12 19:16:59 2018 -0400

    Automatic commit of package [openshift-ansible] release [3.11.0-0.14.0].
    
    Created by command:
    
    /usr/bin/tito tag --debug --accept-auto-changelog --keep-version --debug


How reproducible:
always

Steps to Reproduce:
1. Add the below variable in the inventory file:
ansible_service_broker_install=false
ansible_service_broker_remove=true
2. Run the ansible:
ansible-playbook -i qe-inventory-host-file playbooks/openshift-service-catalog/config.yml

Actual results:
The ansible run succeeds, but the clusterservicebroker "ansible-service-broker" still exist.
[root@qe-jiazha-round2master-etcd-1 ~]# oc get ns | grep ansible

[root@qe-jiazha-round2master-etcd-1 ~]# oc get clusterservicebroker
NAME                     CREATED AT
ansible-service-broker   2018-08-13T02:44:31Z


Expected results:
The clusterservicebroker "ansible-service-broker" should be deleted.


Additional info:

I double check this issue and did NOT find any task to remove the clusterservicebroker, here is the log:http://pastebin.test.redhat.com/630449
Comment 1 Jason Montleon 2018-08-14 15:35:14 EDT
There's a task to remove the clusterservicebroker:

https://github.com/openshift/openshift-ansible/blob/master/roles/ansible_service_broker/tasks/remove.yml#L110-L121

It looks like it is being skipped for some reason:
TASK [ansible_service_broker : shell] *****************************************************************************************************************************************************************************
Monday 13 August 2018  11:55:22 +0800 (0:00:06.349)       0:04:11.794 *********
ok: [host-8-246-132.host.centralci.eng.rdu2.redhat.com]
 
TASK [ansible_service_broker : remove broker object from the catalog] *********************************************************************************************************************************************
Monday 13 August 2018  11:55:24 +0800 (0:00:01.842)       0:04:13.636 *********
skipping: [host-8-246-132.host.centralci.eng.rdu2.redhat.com]

I ran the shell command my hand and it worked ok, so I'm not sure what's going wrong here.

Can you run the playbook with -vvv so we can see what's going wrong?
Comment 2 Jason Montleon 2018-08-14 15:47:56 EDT
The syntax in the conditional is incorrect.

https://github.com/openshift/openshift-ansible/pull/9593
Comment 3 Jian Zhang 2018-08-20 06:07:31 EDT
Change status to "ON_QA".
Comment 4 Jian Zhang 2018-08-20 06:10:14 EDT
I used the latest master branch and ansible 2.6 to test this issue.
TASK [ansible_service_broker : remove broker object from the catalog] *********************************************************************************************************************************************
Monday 20 August 2018  17:57:37 +0800 (0:00:02.971)       0:05:21.932 ********* 
changed: [qe-jiazha-round3master-etcd-1.0820-145.qe.rhcloud.com]
[root@qe-jiazha-round3master-etcd-1 ~]# oc get clusterservicebroker
NAME                      CREATED AT
abroker                   2018-08-20T08:57:36Z
template-service-broker   2018-08-20T09:58:54Z
ups-broker                2018-08-20T07:47:45Z

The ansible-service-broker can be deleted successfully, LGTM, verify it.
Comment 6 errata-xmlrpc 2018-10-11 03:24:38 EDT
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.