Fix tasks dependency when using remote backends

Previously the LMA collector had an explicit dependency on the last
Elasticsearch and InfluxDB tasks but this doesn't work when the
Elasticsearch/Kibana and InfluxDB-Grafana plugins aren't deployed in the same
environment as the collector plugin.

This change makes sure that the LMA collector plugin's tasks will only be
executed once the backends are fully functional by pinning all plugins to a
well-known task (update_hosts in that case).

Change-Id: I87a9067c5ace7acf3d676c7ad72d0b6632bf1869
Closes-Bug: #1573087
Depends-On: I830f024e0d1629ae10a8a504c4acbddf23d5c47e
Depends-On: I5bbc444eb51da4787b5be5cbe3aa0284ce6e1753
This commit is contained in:
Simon Pasquier 2016-05-09 16:42:51 +02:00
parent beba328c88
commit d1694ba4e7
1 changed files with 5 additions and 5 deletions

View File

@ -25,7 +25,10 @@
- id: lma-configure-apt
type: puppet
version: 2.0.0
requires: [post_deployment_start]
# We use update_hosts as an anchor to order the post-deployment tasks executed
# by this plugin and the InfluxDB & Elasticsearch plugins. The dependency chain is:
# Other plugins tasks -> update_hosts -> (LMA collector tasks)
requires: [post_deployment_start, update_hosts]
required_for: [post_deployment_end]
role: '*'
parameters:
@ -120,13 +123,10 @@
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 600
# The influxdb-configuration task is declared by the influxdb-grafana plugin.
# The elasticsearch-kibana-configuration task is declared by the
# elasticsearch-kibana plugin.
- id: lma-backends
type: puppet
version: 2.0.0
requires: [lma-base, influxdb-configuration, elasticsearch-kibana-configuration]
requires: [lma-base]
required_for: [lma-cleanup-apt-config]
role:
- primary-elasticsearch_kibana