kolla-ansible/ansible/roles/grafana
Doug Szumski 2854671018 Local connection to remote Grafana can fail
Following deployment of Grafana, a check is made to ensure that the
login page is accessible. If the Grafana container has been deployed
to a remote host, but is not directly accessible over the deployment
network then the check will fail because the task is set to run with
connection: local. For example, if Ansible is using a different
network to the network on which grafana is exposed to connect to the
remote host then the task may fail. A similar problem exists for the
remaining two tasks in the post_config file.

Further to this, if Grafana is not accessible, the ansible uri
module does not return a status field, so no retry attempts are made
and the task fails with an obscure message:

TASK [grafana : Wait for grafana application ready] *****************
fatal: [some_remote_node]: FAILED! => {"failed": true, "msg": "The
conditional check 'result.status == 200' failed. The error was: error
while evaluating conditional (result.status == 200): 'dict object' has
no attribute 'status'"}

$ ansible --version
ansible 2.3.2.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623
(Red Hat 4.8.5-16)]

Change-Id: I77e2129b4a1c5f2f0802fb92eb03395ff72cf5f3
Closes-Bug: #1742501
2018-01-11 09:38:02 +00:00
..
defaults Add Elasticsearch to Grafana 2017-07-25 09:18:12 +00:00
handlers Support customizing grafana home dashboard 2017-07-24 13:11:31 +08:00
meta Added grafana role 2016-09-14 09:36:34 +00:00
tasks Local connection to remote Grafana can fail 2018-01-11 09:38:02 +00:00
templates Support customizing grafana home dashboard 2017-07-24 13:11:31 +08:00