Bug 1415593

Summary: [IntService_public_295] Using ansible to un-install failed
Product: OpenShift Container Platform Reporter: Peng Li <penli>
Component: InstallerAssignee: Jeff Cantrill <jcantril>
Status: CLOSED ERRATA QA Contact: Peng Li <penli>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.5.0CC: aos-bugs, jcantril, jokerman, mmccomas, tdawson
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-12 18:49:08 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: 1418911    
Bug Blocks:    

Description Peng Li 2017-01-23 08:13:07 UTC
Description of problem:
Using ansible to uninstall metrics fail "'dict object' has no attribute 'files'"

Version-Release number of selected component (if applicable):
openshift v3.5.0.7+390ef18
metrics 3.5

How reproducible:
always

Steps to Reproduce:
1. install httpd-tools on master and install java on ansible control machine, have metircs deployed.

# oc get pod -n openshift-infra
NAME                         READY     STATUS    RESTARTS   AGE
hawkular-cassandra-1-lrzsm   1/1       Running   0          35m
hawkular-metrics-dzgz1       1/1       Running   0          35m
heapster-vqmzl               1/1       Running   0          35m

2. prepare inventory file, set openshift_metrics_install_metrics=false

[oo_first_master]
$MASTER ansible_user=root ansible_ssh_user=root ansible_ssh_private_key_file="$PEM" openshift_public_hostname=$MASTER

[oo_first_master:vars]
deployment_type=openshift-enterprise
openshift_release=v3.5.0
openshift_metrics_install_metrics=false

openshift_metrics_hawkular_hostname=hawkular-metrics.$SUBDOMAIN
openshift_metrics_image_prefix=registry.ops.openshift.com/openshift3/
openshift_metrics_image_version=3.5.0

3. checkout openshift-ansible(due to previous bug, I'm using dev's branch )
  #git clone https://github.com/jcantrill/openshift-ansible
  #git checkout bz_1414477_missing_import_jks_deuce

4. ansible-playbook -vvv -i ~/inventory   playbooks/common/openshift-cluster/openshift_metrics.yml

Actual results:
task abort
TASK [openshift_metrics : slurp] ***********************************************
task path: /root/openshift-ansible/roles/openshift_metrics/tasks/install_metrics.yaml:27
fatal: [                          ]: FAILED! => {
    "failed": true, 
    "msg": "'dict object' has no attribute 'files'"
}
	to retry, use: --limit @/root/openshift-ansible/playbooks/common/openshift-cluster/openshift_metrics.retry

PLAY RECAP *********************************************************************
$MASTER : ok=10   changed=0    unreachable=0    failed=1   


Expected results:
Task finish and Metrics is cleaned.

Additional info:
Ansible task log is attached.

Comment 3 Jeff Cantrill 2017-01-23 18:19:56 UTC
I expect PR https://github.com/openshift/openshift-ansible/pull/3150 to resolve this issue since 'install_metrics' will now conditionally be included.

Comment 4 Peng Li 2017-02-07 06:39:21 UTC
verified with master branch, run the playbook with no error, and all artefacts are cleaned.

Comment 6 errata-xmlrpc 2017-04-12 18:49:08 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-2017:0903