bug 6688: there is obsolete nfs handle, try to umount it

status 6688: resolved fixed
This commit is contained in:
anthony 2010-10-20 19:23:35 -07:00
parent 2307255aab
commit 9d6e553288
2 changed files with 8 additions and 4 deletions

View File

@ -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)

View File

@ -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;