From af0d150ac177bbb7aa294a6923b4833a47ff86f1 Mon Sep 17 00:00:00 2001 From: Edison Su Date: Wed, 24 Aug 2011 10:40:12 -0700 Subject: [PATCH] bug 11217: add secondary storage id into snapshot, if it's an empty snapshot status 11217: resolved fixed --- server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java index 9767c0a0b04..9d2173c890e 100755 --- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java @@ -275,10 +275,12 @@ public class SnapshotManagerImpl implements SnapshotManager, SnapshotService, Ma if (preSnapshotPath != null && preSnapshotPath.equals(answer.getSnapshotPath())) { // empty snapshot s_logger.debug("CreateSnapshot: this is empty snapshot "); + HostVO secHost = getSecHost(volumeId, volume.getDataCenterId()); snapshot.setPath(preSnapshotPath); snapshot.setBackupSnapshotId(preSnapshotVO.getBackupSnapshotId()); snapshot.setStatus(Snapshot.Status.BackedUp); snapshot.setPrevSnapshotId(preId); + snapshot.setSecHostId(secHost.getId()); _snapshotDao.update(snapshotId, snapshot); } else { long preSnapshotId = 0;