kishankavala commented on a change in pull request #1897: CLOUDSTACK-9733:
Concurrent volume snapshots of a VM are not allowed and are not limited per
host as per the global configuration parameter
"concurrent.snapshots.threshold.perhost".
URL: https://github.com/apache/cloudstack/pull/1897#discussion_r114495600
##########
File path:
engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java
##########
@@ -374,10 +374,14 @@ public SnapshotInfo takeSnapshot(SnapshotInfo snapshot) {
throw new CloudRuntimeException(result.getResult());
}
} finally {
- if (result != null && result.isSuccess()) {
- volumeInfo.stateTransit(Volume.Event.OperationSucceeded);
- } else {
- volumeInfo.stateTransit(Volume.Event.OperationFailed);
+ List<SnapshotVO> activeVolumeSnapshots =
snapshotDao.listByStatus(snapshot.getVolumeId(), Snapshot.State.Creating);
+ if (activeVolumeSnapshots.isEmpty()) {
Review comment:
There could be a race condition here.
----------------------------------------------------------------
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