Skip to content

Commit 5e7106c

Browse files
Srivastava, PiyushSrivastava, Piyush
authored andcommitted
Commit 15
1 parent 89ed044 commit 5e7106c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/OntapNfsStorageAdaptor.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,15 @@ public boolean deleteStoragePool(KVMStoragePool pool) {
131131
public boolean connectPhysicalDisk(String volumeUuid, KVMStoragePool pool, Map<String, String> details, boolean isVMMigrate) {
132132
logger.info("Connecting ONTAP NFS volume: " + volumeUuid);
133133

134-
// For ONTAP NFS, volumeUuid is actually the junction path (e.g., "/cloudstack_vol_ROOT_7")
135-
// This comes from managedStoreTarget set by OntapPrimaryDatastoreDriver
136-
String junctionPath = volumeUuid;
134+
// Get junction path from details map (set by VolumeOrchestrator as MOUNT_POINT)
135+
// This contains the ONTAP junction path like "/cs_vol_7e72cff5_9730_46e3_80ff_fb76fd7b1dc8"
136+
String junctionPath = details != null ? details.get(DiskTO.MOUNT_POINT) : null;
137137
// Validate junction path
138138
if (junctionPath == null || junctionPath.isEmpty()) {
139-
logger.error("Invalid junction path for volume: " + volumeUuid);
139+
logger.error("Missing junction path (MOUNT_POINT) in details for volume: " + volumeUuid);
140140
return false;
141141
}
142+
logger.info("Using junction path: " + junctionPath + " for volume: " + volumeUuid);
142143
// Create a sanitized mount point name (remove leading slash, replace special chars)
143144
String sanitizedPath = junctionPath.startsWith("/") ? junctionPath.substring(1) : junctionPath;
144145
sanitizedPath = sanitizedPath.replace("/", "_");

0 commit comments

Comments
 (0)