bfraser / puppet-grafana

Puppet module to manage Grafana
Apache License 2.0
39 stars 204 forks source link

`grafana_datasource` does not retry HTTP requests #95

Open gdhbashton opened 8 years ago

gdhbashton commented 8 years ago

From a blank machine (CentOS 7) everything provisions OK until datasources:

Notice: /Stage[main]/Grafana::Service/Service[grafana-server]/ensure: ensure changed 'stopped' to 'running'
Info: /Stage[main]/Grafana::Service/Service[grafana-server]: Unscheduling refresh on Service[grafana-server]
Error: /Stage[main]/Profile_grafana/Grafana_datasource[elasticsearch]: Could not evaluate: Network is unreachable - connect(2)
Error: /Stage[main]/Profile_grafana/Grafana_datasource[graphite]: Could not evaluate: Network is unreachable - connect(2)

There's not enough time for the service to actually be ready to accept connections. Executing the same 'Puppet run' again succeeds as expected. The send_request would ideally have some 'try once per second for five seconds' logic to make it more robust.