Ceph update/upgrade - run highstate after updating each node

Related-Prod: PROD-29831
Change-Id: I7675c2d4bdb607d44df55e8de14f1f1365598c9d
diff --git a/ceph-upgrade.groovy b/ceph-upgrade.groovy
index ee3ed83..ab5706c 100644
--- a/ceph-upgrade.groovy
+++ b/ceph-upgrade.groovy
@@ -30,6 +30,8 @@
 def pepperEnv = "pepperEnv"
 flags = CLUSTER_FLAGS.tokenize(',')
 
+def runHighState = RUNHIGHSTATE
+
 def backup(master, target) {
     stage("backup ${target}") {
 
@@ -111,15 +113,19 @@
             }
             // restart services
             stage("Restart ${target} services on ${minion}") {
-                if (target == 'osd') {
+                if(target == 'osd') {
                     def ceph_disks = salt.getGrain(master, minion, 'ceph')['return'][0].values()[0].values()[0]['ceph_disk']
                     ceph_disks.each { osd, param ->
                         salt.cmdRun(master, "${minion}", "systemctl restart ceph-${target}@${osd}")
-                        ceph.waitForHealthy(master, ADMIN_HOST, flags)
                     }
-                } else {
+                }
+                else {
                     salt.cmdRun(master, "${minion}", "systemctl restart ceph-${target}.target")
-                    ceph.waitForHealthy(master, ADMIN_HOST, flags)
+                }
+
+                ceph.waitForHealthy(master, ADMIN_HOST, flags)
+                if(runHighState) {
+                    salt.enforceHighstate(pepperEnv, tgt)
                 }
             }