BUG-ID:CLOUDSTACK-8921

Summary: CLOUDSTACK-8921
     snapshot_store_ref table should store actual size of back snapshot in secondary storage
Calling SR scan to make sure size is updated correctly

(cherry picked from commit 4e4b67cd96)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
subhash yedugundla 2015-09-22 11:56:40 +05:30 committed by Rohit Yadav
parent 9334e091c0
commit 1b26a486d1
1 changed files with 5 additions and 0 deletions

View File

@ -349,6 +349,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) {
@ -462,6 +463,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) {
@ -541,6 +543,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();