Bug 1661841

Summary: Redeployment of metrics fail for OCP v3.10
Product: OpenShift Container Platform Reporter: Junqi Zhao <juzhao>
Component: HawkularAssignee: Jan Martiska <jmartisk>
Status: CLOSED ERRATA QA Contact: Junqi Zhao <juzhao>
Severity: high Docs Contact:
Priority: high    
Version: 3.10.0CC: agawand, aos-bugs, jmartisk, minden, rvargasp, sdodson, ssadhale, vrutkovs, vwalek
Target Milestone: ---Keywords: Reopened
Target Release: 3.10.zFlags: jmartisk: needinfo+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1653267 Environment:
Last Closed: 2019-02-20 10:11:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 1 Asmita 2018-12-24 11:12:18 UTC
Description of problem:
 
While redeploying metrics on existing cluster facing below issue:
 
 The installer fails on the task:

       [1] TASK [openshift_metrics : Applying /tmp/openshift-metrics-ansible-TvYTDY/templates/hawkular-rolebinding.yaml] 

       [2] TASK [openshift_metrics : Checking generation of Service hawkular-cassandra-nodes] 

 The errors is : 
      
       [1] The clusterrolebindings \"hawkular-view\" is invalid: subjects[0].namespace: Required value"  

Workaround  :

Once added this missing variable as following: 
- name: generate view role binding for the hawkular service account
  template:
    src: rolebinding.j2
    dest: "{{ mktemp.stdout }}/templates/hawkular-rolebinding.yaml"
  vars:
    obj_name: hawkular-view
    labels:
      metrics-infra: hawkular
    roleRef:
      name: view
    subjects:
    - kind: ServiceAccount
      name: hawkular
      namespace: "{{openshift_metrics_project}}"         ### Add this line
  changed_when: no

Then re-ran ansible-playbook -i <inventory> /usr/share/ansible/openshift-ansible/playbooks/openshift-metrics/config.yml  then it was successfully set up. 


How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:
Please include the entire output from the last TASK line through the end of output if an error is generated

Expected results:
Add below link in task .
- generate view role binding for the hawkular service account 
line:
namespace: "{{openshift_metrics_project}}"

Comment 3 Jan Martiska 2019-01-02 06:20:57 UTC
Pull request for 3.10 installer: https://github.com/openshift/openshift-ansible/pull/10921

Comment 18 Junqi Zhao 2019-01-29 03:46:20 UTC
Tested with 
# rpm -qa | grep openshift-ansible
openshift-ansible-playbooks-3.10.106-1.git.0.217c6b9.el7.noarch
openshift-ansible-roles-3.10.106-1.git.0.217c6b9.el7.noarch
openshift-ansible-3.10.106-1.git.0.217c6b9.el7.noarch
openshift-ansible-test-3.10.106-1.git.0.217c6b9.el7.noarch
openshift-ansible-docs-3.10.106-1.git.0.217c6b9.el7.noarch

There is not error when redeploy metrics

Comment 20 errata-xmlrpc 2019-02-20 10:11:10 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-2019:0328