Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,18 @@ public StrategyPriority canHandle(Snapshot snapshot, SnapshotOperation op) {
return StrategyPriority.CANT_HANDLE;
}

if (SnapshotOperation.REVERT.equals(op) && isSnapshotStoredOnRbdStoragePool(snapshot)) {
if (!isSnapshotStoredOnRbdStoragePool(snapshot)) {
return StrategyPriority.CANT_HANDLE;
}

if (SnapshotOperation.REVERT.equals(op)) {
return StrategyPriority.HIGHEST;
}

if (SnapshotOperation.DELETE.equals(op)) {
return StrategyPriority.HIGHEST;
}

return StrategyPriority.CANT_HANDLE;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ private void configureAndVerifyCanHandle(Date removed, boolean isSnapshotStoredO
StrategyPriority strategyPriority = cephSnapshotStrategy.canHandle(snapshot, snapshotOps[i]);
if (snapshotOps[i] == SnapshotOperation.REVERT && isSnapshotStoredOnRbdStoragePool) {
Assert.assertEquals(StrategyPriority.HIGHEST, strategyPriority);
} else if (snapshotOps[i] == SnapshotOperation.DELETE && isSnapshotStoredOnRbdStoragePool) {
Assert.assertEquals(StrategyPriority.HIGHEST, strategyPriority);
} else {
Assert.assertEquals(StrategyPriority.CANT_HANDLE, strategyPriority);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public class CloudStackPrimaryDataStoreDriverImpl implements PrimaryDataStoreDri
@Override
public Map<String, String> getCapabilities() {
Map<String, String> caps = new HashMap<String, String>();
caps.put(DataStoreCapabilities.VOLUME_SNAPSHOT_QUIESCEVM.toString(), "false");
caps.put(DataStoreCapabilities.VOLUME_SNAPSHOT_QUIESCEVM.toString(), Boolean.FALSE.toString());
return caps;
}

Expand Down