ceph-remove-node: add additional checks before running ceph.setup.crush state
Change-Id: I82db0de534bab0289adf94a2d230ccbd3c01919c
Related-Prod: PROD-32501
diff --git a/ceph-remove-node.groovy b/ceph-remove-node.groovy
index 0fba6a0..766dda1 100644
--- a/ceph-remove-node.groovy
+++ b/ceph-remove-node.groovy
@@ -304,7 +304,8 @@
}
}
- if (HOST_TYPE.toLowerCase() == 'osd' && GENERATE_CRUSHMAP.toBoolean() == true) {
+ def crushmap_target = salt.getMinions(pepperEnv, "I@ceph:setup:crush")
+ if (HOST_TYPE.toLowerCase() == 'osd' && GENERATE_CRUSHMAP.toBoolean() == true && crushmap_target ) {
stage('Generate CRUSHMAP') {
salt.enforceState(pepperEnv, 'I@ceph:setup:crush', 'ceph.setup.crush', true)
}