Skip to content

Commit 6d2c408

Browse files
committed
CSTACKEX-361:ONTAP NFS volume created from snapshot loses its path and cannot be attached to a VM
1 parent 8500c01 commit 6d2c408

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1787,7 +1787,11 @@ else if (HypervisorType.KVM.equals(snapshotInfo.getHypervisorType())) {
17871787
VolumeObjectTO newVolume = new VolumeObjectTO();
17881788

17891789
newVolume.setSize(volumeInfo.getSize());
1790-
newVolume.setPath(volumeInfo.get_iScsiName());
1790+
String path = volumeInfo.get_iScsiName();
1791+
if (path == null) {
1792+
path = volumeInfo.getPath();
1793+
}
1794+
newVolume.setPath(path);
17911795
newVolume.setFormat(volumeInfo.getFormat());
17921796

17931797
copyCmdAnswer = new CopyCmdAnswer(newVolume);

0 commit comments

Comments
 (0)