Skip to content

Commit 1b26a48

Browse files
subhash yedugundlaRohit Yadav
authored andcommitted
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 4e4b67c) Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent 9334e09 commit 1b26a48

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/Xenserver625StorageProcessor.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ protected String backupSnapshot(final Connection conn, final String primaryStora
349349
hypervisorResource.waitForTask(conn, task, 1000, wait * 1000);
350350
hypervisorResource.checkForSuccess(conn, task);
351351
dvdi = Types.toVDI(task, conn);
352+
ssSR.scan(conn);
352353
// copied = true;
353354
} finally {
354355
if (task != null) {
@@ -462,6 +463,7 @@ public Answer backupSnapshot(final CopyCommand cmd) {
462463
hypervisorResource.checkForSuccess(conn, task);
463464
final VDI backedVdi = Types.toVDI(task, conn);
464465
snapshotBackupUuid = backedVdi.getUuid(conn);
466+
snapshotSr.scan(conn);
465467
physicalSize = backedVdi.getPhysicalUtilisation(conn);
466468

467469
if (destStore instanceof SwiftTO) {
@@ -541,6 +543,9 @@ public Answer backupSnapshot(final CopyCommand cmd) {
541543
} else {
542544
newSnapshot.setParentSnapshotPath(prevBackupUuid);
543545
}
546+
s_logger.info("New snapshot details: " + newSnapshot.toString());
547+
s_logger.info("New snapshot physical utilization: "+physicalSize);
548+
544549
return new CopyCmdAnswer(newSnapshot);
545550
} catch (final Types.XenAPIException e) {
546551
details = "BackupSnapshot Failed due to " + e.toString();

0 commit comments

Comments
 (0)