khos2ow commented on a change in pull request #2398: CLOUDSTACK-10222: Clean
previous snaphosts from primary storage when ?
URL: https://github.com/apache/cloudstack/pull/2398#discussion_r160494160
##########
File path:
plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/Xenserver625StorageProcessor.java
##########
@@ -576,13 +578,20 @@ public Answer backupSnapshot(final CopyCommand cmd) {
s_logger.info("New snapshot details: " + newSnapshot.toString());
s_logger.info("New snapshot physical utilization: "+physicalSize);
+ successful = true;
+
return new CopyCmdAnswer(newSnapshot);
} catch (final Types.XenAPIException e) {
details = "BackupSnapshot Failed due to " + e.toString();
s_logger.warn(details, e);
} catch (final Exception e) {
details = "BackupSnapshot Failed due to " + e.getMessage();
s_logger.warn(details, e);
+ } finally {
+ if (!successful) {
Review comment:
When the two `catch` block merged together I'll move this from `finally` to
`catch`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services