From 611df914fa31f8a16beff85f0efb7323174fa82c Mon Sep 17 00:00:00 2001 From: Andrija Panic <45762285+andrijapanicsb@users.noreply.github.com> Date: Mon, 30 Mar 2020 19:23:54 +0200 Subject: [PATCH 1/4] Update schema-41310to41400.sql --- .../src/main/resources/META-INF/db/schema-41310to41400.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engine/schema/src/main/resources/META-INF/db/schema-41310to41400.sql b/engine/schema/src/main/resources/META-INF/db/schema-41310to41400.sql index bc0094150fc5..fbf22a601898 100644 --- a/engine/schema/src/main/resources/META-INF/db/schema-41310to41400.sql +++ b/engine/schema/src/main/resources/META-INF/db/schema-41310to41400.sql @@ -19,6 +19,10 @@ -- Schema upgrade from 4.13.1.0 to 4.14.0.0 --; +-- Update the description to indicate this only works with KVM + Ceph +-- (not implemented properly atm for KVM+NFS/local, and it accidentaly works with XS + NFS. Not applicable for VMware) +UPDATE `cloud`.`configuration` SET `description`='Indicates whether to always backup primary storage snapshot to secondary storage. KVM + Ceph only.' WHERE `name`='snapshot.backup.to.secondary'; + -- KVM: enable storage data motion on KVM hypervisor_capabilities UPDATE `cloud`.`hypervisor_capabilities` SET `storage_motion_supported` = 1 WHERE `hypervisor_capabilities`.`hypervisor_type` = 'KVM'; From 4396e67e2e10173ab731912292ea6786626df070 Mon Sep 17 00:00:00 2001 From: Andrija Panic <45762285+andrijapanicsb@users.noreply.github.com> Date: Mon, 30 Mar 2020 19:30:58 +0200 Subject: [PATCH 2/4] update desc --- .../src/main/resources/META-INF/db/schema-41310to41400.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/schema/src/main/resources/META-INF/db/schema-41310to41400.sql b/engine/schema/src/main/resources/META-INF/db/schema-41310to41400.sql index fbf22a601898..8620369e3031 100644 --- a/engine/schema/src/main/resources/META-INF/db/schema-41310to41400.sql +++ b/engine/schema/src/main/resources/META-INF/db/schema-41310to41400.sql @@ -21,7 +21,7 @@ -- Update the description to indicate this only works with KVM + Ceph -- (not implemented properly atm for KVM+NFS/local, and it accidentaly works with XS + NFS. Not applicable for VMware) -UPDATE `cloud`.`configuration` SET `description`='Indicates whether to always backup primary storage snapshot to secondary storage. KVM + Ceph only.' WHERE `name`='snapshot.backup.to.secondary'; +UPDATE `cloud`.`configuration` SET `description`='Indicates whether to always backup primary storage snapshot to secondary storage. Applicable for KVM + Ceph only.' WHERE `name`='snapshot.backup.to.secondary'; -- KVM: enable storage data motion on KVM hypervisor_capabilities UPDATE `cloud`.`hypervisor_capabilities` SET `storage_motion_supported` = 1 WHERE `hypervisor_capabilities`.`hypervisor_type` = 'KVM'; From 09b1ea4fefcc4fc288afb9b5ca0d206de0ce7a50 Mon Sep 17 00:00:00 2001 From: Andrija Panic <45762285+andrijapanicsb@users.noreply.github.com> Date: Mon, 30 Mar 2020 23:31:49 +0200 Subject: [PATCH 3/4] update the config key as well --- .../main/java/com/cloud/storage/snapshot/SnapshotManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/com/cloud/storage/snapshot/SnapshotManager.java b/server/src/main/java/com/cloud/storage/snapshot/SnapshotManager.java index 407ffa302135..ac000fdc2bf0 100644 --- a/server/src/main/java/com/cloud/storage/snapshot/SnapshotManager.java +++ b/server/src/main/java/com/cloud/storage/snapshot/SnapshotManager.java @@ -57,7 +57,7 @@ public interface SnapshotManager extends Configurable { "Time in seconds between retries in backing up snapshot to secondary", false, ConfigKey.Scope.Global, null); public static final ConfigKey BackupSnapshotAfterTakingSnapshot = new ConfigKey(Boolean.class, "snapshot.backup.to.secondary", "Snapshots", "true", - "Indicates whether to always backup primary storage snapshot to secondary storage", false, ConfigKey.Scope.Global, null); + "Indicates whether to always backup primary storage snapshot to secondary storage. Applicable for KVM + Ceph only.", false, ConfigKey.Scope.Global, null); void deletePoliciesForVolume(Long volumeId); From 4dca4c90b306a671baa3c481870cf9a5bd254960 Mon Sep 17 00:00:00 2001 From: Andrija Panic <45762285+andrijapanicsb@users.noreply.github.com> Date: Fri, 3 Apr 2020 21:01:09 +0200 Subject: [PATCH 4/4] Update schema-41310to41400.sql (#4012) * Update schema-41310to41400.sql * update configkey desc --- .../src/main/resources/META-INF/db/schema-41310to41400.sql | 2 +- .../main/java/com/cloud/storage/snapshot/SnapshotManager.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/schema/src/main/resources/META-INF/db/schema-41310to41400.sql b/engine/schema/src/main/resources/META-INF/db/schema-41310to41400.sql index 8620369e3031..baa7bcf96178 100644 --- a/engine/schema/src/main/resources/META-INF/db/schema-41310to41400.sql +++ b/engine/schema/src/main/resources/META-INF/db/schema-41310to41400.sql @@ -21,7 +21,7 @@ -- Update the description to indicate this only works with KVM + Ceph -- (not implemented properly atm for KVM+NFS/local, and it accidentaly works with XS + NFS. Not applicable for VMware) -UPDATE `cloud`.`configuration` SET `description`='Indicates whether to always backup primary storage snapshot to secondary storage. Applicable for KVM + Ceph only.' WHERE `name`='snapshot.backup.to.secondary'; +UPDATE `cloud`.`configuration` SET `description`='Indicates whether to always backup primary storage snapshot to secondary storage. Keeping snapshots only on Primary storage is applicable for KVM + Ceph only.' WHERE `name`='snapshot.backup.to.secondary'; -- KVM: enable storage data motion on KVM hypervisor_capabilities UPDATE `cloud`.`hypervisor_capabilities` SET `storage_motion_supported` = 1 WHERE `hypervisor_capabilities`.`hypervisor_type` = 'KVM'; diff --git a/server/src/main/java/com/cloud/storage/snapshot/SnapshotManager.java b/server/src/main/java/com/cloud/storage/snapshot/SnapshotManager.java index ac000fdc2bf0..c900b2d14ba1 100644 --- a/server/src/main/java/com/cloud/storage/snapshot/SnapshotManager.java +++ b/server/src/main/java/com/cloud/storage/snapshot/SnapshotManager.java @@ -57,7 +57,7 @@ public interface SnapshotManager extends Configurable { "Time in seconds between retries in backing up snapshot to secondary", false, ConfigKey.Scope.Global, null); public static final ConfigKey BackupSnapshotAfterTakingSnapshot = new ConfigKey(Boolean.class, "snapshot.backup.to.secondary", "Snapshots", "true", - "Indicates whether to always backup primary storage snapshot to secondary storage. Applicable for KVM + Ceph only.", false, ConfigKey.Scope.Global, null); + "Indicates whether to always backup primary storage snapshot to secondary storage. Keeping snapshots only on Primary storage is applicable for KVM + Ceph only.", false, ConfigKey.Scope.Global, null); void deletePoliciesForVolume(Long volumeId);