vcp ugprade - nodeprovider fix
Change-Id: I37a10b68eb9a8db11a7a75d8c972f41a626366c9
diff --git a/openstack-control-upgrade.groovy b/openstack-control-upgrade.groovy
index 2f91865..50d2c28 100644
--- a/openstack-control-upgrade.groovy
+++ b/openstack-control-upgrade.groovy
@@ -230,10 +230,9 @@
stopServices(pepperEnv, node, tgt, general_target)
}
- def node_count = 1
for (t in target_hosts) {
def target = salt.stripDomainName(t)
- def nodeProvider = salt.getNodeProvider(pepperEnv, "${general_target}0${node_count}")
+ def nodeProvider = salt.getNodeProvider(pepperEnv, t)
if ((OPERATING_SYSTEM_RELEASE_UPGRADE.toBoolean() == true) && (SKIP_VM_RELAUNCH.toBoolean() == false)) {
salt.runSaltProcessStep(pepperEnv, "${nodeProvider}", 'virt.destroy', ["${target}.${domain}"])
sleep(2)
@@ -251,7 +250,6 @@
} else if (OPERATING_SYSTEM_RELEASE_UPGRADE.toBoolean() == false) {
virsh.liveSnapshotPresent(pepperEnv, nodeProvider, target, snapshotName)
}
- node_count++
}
}
@@ -482,10 +480,9 @@
general_target = 'ctl'
}
- def node_count = 1
for (t in target_hosts) {
def target = salt.stripDomainName(t)
- def nodeProvider = salt.getNodeProvider(pepperEnv, "${general_target}0${node_count}")
+ def nodeProvider = salt.getNodeProvider(pepperEnv, t)
salt.runSaltProcessStep(pepperEnv, "${nodeProvider}", 'virt.destroy', ["${target}.${domain}"])
sleep(2)
if (OPERATING_SYSTEM_RELEASE_UPGRADE.toBoolean() == true) {
@@ -501,7 +498,6 @@
salt.runSaltProcessStep(pepperEnv, "${nodeProvider}", 'virt.start', ["${target}.${domain}"])
virsh.liveSnapshotAbsent(pepperEnv, nodeProvider, target, snapshotName)
}
- node_count++
}
}