Red Hat Bugzilla – Bug 1615227
The clusterservicebroker "ansible-service-broker" should be deleted when uninstall the ASB
Last modified: 2018-10-11 03:25:05 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
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?
The syntax in the conditional is incorrect. https://github.com/openshift/openshift-ansible/pull/9593
Change status to "ON_QA".
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.
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