Eli Mesika has uploaded a new change for review.

Change subject: core: [RFE]Backup Awareness - Config
......................................................................

core: [RFE]Backup Awareness - Config

Adding backup awareness to engine

Currently backups are offered only as best practice, there is no alert
or event that informs the user that no backup was done or that a long
time passed from the last successful backup and he should backup the
application database again. In case of an accident, this may lead to
long engine downtime and lots of efforts restoring the engine DB if no
backup was done or only an old backup exists

The feature will enable to track backups done using engine-backup
utility and to alert the administrator if a pre-configurable time had
passed from the last successful backup.

Feature page : http://www.ovirt.org/Features/BackupAwareness

This patch adds the configuration values needed for the feature:

BackupCheckPeriodInHours the period on which we check for a fresh backup
 default : 6, set to -1 to disable this feature
BackupAlertPeriodInDays the max number of days allowed without a fresh
backup.
 default : 1

Change-Id: I1ddd8c817742406d8206624599a82d8ff36b26ee
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1188119
Signed-off-by: Eli Mesika <[email protected]>
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
M packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
M packaging/etc/engine-config/engine-config.properties
3 files changed, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/22/39522/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
index 0957b66..fa91077 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
@@ -2096,6 +2096,14 @@
     @DefaultValueAttribute("true")
     NetworkSriovSupported,
 
+    @TypeConverterAttribute(Integer.class)
+    @DefaultValueAttribute("6")
+    BackupCheckPeriodInHours,
+
+    @TypeConverterAttribute(Integer.class)
+    @DefaultValueAttribute("1")
+    BackupAlertPeriodInDays,
+
     Invalid
 
 }
diff --git a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql 
b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
index 96e33f5..875b1d7 100644
--- a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
+++ b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
@@ -117,6 +117,9 @@
 select fn_db_add_config_value('EnableUSBAsDefault','true','general');
 --Handling Enables Host Load Balancing system.
 select fn_db_add_config_value('EnableVdsLoadBalancing','true','general');
+--Handling Backup Awareness.
+select fn_db_add_config_value('BackupCheckPeriodInHours','6','general');
+select fn_db_add_config_value('BackupAlertPeriodInDays','1','general');
 --Handling Engine working mode
 select fn_db_add_config_value('EngineMode','Active','general');
 --Handling Use Default Credentials
diff --git a/packaging/etc/engine-config/engine-config.properties 
b/packaging/etc/engine-config/engine-config.properties
index 6015b7d..4f84de4 100644
--- a/packaging/etc/engine-config/engine-config.properties
+++ b/packaging/etc/engine-config/engine-config.properties
@@ -467,3 +467,9 @@
 GlusterRefreshRateGeoRepStatusInSecs.type=Integer
 GlusterRefreshRateGeoRepDiscoveryInSecs.description=Refresh rate (in seconds) 
for discovery of geo-replication sessions
 GlusterRefreshRateGeoRepDiscoveryInSecs.type=Integer
+# Engine backup awareness
+BackupCheckPeriodInHours.description="Determines the period on which we check 
for a fresh backup - default : 6, set to -1 to disable this feature"
+BackupCheckPeriodInHours.type=Integer
+BackupAlertPeriodInDays.description="Determines the max number of days allowed 
without a fresh backup - default : 1"
+BackupAlertPeriodInDays.type=Integer
+


-- 
To view, visit https://gerrit.ovirt.org/39522
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ddd8c817742406d8206624599a82d8ff36b26ee
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to