Skip to content

Commit 0458ffb

Browse files
authored
Merge pull request #132 from NetApp/bugfix/CSTACKEX-361
CSTACKEX-361: ONTAP NFS volume created from snapshot loses its path and cannot be attached to a VM
2 parents d4221de + 6d2c408 commit 0458ffb

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)