Bug 1546936

Summary: Setting up of prometheus using ansible fails
Product: OpenShift Container Platform Reporter: krishnaram Karthick <kramdoss>
Component: HawkularAssignee: Paul Gier <pgier>
Status: CLOSED ERRATA QA Contact: Junqi Zhao <juzhao>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.9.0CC: aos-bugs, hchiramm, kramdoss, wmeng
Target Milestone: ---   
Target Release: 3.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-27 18:01:32 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:
Attachments:
Description Flags
hosts inventory file none

Description krishnaram Karthick 2018-02-20 05:35:10 UTC
Description of problem:
Prometheus configuration via ansible fails with an error. 

Version-Release number of selected component (if applicable):
oc version
oc v3.9.0-0.45.0
kubernetes v1.9.1+a0ce1bc657
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://10.70.47.177:8443
openshift v3.9.0-0.45.0
kubernetes v1.9.1+a0ce1bc657

rpm -qa | grep 'ansible'
ansible-2.4.2.0-2.el7.noarch
openshift-ansible-3.9.0-0.45.0.git.0.05f6826.el7.noarch
openshift-ansible-docs-3.9.0-0.45.0.git.0.05f6826.el7.noarch
openshift-ansible-playbooks-3.9.0-0.45.0.git.0.05f6826.el7.noarch
openshift-ansible-roles-3.9.0-0.45.0.git.0.05f6826.el7.noarch


How reproducible:
Always

Steps to Reproduce:
1. Prepare hosts file and try to configure prometheus using - 'ansible-playbook -vvv -i <inventory> /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/roles/openshift_prometheus/tasks/install_prometheus.yaml'


Actual results:
[root@dhcp47-177 ~]# ansible-playbook -vvv -i /root/.config/openshift/hosts /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/roles/openshift_prometheus/tasks/install_prometheus.yaml 
ansible-playbook 2.4.2.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 2.7.5 (default, May  3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]
Using /etc/ansible/ansible.cfg as config file
Parsed /root/.config/openshift/hosts inventory source with ini plugin
ERROR! 'include_tasks' is not a valid attribute for a Play

The error appears to have been in '/usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/roles/openshift_prometheus/tasks/install_prometheus.yaml': line 3, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

# set facts
- include_tasks: facts.yaml
  ^ here

Expected results:
Installation should proceed or readme has to be updated on which playbook should be used to configure prometheus.

Additional info:

Comment 1 krishnaram Karthick 2018-02-20 05:36:40 UTC
Created attachment 1398094 [details]
hosts inventory file

Comment 2 Paul Gier 2018-02-22 01:21:06 UTC
The prometheus playbook is now in ~/openshift-ansible/playbooks/openshift-prometheus/config.yml
The origin docs point to this location: https://docs.openshift.org/latest/install_config/install/advanced_install.html#running-the-advanced-installation-individual-components

I guess the appropriate doc just hasn't been updated yet, which readme are you looking at?

Comment 3 Paul Gier 2018-02-23 20:45:48 UTC
Setting severity to low since I believe this is just a doc issue.

Comment 4 krishnaram Karthick 2018-02-24 07:28:33 UTC
(In reply to Paul Gier from comment #2)
> The prometheus playbook is now in
> ~/openshift-ansible/playbooks/openshift-prometheus/config.yml
> The origin docs point to this location:
> https://docs.openshift.org/latest/install_config/install/advanced_install.
> html#running-the-advanced-installation-individual-components
>

I was able to setup prometheus using the playbook available here --> ~/openshift-ansible/playbooks/openshift-prometheus/config.yml
 
> I guess the appropriate doc just hasn't been updated yet, which readme are
> you looking at?

I was looking at the readme here --> /root/.config/openshift/hosts /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/roles/openshift_prometheus/

Comment 5 Paul Gier 2018-03-06 17:50:05 UTC
Moving to QA to verify that the readme is updated for 3.9.

Comment 6 Junqi Zhao 2018-03-07 01:26:45 UTC
Documentation is updated, pPometheus Install uses the correct playbook in [1] now, 
~/openshift-ansible/playbooks/openshift-prometheus/config.yml

[1] https://docs.openshift.org/latest/install_config/install/advanced_install.html#running-the-advanced-installation-individual-components

Comment 8 errata-xmlrpc 2018-06-27 18:01:32 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/RHSA-2018:2013