Skip to content

Commit 6bde2f6

Browse files
committed
Merge branch 'master' of https://github.com/shapeblue/cloudstack
2 parents 82430f7 + 0d92b92 commit 6bde2f6

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

engine/schema/src/main/resources/META-INF/db/schema-41300to41400.sql

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,16 @@
2121

2222
-- KVM: enable storage data motion on KVM hypervisor_capabilities
2323
UPDATE `cloud`.`hypervisor_capabilities` SET `storage_motion_supported` = 1 WHERE `hypervisor_capabilities`.`hypervisor_type` = 'KVM';
24+
25+
-- Fix OS category for some Ubuntu and RedHat OS-es
26+
UPDATE `cloud`.`guest_os` SET `category_id`='10' WHERE `id`=277 AND display_name="Ubuntu 17.04";
27+
UPDATE `cloud`.`guest_os` SET `category_id`='10' WHERE `id`=278 AND display_name="Ubuntu 17.10";
28+
UPDATE `cloud`.`guest_os` SET `category_id`='10' WHERE `id`=279 AND display_name="Ubuntu 18.04 LTS";
29+
UPDATE `cloud`.`guest_os` SET `category_id`='10' WHERE `id`=280 AND display_name="Ubuntu 18.10";
30+
UPDATE `cloud`.`guest_os` SET `category_id`='10' WHERE `id`=281 AND display_name="Ubuntu 19.04";
31+
UPDATE `cloud`.`guest_os` SET `category_id`='4' WHERE `id`=282 AND display_name="Red Hat Enterprise Linux 7.3";
32+
UPDATE `cloud`.`guest_os` SET `category_id`='4' WHERE `id`=283 AND display_name="Red Hat Enterprise Linux 7.4";
33+
UPDATE `cloud`.`guest_os` SET `category_id`='4' WHERE `id`=284 AND display_name="Red Hat Enterprise Linux 7.5";
34+
UPDATE `cloud`.`guest_os` SET `category_id`='4' WHERE `id`=285 AND display_name="Red Hat Enterprise Linux 7.6";
35+
UPDATE `cloud`.`guest_os` SET `category_id`='4' WHERE `id`=286 AND display_name="Red Hat Enterprise Linux 8.0";
36+

engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/CephSnapshotStrategy.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,18 @@ public StrategyPriority canHandle(Snapshot snapshot, SnapshotOperation op) {
5656
return StrategyPriority.CANT_HANDLE;
5757
}
5858

59-
if (SnapshotOperation.REVERT.equals(op) && isSnapshotStoredOnRbdStoragePool(snapshot)) {
59+
if (!isSnapshotStoredOnRbdStoragePool(snapshot)) {
60+
return StrategyPriority.CANT_HANDLE;
61+
}
62+
63+
if (SnapshotOperation.REVERT.equals(op)) {
6064
return StrategyPriority.HIGHEST;
6165
}
66+
67+
if (SnapshotOperation.DELETE.equals(op)) {
68+
return StrategyPriority.HIGHEST;
69+
}
70+
6271
return StrategyPriority.CANT_HANDLE;
6372
}
6473

engine/storage/snapshot/src/test/java/org/apache/cloudstack/storage/snapshot/CephSnapshotStrategyTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ private void configureAndVerifyCanHandle(Date removed, boolean isSnapshotStoredO
8787
StrategyPriority strategyPriority = cephSnapshotStrategy.canHandle(snapshot, snapshotOps[i]);
8888
if (snapshotOps[i] == SnapshotOperation.REVERT && isSnapshotStoredOnRbdStoragePool) {
8989
Assert.assertEquals(StrategyPriority.HIGHEST, strategyPriority);
90+
} else if (snapshotOps[i] == SnapshotOperation.DELETE && isSnapshotStoredOnRbdStoragePool) {
91+
Assert.assertEquals(StrategyPriority.HIGHEST, strategyPriority);
9092
} else {
9193
Assert.assertEquals(StrategyPriority.CANT_HANDLE, strategyPriority);
9294
}

plugins/storage/volume/default/src/main/java/org/apache/cloudstack/storage/datastore/driver/CloudStackPrimaryDataStoreDriverImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public class CloudStackPrimaryDataStoreDriverImpl implements PrimaryDataStoreDri
8282
@Override
8383
public Map<String, String> getCapabilities() {
8484
Map<String, String> caps = new HashMap<String, String>();
85-
caps.put(DataStoreCapabilities.VOLUME_SNAPSHOT_QUIESCEVM.toString(), "false");
85+
caps.put(DataStoreCapabilities.VOLUME_SNAPSHOT_QUIESCEVM.toString(), Boolean.FALSE.toString());
8686
return caps;
8787
}
8888

0 commit comments

Comments
 (0)