run ceph.common one by one if removing ceph mon node
Change-Id: If6e74c66f0cb74d0b2ff95bc2262993e54439bef
diff --git a/ceph-remove-node.groovy b/ceph-remove-node.groovy
index cda53be..f9ceead 100644
--- a/ceph-remove-node.groovy
+++ b/ceph-remove-node.groovy
@@ -173,9 +173,14 @@
runCephCommand(pepperEnv, 'I@ceph:mon', "monmaptool /tmp/monmap --rm ${target}")
}
+ def target_hosts = salt.getMinions(pepperEnv, 'I@ceph:common')
+ print target_hosts
+
// Update configs
stage('Update Ceph configs') {
- salt.enforceState(pepperEnv, 'I@ceph:common', 'ceph.common', true)
+ for (target in target_hosts) {
+ salt.enforceState(pepperEnv, target, 'ceph.common', true)
+ }
}
}