Skip to content

Commit 43a7d3d

Browse files
Srivastava, PiyushSrivastava, Piyush
authored andcommitted
Commit 16
1 parent 3f90227 commit 43a7d3d

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,9 @@ public boolean connectPhysicalDisk(String volumeUuid, KVMStoragePool pool, Map<S
171171
}
172172

173173
logger.info("Successfully mounted ONTAP NFS volume: " + nfsServer + ":" + junctionPath + " at " + mountPoint);
174-
175174
// Store the mapping so other methods can find the correct mount point
176175
volumeToMountPointMap.put(volumeUuid, mountPoint);
177-
178176
return true;
179-
180177
} catch (Exception e) {
181178
logger.error("Exception mounting ONTAP NFS volume: " + volumeUuid, e);
182179
return false;
@@ -215,27 +212,21 @@ public boolean disconnectPhysicalDisk(String volumeUuid, KVMStoragePool pool) {
215212
logger.info("Volume not mounted, nothing to disconnect: " + mountPoint);
216213
return true;
217214
}
218-
219215
try {
220216
// Unmount: umount <mountPoint>
221217
String umountCmd = "umount " + mountPoint;
222218
Script script = new Script("/bin/bash", 60000, logger);
223219
script.add("-c");
224220
script.add(umountCmd);
225221
String result = script.execute();
226-
227222
if (result != null) {
228223
logger.warn("Failed to unmount ONTAP NFS volume: " + mountPoint + ", error: " + result);
229224
return false;
230225
}
231-
232226
logger.info("Successfully unmounted ONTAP NFS volume: " + mountPoint);
233-
234227
// Remove from mapping
235228
volumeToMountPointMap.remove(volumeUuid);
236-
237229
return true;
238-
239230
} catch (Exception e) {
240231
logger.error("Exception unmounting ONTAP NFS volume: " + volumeUuid, e);
241232
return false;

0 commit comments

Comments
 (0)