Github user koushik-das commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1727#discussion_r95515374
--- Diff: server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java ---
@@ -338,10 +354,12 @@ public VMSnapshot allocVMSnapshot(Long vmId, String
vsDisplayName, String vsDesc
VMSnapshotVO vmSnapshotVo =
new VMSnapshotVO(userVmVo.getAccountId(),
userVmVo.getDomainId(), vmId, vsDescription, vmSnapshotName, vsDisplayName,
userVmVo.getServiceOfferingId(),
vmSnapshotType, null);
+
VMSnapshot vmSnapshot = _vmSnapshotDao.persist(vmSnapshotVo);
if (vmSnapshot == null) {
throw new CloudRuntimeException("Failed to create snapshot
for vm: " + vmId);
}
+ addSupportForCustomServiceOffering(userVmVo.getId(),
userVmVo.getServiceOfferingId(), vmSnapshotVo.getId());
--- End diff --
snapshotDao.persist() and addSupportForCustomServiceOffering() should be
wrapped in a transaction, check Transaction.execute()
---
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.
---