Ceph - Add checks for host parameter
Related-Prod: PROD-35170
Change-Id: Ie19e1859e3bffa9814d24a9abff5b7a41b00ffd8
diff --git a/ceph-remove-node.groovy b/ceph-remove-node.groovy
index 55e9d6e..18b03fb 100644
--- a/ceph-remove-node.groovy
+++ b/ceph-remove-node.groovy
@@ -38,6 +38,12 @@
throw new InterruptedException()
}
+ def checknode = salt.runSaltProcessStep(pepperEnv, HOST, 'test.ping')
+ if (checknode['return'][0].values().isEmpty()) {
+ common.errorMsg("Host not found")
+ throw new InterruptedException()
+ }
+
stage('Refresh_pillar') {
salt.runSaltProcessStep(pepperEnv, '*', 'saltutil.refresh_pillar', [], null, true, 5)
}