mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-6017: NPE while creating snapshot multiple times on same Root
volume with S3 as secondary storage.
(cherry picked from commit 402254337c)
Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
This commit is contained in:
parent
91ec548fc0
commit
8f63c2cf9c
|
|
@ -288,7 +288,10 @@ public class SnapshotObject implements SnapshotInfo {
|
|||
} else if (answer instanceof CopyCmdAnswer) {
|
||||
SnapshotObjectTO snapshotTO = (SnapshotObjectTO) ((CopyCmdAnswer) answer).getNewData();
|
||||
snapshotStore.setInstallPath(snapshotTO.getPath());
|
||||
snapshotStore.setSize(snapshotTO.getPhysicalSize());
|
||||
if (snapshotTO.getPhysicalSize() != null) {
|
||||
// For S3 delta snapshot, physical size is currently not set
|
||||
snapshotStore.setSize(snapshotTO.getPhysicalSize());
|
||||
}
|
||||
if (snapshotTO.getParentSnapshotPath() == null) {
|
||||
snapshotStore.setParentSnapshotId(0L);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue