Ceph - Add checks for host parameter
Related-Prod: PROD-35170
Change-Id: Ie19e1859e3bffa9814d24a9abff5b7a41b00ffd8
diff --git a/ceph-remove-osd.groovy b/ceph-remove-osd.groovy
index e5d4893..b177ad3 100644
--- a/ceph-remove-osd.groovy
+++ b/ceph-remove-osd.groovy
@@ -39,6 +39,12 @@
def osd_ids = []
+ def checknode = salt.runSaltProcessStep(pepperEnv, HOST, 'test.ping')
+ if (checknode['return'][0].values().isEmpty()) {
+ common.errorMsg("Host not found")
+ throw new InterruptedException()
+ }
+
// get list of osd disks of the host
salt.runSaltProcessStep(pepperEnv, HOST, 'saltutil.sync_grains', [], null, true, 5)
def cephGrain = salt.getGrain(pepperEnv, HOST, 'ceph')