Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3041,29 +3041,6 @@ protected String mountUri(URI uri, Integer nfsVersion) throws UnknownHostExcepti
return dir;
}

protected void umount(String localRootPath, URI uri) {
ensureLocalRootPathExists(localRootPath, uri);

if (!mountExists(localRootPath, uri)) {
return;
}

Script command = new Script(!_inSystemVM, "mount", _timeout, s_logger);
command.add(localRootPath);
String result = command.execute();
if (result != null) {
// Fedora Core 12 errors out with any -o option executed from java
String errMsg = "Unable to umount " + localRootPath + " due to " + result;
s_logger.error(errMsg);
File file = new File(localRootPath);
if (file.exists()) {
file.delete();
}
throw new CloudRuntimeException(errMsg);
}
s_logger.debug("Successfully umounted " + localRootPath);
}

protected void mount(String localRootPath, String remoteDevice, URI uri, Integer nfsVersion) {
s_logger.debug("mount " + uri.toString() + " on " + localRootPath + ((nfsVersion != null) ? " nfsVersion=" + nfsVersion : ""));
ensureLocalRootPathExists(localRootPath, uri);
Expand Down