You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2021/06/25 06:35:01 UTC

[cloudstack] branch 4.15 updated: server: Fix of delete of Ceph's snapshots from secondary storage (#5130)

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.15
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.15 by this push:
     new d829093  server: Fix of delete of Ceph's snapshots from secondary storage (#5130)
d829093 is described below

commit d82909318f64b6bcc2dec83174c2e6475071ba98
Author: slavkap <51...@users.noreply.github.com>
AuthorDate: Fri Jun 25 09:34:36 2021 +0300

    server: Fix of delete of Ceph's snapshots from secondary storage (#5130)
    
    This PR fixes the deletion will be handled by DefaultSnapshotStrategy::deleteSnapshot #4797
---
 .../org/apache/cloudstack/storage/snapshot/CephSnapshotStrategy.java  | 4 ----
 .../apache/cloudstack/storage/snapshot/CephSnapshotStrategyTest.java  | 2 --
 2 files changed, 6 deletions(-)

diff --git a/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/CephSnapshotStrategy.java b/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/CephSnapshotStrategy.java
index 87f9e10..039cd82 100644
--- a/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/CephSnapshotStrategy.java
+++ b/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/CephSnapshotStrategy.java
@@ -64,10 +64,6 @@ public class CephSnapshotStrategy extends StorageSystemSnapshotStrategy {
             return StrategyPriority.HIGHEST;
         }
 
-        if (SnapshotOperation.DELETE.equals(op)) {
-            return StrategyPriority.HIGHEST;
-        }
-
         return StrategyPriority.CANT_HANDLE;
     }
 
diff --git a/engine/storage/snapshot/src/test/java/org/apache/cloudstack/storage/snapshot/CephSnapshotStrategyTest.java b/engine/storage/snapshot/src/test/java/org/apache/cloudstack/storage/snapshot/CephSnapshotStrategyTest.java
index 260a21d..dcc6acf 100644
--- a/engine/storage/snapshot/src/test/java/org/apache/cloudstack/storage/snapshot/CephSnapshotStrategyTest.java
+++ b/engine/storage/snapshot/src/test/java/org/apache/cloudstack/storage/snapshot/CephSnapshotStrategyTest.java
@@ -87,8 +87,6 @@ public class CephSnapshotStrategyTest {
             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);
             }