Bug 1546936 - Setting up of prometheus using ansible fails
Summary: Setting up of prometheus using ansible fails
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Hawkular
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.9.0
Assignee: Paul Gier
QA Contact: Junqi Zhao
Depends On:
TreeView+ depends on / blocked
Reported: 2018-02-20 05:35 UTC by krishnaram Karthick
Modified: 2018-06-27 18:02 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Last Closed: 2018-06-27 18:01:32 UTC
Target Upstream Version:

Attachments (Terms of Use)
hosts inventory file (3.99 KB, text/plain)
2018-02-20 05:36 UTC, krishnaram Karthick
no flags Details

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:2013 None None None 2018-06-27 18:02:05 UTC

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

openshift v3.9.0-0.45.0
kubernetes v1.9.1+a0ce1bc657

rpm -qa | grep 'ansible'

How reproducible:

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 
  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, 

[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.


Note You need to log in before you can comment on or make changes to this bug.