Fix undefined 'count' variable
Fixes: PROD-31258
Change-Id: I4086e6d5f515bce0e6ae12c7d666b7039905896b
diff --git a/update-ceph.groovy b/update-ceph.groovy
index cde1401..72ac2d5 100644
--- a/update-ceph.groovy
+++ b/update-ceph.groovy
@@ -24,11 +24,11 @@
return salt.cmdRun(master, target, cmd)
}
-def waitForHealthy(master, tgt, attempts=100, timeout=10) {
+def waitForHealthy(master, tgt, count=0, attempts=100) {
// wait for healthy cluster
common = new com.mirantis.mk.Common()
while (count<attempts) {
- def health = runCephCommand(master, ADMIN_HOST, 'ceph health')['return'][0].values()[0]
+ def health = runCephCommand(master, tgt, 'ceph health')['return'][0].values()[0]
if (health.contains('HEALTH_OK') || health.contains('HEALTH_WARN noout flag(s) set\n')) {
common.infoMsg('Cluster is healthy')
break;