Apply gnocchi client state
In order to allow setting up Gnocchi policies, gnocchi client
state should be applied.
Change-Id: I8c504b0b29c766a7d420f9870cfc9597b2592987
Related-Prod: https://mirantis.jira.com/browse/PROD-20813
diff --git a/src/com/mirantis/mk/Orchestrate.groovy b/src/com/mirantis/mk/Orchestrate.groovy
index 1b736cd..93bb841 100644
--- a/src/com/mirantis/mk/Orchestrate.groovy
+++ b/src/com/mirantis/mk/Orchestrate.groovy
@@ -428,6 +428,13 @@
salt.enforceState(master, "I@gnocchi:server ${extra_tgt}", 'gnocchi.server')
}
+ // Apply gnocchi client state to create gnocchi archive policies, due to possible
+ // races, apply on the first node initially
+ if (salt.testTarget(master, "I@gnocchi:client ${extra_tgt}")) {
+ salt.enforceState(master, "I@gnocchi:client and *01* ${extra_tgt}", 'gnocchi.client')
+ salt.enforceState(master, "I@gnocchi:client ${extra_tgt}", 'gnocchi.client')
+ }
+
// Install gnocchi statsd
if (salt.testTarget(master, "I@gnocchi:statsd ${extra_tgt}")) {
salt.enforceState(master, "I@gnocchi:statsd and *01* ${extra_tgt}", 'gnocchi.statsd')