From 983f164c57fb47ccacd6b9eb1eb9448191a72150 Mon Sep 17 00:00:00 2001 From: Suresh Kumar Anaparti Date: Fri, 28 Jun 2024 18:46:06 +0530 Subject: [PATCH] Fixed src datastore on copy check for PowerFlex/ScaleIO storage driver (#9310) --- .../storage/datastore/driver/ScaleIOPrimaryDataStoreDriver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/driver/ScaleIOPrimaryDataStoreDriver.java b/plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/driver/ScaleIOPrimaryDataStoreDriver.java index 431fddb566f..600720d594a 100644 --- a/plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/driver/ScaleIOPrimaryDataStoreDriver.java +++ b/plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/driver/ScaleIOPrimaryDataStoreDriver.java @@ -1153,7 +1153,7 @@ public class ScaleIOPrimaryDataStoreDriver implements PrimaryDataStoreDriver { @Override public boolean canCopy(DataObject srcData, DataObject destData) { - DataStore srcStore = destData.getDataStore(); + DataStore srcStore = srcData.getDataStore(); DataStore destStore = destData.getDataStore(); if ((srcStore.getRole() == DataStoreRole.Primary && (srcData.getType() == DataObjectType.TEMPLATE || srcData.getType() == DataObjectType.VOLUME)) && (destStore.getRole() == DataStoreRole.Primary && destData.getType() == DataObjectType.VOLUME)) {