sureshanaparti commented on code in PR #14788:
URL: https://github.com/apache/cloudstack/pull/14788#discussion_r4666255444
##########
plugins/storage/volume/storpool/src/main/java/org/apache/cloudstack/storage/snapshot/StorPoolVMSnapshotStrategy.java:
##########
@@ -185,16 +186,36 @@ public VMSnapshot takeVMSnapshot(VMSnapshot vmSnapshot) {
@Override
public StrategyPriority canHandle(VMSnapshot vmSnapshot) {
+ if (VMSnapshot.State.Allocated.equals(vmSnapshot.getState()) &&
VMSnapshot.Type.DiskAndMemory.equals(vmSnapshot.getType())) {
+ return StrategyPriority.CANT_HANDLE;
+ }
return areAllVolumesOnStorPool(vmSnapshot.getVmId());
}
public StrategyPriority canHandle(Long vmId, Long rootPoolId, boolean
snapshotMemory) {
if (snapshotMemory) {
+ if (isAnyVolumeOnStorPool(vmId)) {
Review Comment:
@slavkap should we do this check earlier? what if some other strategy can
handle this case before StorPoolVMSnapshotStrategy (or ensure the storage
specific strategies are checked before the usual default strategy) ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]