|
46 | 46 | import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; |
47 | 47 | import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreCapabilities; |
48 | 48 | import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreDriver; |
| 49 | +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider; |
49 | 50 | import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint; |
50 | 51 | import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector; |
51 | 52 | import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; |
@@ -1341,11 +1342,13 @@ private void createManagedVolumeCopyTemplateAsync(VolumeInfo volumeInfo, Primary |
1341 | 1342 | primaryDataStore.setDetails(details); |
1342 | 1343 |
|
1343 | 1344 | grantAccess(volumeInfo, destHost, primaryDataStore); |
1344 | | - volumeInfo = volFactory.getVolume(volumeInfo.getId(), primaryDataStore); |
1345 | | - // For Netapp ONTAP iscsiName or Lun path is available only after grantAccess |
1346 | | - String managedStoreTarget = ObjectUtils.defaultIfNull(volumeInfo.get_iScsiName(), volumeInfo.getUuid()); |
1347 | | - details.put(PrimaryDataStore.MANAGED_STORE_TARGET, managedStoreTarget); |
1348 | | - primaryDataStore.setDetails(details); |
| 1345 | + if (DataStoreProvider.ONTAP_PLUGIN_NAME.equals(primaryDataStore.getStorageProviderName())) { |
| 1346 | + // For Netapp ONTAP iscsiName or Lun path is available only after grantAccess |
| 1347 | + volumeInfo = volFactory.getVolume(volumeInfo.getId(), primaryDataStore); |
| 1348 | + String managedStoreTarget = ObjectUtils.defaultIfNull(volumeInfo.get_iScsiName(), volumeInfo.getUuid()); |
| 1349 | + details.put(PrimaryDataStore.MANAGED_STORE_TARGET, managedStoreTarget); |
| 1350 | + primaryDataStore.setDetails(details); |
| 1351 | + } |
1349 | 1352 |
|
1350 | 1353 | try { |
1351 | 1354 | motionSrv.copyAsync(srcTemplateInfo, destTemplateInfo, destHost, caller); |
|
0 commit comments