start stacklight vip services
Change-Id: Ie6f616572c25f5060dee0648197b8c6875cfa31a
diff --git a/lab-pipeline.groovy b/lab-pipeline.groovy
index b4563e2..a288652 100644
--- a/lab-pipeline.groovy
+++ b/lab-pipeline.groovy
@@ -486,17 +486,20 @@
// TODO
//vip=$(salt-call pillar.data _param:stacklight_monitor_address --out key|grep _param: |awk '{print $2}')
//vip=${vip:=172.16.10.253}
- //def pillar = salt.pillarGet(saltMaster, 'ctl01*', '_param:stacklight_monitor_address')
- def pillar = salt.pillarGet(saltMaster, 'ctl01*', '')
+ def pillar = salt.pillarGet(saltMaster, 'ctl01*', '_param:stacklight_monitor_address')
print(pillar)
def stacklight_vip = pillar['return'][0]['ctl01.nfv-lab.local']
common.infoMsg("restart services on node with IP: ${stacklight_vip}")
- // (re)Start manually the services that are bound to the monitoring VIP
- //salt.runSaltProcessStep(saltMaster, "ipv4:${stacklight_vip}", 'service.restart', ['remote_collectd'], true)
- //salt.runSaltProcessStep(saltMaster, "ipv4:${stacklight_vip}", 'service.restart', ['remote_collector'], true)
- //salt.runSaltProcessStep(saltMaster, "ipv4:${stacklight_vip}", 'service.restart', ['aggregator'], true)
- //salt.runSaltProcessStep(saltMaster, "ipv4:${stacklight_vip}", 'service.restart', ['nagios3'], true)
+ if (stacklight_vip == "") {
+ throw new Exception("Missing stacklight_vip")
+ } else {
+ // (re)Start manually the services that are bound to the monitoring VIP
+ salt.runSaltProcessStep(saltMaster, "ipv4:${stacklight_vip}", 'service.restart', ['remote_collectd'], true)
+ salt.runSaltProcessStep(saltMaster, "ipv4:${stacklight_vip}", 'service.restart', ['remote_collector'], true)
+ salt.runSaltProcessStep(saltMaster, "ipv4:${stacklight_vip}", 'service.restart', ['aggregator'], true)
+ salt.runSaltProcessStep(saltMaster, "ipv4:${stacklight_vip}", 'service.restart', ['nagios3'], true)
+ }
}
}