Fix prometheus update during compute node deploy
Currently the following command fails:
`salt -C "I@prometheus" state.sls prometheus`
this is because no salt minions are matched which in turn causes the
deploy compute node pipeline to fail.
The pillar target that works is prometheus:server which targets the
correct salt minions.
PROD-Related: PROD-19010
Change-Id: Iea7633fd5a87926c3381507efba6081bbcdcd0c2
diff --git a/openstack-compute-install.groovy b/openstack-compute-install.groovy
index 7b9054a..7602dcf 100644
--- a/openstack-compute-install.groovy
+++ b/openstack-compute-install.groovy
@@ -98,9 +98,15 @@
}
}
- stage("Install monitoring") {
+ stage("Update/Install monitoring") {
+ //Collect Grains
+ salt.enforceState(pepperEnv, targetLiveAll, 'salt.minion.grains')
+ salt.runSaltProcessStep(pepperEnv, targetLiveAll, 'saltutil.refresh_modules')
+ salt.runSaltProcessStep(pepperEnv, targetLiveAll, 'mine.update')
+ sleep(5)
+
salt.enforceState(pepperEnv, targetLiveAll, 'prometheus')
- salt.enforceState(pepperEnv, 'I@prometheus', 'prometheus')
+ salt.enforceState(pepperEnv, 'I@prometheus:server', 'prometheus')
}
} catch (Throwable e) {