Fixed: only the first snapshot got backedup to secondary storage, if multple snapshot taken.

Reviewed-by: anthony
This commit is contained in:
Edison Su 2011-09-22 14:49:33 -07:00
parent 82f4060548
commit 8727d84f42
1 changed files with 2 additions and 2 deletions

View File

@ -1215,7 +1215,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
s_logger.debug("Failed to manage snapshot: " + e.toString());
return new ManageSnapshotAnswer(cmd, false, "Failed to manage snapshot: " + e.toString());
}
return new ManageSnapshotAnswer(cmd, cmd.getSnapshotId(), cmd.getVolumePath(), true, null);
return new ManageSnapshotAnswer(cmd, cmd.getSnapshotId(), cmd.getVolumePath() + File.separator + snapshotName, true, null);
}
protected BackupSnapshotAnswer execute(final BackupSnapshotCommand cmd) {
@ -1224,7 +1224,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
Long volumeId = cmd.getVolumeId();
String secondaryStoragePoolURL = cmd.getSecondaryStoragePoolURL();
String snapshotName = cmd.getSnapshotName();
String snapshotPath = cmd.getSnapshotUuid();
String snapshotPath = cmd.getVolumePath();
String snapshotDestPath = null;
String vmName = cmd.getVmName();