Skip to content

Commit a3450af

Browse files
author
Sateesh Chodapuneedi
committed
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. Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
1 parent 1076c26 commit a3450af

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -627,10 +627,10 @@ private void persistLegacyZones(Connection conn) {
627627
tokens = url.split("/"); // url format - http://vcenter/dc/cluster
628628
vc = tokens[2];
629629
dcName = tokens[3];
630+
dcOfPreviousCluster = dcOfCurrentCluster;
631+
dcOfCurrentCluster = dcName + "@" + vc;
630632
if (count > 0) {
631-
dcOfPreviousCluster = dcOfCurrentCluster;
632-
dcOfCurrentCluster = dcName + "@" + vc;
633-
if (!dcOfPreviousCluster.equals(dcOfCurrentCluster)) {
633+
if (!dcOfPreviousCluster.equalsIgnoreCase(dcOfCurrentCluster)) {
634634
legacyZone = true;
635635
s_logger.debug("Marking the zone " + zoneId + " as legacy zone.");
636636
}

0 commit comments

Comments
 (0)