update grain name for ceph OSDs
Related-Prod: PROD-35230
Change-Id: Idbd3114d0d6e1d802a2a925dbc5a83136fd2a5f4
diff --git a/ceph-backend-migration.groovy b/ceph-backend-migration.groovy
index a9bf720..22809c8 100644
--- a/ceph-backend-migration.groovy
+++ b/ceph-backend-migration.groovy
@@ -91,7 +91,7 @@
}
def target_hosts = salt.getMinions(pepperEnv, TARGET)
- def device_grain_name = salt.getPillar(pepperEnv,"I@ceph:osd","ceph:osd:lvm_enabled")['return'].first().containsValue(true) ? "ceph_volume" : "ceph_disk"
+ def device_grain_name = "ceph_disk"
for (tgt in target_hosts) {
def osd_ids = []
diff --git a/ceph-remove-node.groovy b/ceph-remove-node.groovy
index 39ed07e..55e9d6e 100644
--- a/ceph-remove-node.groovy
+++ b/ceph-remove-node.groovy
@@ -75,7 +75,7 @@
}
} else if (HOST_TYPE.toLowerCase() == 'osd') {
def osd_ids = []
- def device_grain_name = salt.getPillar(pepperEnv,"I@ceph:osd","ceph:osd:lvm_enabled")['return'].first().containsValue(true) ? "ceph_volume" : "ceph_disk"
+ def device_grain_name = "ceph_disk"
// get list of osd disks of the host
salt.runSaltProcessStep(pepperEnv, HOST, 'saltutil.sync_grains', [], null, true, 5)
def ceph_disks = salt.getGrain(pepperEnv, HOST, 'ceph')['return'][0].values()[0].values()[0][device_grain_name]
diff --git a/cloud-update.groovy b/cloud-update.groovy
index f45e4ec..b76c4b2 100644
--- a/cloud-update.groovy
+++ b/cloud-update.groovy
@@ -897,7 +897,7 @@
def salt = new com.mirantis.mk.Salt()
def common = new com.mirantis.mk.Common()
def targetHosts = salt.getMinionsSorted(pepperEnv, target)
- def device_grain_name = salt.getPillar(pepperEnv,"I@ceph:osd","ceph:osd:lvm_enabled")['return'].first().containsValue(true) ? "ceph_volume" : "ceph_disk"
+ def device_grain_name = "ceph_disk"
for (t in targetHosts) {
def osd_ids = []
// get list of osd disks of the host
diff --git a/update-ceph.groovy b/update-ceph.groovy
index 00c16b3..11ca27c 100644
--- a/update-ceph.groovy
+++ b/update-ceph.groovy
@@ -60,7 +60,7 @@
}
stage('Restart OSDs') {
- def device_grain_name = salt.getPillar(pepperEnv,"I@ceph:osd","ceph:osd:lvm_enabled")['return'].first().containsValue(true) ? "ceph_volume" : "ceph_disk"
+ def device_grain_name = "ceph_disk"
selMinions = salt.getMinions(pepperEnv, "I@ceph:osd")
for (tgt in selMinions) {
salt.runSaltProcessStep(pepperEnv, tgt, 'saltutil.sync_grains', [], null, true, 5)