Github user jburwell commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1600#discussion_r77080602
--- Diff:
engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/StorageSystemSnapshotStrategy.java
---
@@ -212,20 +251,47 @@ public SnapshotInfo takeSnapshot(SnapshotInfo
snapshotInfo) {
performSnapshotAndCopyOnHostSide(volumeInfo, snapshotInfo);
}
- markAsBackedUp((SnapshotObject)result.getSnashot());
+ snapshotOnPrimary = result.getSnapshot();
+ backedUpSnapshot = backupSnapshot(snapshotOnPrimary);
+
+ updateLocationTypeInDb(backedUpSnapshot);
+
}
finally {
if (result != null && result.isSuccess()) {
volumeInfo.stateTransit(Volume.Event.OperationSucceeded);
- }
- else {
+
+ Preconditions.checkState(snapshotOnPrimary != null);
--- End diff --
Should an exception be thrown in this ``finally`` block or just skip
processing?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---