You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by gi...@git.apache.org on 2017/07/07 08:31:22 UTC
[GitHub] sureshanaparti commented on a change in pull request #2159: CLOUDSTACK-9964 : Snapahots are not getting deleted properly, if VM is assigned to another user
sureshanaparti commented on a change in pull request #2159: CLOUDSTACK-9964 : Snapahots are not getting deleted properly, if VM is assigned to another user
URL: https://github.com/apache/cloudstack/pull/2159#discussion_r126094850
##########
File path: server/src/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -5234,7 +5237,12 @@ public void doInTransactionWithoutResult(TransactionStatus status) {
//snapshots: mark these removed in db
List<SnapshotVO> snapshots = _snapshotDao.listByVolumeIdIncludingRemoved(volume.getId());
for (SnapshotVO snapshot : snapshots) {
- _snapshotDao.remove(snapshot.getId());
+ boolean result = _snapshotService.deleteSnapshot(snapshot.getId());
+ if (result) {
+ s_logger.info("Snapshot id: " + snapshot.getId() + " delete successfully ");
+ } else {
+ s_logger.error("Unable to delete Snapshot id: " + snapshot.getId());
+ }
}
Review comment:
Changes looks good to me
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services