Merge pull request #899 from yvsubhash/CLOUDSTACK-8921

BUG-ID:CLOUDSTACK-8921 snapshot_store_ref table should store actual size of backup snapshot in secondary storage
This commit is contained in:
Rajani Karuturi 2017-06-06 15:38:42 +05:30 committed by GitHub
commit 51974cd568
1 changed files with 5 additions and 0 deletions

View File

@ -348,6 +348,7 @@ public class Xenserver625StorageProcessor extends XenServerStorageProcessor {
hypervisorResource.waitForTask(conn, task, 1000, wait * 1000);
hypervisorResource.checkForSuccess(conn, task);
dvdi = Types.toVDI(task, conn);
ssSR.scan(conn);
// copied = true;
} finally {
if (task != null) {
@ -486,6 +487,7 @@ public class Xenserver625StorageProcessor extends XenServerStorageProcessor {
hypervisorResource.checkForSuccess(conn, task);
final VDI backedVdi = Types.toVDI(task, conn);
snapshotBackupUuid = backedVdi.getUuid(conn);
snapshotSr.scan(conn);
physicalSize = backedVdi.getPhysicalUtilisation(conn);
if (destStore instanceof SwiftTO) {
@ -571,6 +573,9 @@ public class Xenserver625StorageProcessor extends XenServerStorageProcessor {
} else {
newSnapshot.setParentSnapshotPath(prevBackupUuid);
}
s_logger.info("New snapshot details: " + newSnapshot.toString());
s_logger.info("New snapshot physical utilization: "+physicalSize);
return new CopyCmdAnswer(newSnapshot);
} catch (final Types.XenAPIException e) {
details = "BackupSnapshot Failed due to " + e.toString();