CLOUDSTACK-4165 3.0.6 to ASF 4.2 Upgrade: Data Migration step of the Upgrade Fails on "persistLegacyZones"

Track the Datacenter of previous cluster correctly while going through each cluster in the zone to see if 2 clusters are from different DC/vCenter.

Cherry picked from 4.2 commit a3450afff558d1d04a7dd4697f4d152f3a0aba33

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
This commit is contained in:
Sateesh Chodapuneedi 2013-08-08 09:00:10 +05:30
parent e1e4642d67
commit 3e85f480c4

View File

@ -629,10 +629,10 @@ public class Upgrade410to420 implements DbUpgrade {
tokens = url.split("/"); // url format - http://vcenter/dc/cluster
vc = tokens[2];
dcName = tokens[3];
dcOfPreviousCluster = dcOfCurrentCluster;
dcOfCurrentCluster = dcName + "@" + vc;
if (count > 0) {
dcOfPreviousCluster = dcOfCurrentCluster;
dcOfCurrentCluster = dcName + "@" + vc;
if (!dcOfPreviousCluster.equals(dcOfCurrentCluster)) {
if (!dcOfPreviousCluster.equalsIgnoreCase(dcOfCurrentCluster)) {
legacyZone = true;
s_logger.debug("Marking the zone " + zoneId + " as legacy zone.");
}