Bug 1523294

Summary: ansible_service_broker_remove=true fails ansible install on subsequent runs
Product: OpenShift Container Platform Reporter: Perry Minchew <pminchew>
Component: InstallerAssignee: Scott Dodson <sdodson>
Status: CLOSED WONTFIX QA Contact: Johnny Liu <jialiu>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.7.0CC: aos-bugs, chezhang, fabian, jiazha, jmatthew, jokerman, mmccomas, zhsun
Target Milestone: ---   
Target Release: 3.11.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-02 18:32:53 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:
Bug Depends On:    
Bug Blocks: 1561485    

Description Perry Minchew 2017-12-07 16:36:47 UTC
Description of problem:
Setting ansible_service_broker_remove=true fails an installation if the service broker does not exist. 

Version-Release number of selected component (if applicable):
oc 3.7.9
ansible 2.4.1.0

How reproducible:
Run the ansible config playbook with setting ansible_service_broker_remove=true successfully uninstalls the service broker if it is installed, but will fail subsequent ansible runs if the option is not removed

Steps to Reproduce:
1. Ensure ansible_service_broker_remove=false is set
2. Ensure the service broker is not currently installed
3. Run the config playbook

Actual results:
TASK [ansible_service_broker : remove ansible-service-broker service] ********************************************************************************************************************************
fatal: [master2.b365.internal]: FAILED! => {"changed": false, "failed": true, "msg": {"cmd": "/bin/oc get service asb -o json -n openshift-ansible-service-broker", "results": [{}], "returncode": 1, "stderr": "Error from server (NotFound): namespaces \"openshift-ansible-service-broker\" not found\n", "stdout": ""}}
	to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/byo/config.retry

Expected results:
Potentially display warning flag to remove flag rather than fail the update

Additional info:

Comment 1 Fabian von Feilitzsch 2018-02-16 22:42:50 UTC
https://github.com/openshift/openshift-ansible/pull/7193

Comment 2 Zhang Cheng 2018-02-27 05:55:27 UTC
@Fabian,

Could you help to add "Target Release"? Thanks.

Comment 3 Scott Dodson 2018-05-02 18:32:53 UTC
workaround, unset ansible_service_broker_remove and set ansible_service_broker_install=false after uninstalling and this should ensure that subsequent playbook runs do not re-install ASB which I believe is the ultimate intent here.