mirror of https://github.com/apache/cloudstack.git
bug 6688: there is obsolete nfs handle, try to umount it
status 6688: resolved fixed
This commit is contained in:
parent
2307255aab
commit
9d6e553288
|
|
@ -709,6 +709,9 @@ def makedirs(path):
|
|||
try:
|
||||
os.makedirs(path)
|
||||
except OSError, (errno, strerror):
|
||||
umount(path)
|
||||
if os.path.isdir(path):
|
||||
return
|
||||
errMsg = "OSError while creating " + path + " with errno: " + str(errno) + " and strerr: " + strerror
|
||||
util.SMlog(errMsg)
|
||||
raise xs_errors.XenError(errMsg)
|
||||
|
|
|
|||
|
|
@ -68,15 +68,16 @@ public class CreateSnapshotExecutor extends BaseAsyncJobExecutor {
|
|||
|
||||
try {
|
||||
SnapshotVO snapshot = snapshotManager.createSnapshot(userId, param.getVolumeId(), param.getPolicyIds());
|
||||
Snapshot.Status status = snapshot.getStatus();
|
||||
if (snapshot != null && ( status == Snapshot.Status.CreatedOnPrimary
|
||||
|| status == Snapshot.Status.BackedUp) ) {
|
||||
if (snapshot != null) {
|
||||
Snapshot.Status status = snapshot.getStatus();
|
||||
snapshotId = snapshot.getId();
|
||||
if( status == Snapshot.Status.CreatedOnPrimary ) {
|
||||
asyncMgr.updateAsyncJobStatus(jobId, BaseCmd.PROGRESS_INSTANCE_CREATED, snapshotId);
|
||||
backedUp = snapshotManager.backupSnapshotToSecondaryStorage(userId, snapshot);
|
||||
} else {
|
||||
} else if ( status == Snapshot.Status.BackedUp ){
|
||||
backedUp = true;
|
||||
} else {
|
||||
resultObject = "Snapshot: " + snapshotId + " creation failed, the status is " + status.toString();
|
||||
}
|
||||
if (backedUp) {
|
||||
result = AsyncJobResult.STATUS_SUCCEEDED;
|
||||
|
|
|
|||
Loading…
Reference in New Issue