Eli Mesika has uploaded a new change for review.

Change subject: core: don't reset custom device props if modified
......................................................................

core: don't reset custom device props if modified

This patch changes the upgrade of CustomDeviceProperties such that if a
customer changes the value of this configuration and after that upgrades
to a new version, the settings for this key for this version will be
preserved.

This will tale affect only when upgrading to other minor version i.e
from 3.5.0 to 3.5.1 for example
For a major version, a new key is generated with the default value

Change-Id: If77c367ec0fea2c9db8475f659b403fee9ded7e4
Bug-Url : https://bugzilla.redhat.com/show_bug.cgi?id=1177803
Signed-off-by: emesika <[email protected]>
---
M packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/67/36567/1

diff --git a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql 
b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
index 9dd1ceb..fabc902 100644
--- a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
+++ b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
@@ -814,8 +814,6 @@
 select fn_db_update_config_value('IsSuspendSupported','{"undefined": "true", 
"x86_64": "true", "ppc64" : "true" }','general');
 
 -- Allow to specify SecurityGroups property for vNICs, containing either an 
empty string or a list of one or more comma seperated UUIDs.
-select fn_db_update_config_value('CustomDeviceProperties', 
'{type=interface;prop={SecurityGroups=^(?:(?:[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12},
 *)*[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}|)$}}', '3.4');
-select fn_db_update_config_value('CustomDeviceProperties', 
'{type=interface;prop={SecurityGroups=^(?:(?:[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12},
 *)*[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}|)$}}', '3.5');
 
 
 
------------------------------------------------------------------------------------
@@ -838,6 +836,9 @@
 -- disable retries for more predictable HA timing:
 select fn_db_update_default_config_value('vdsConnectionTimeout', '180', '2', 
'general', false);
 select fn_db_update_default_config_value('vdsRetries', '3', '0', 'general', 
false);
+-- Custom device properties
+select fn_db_update_default_config_value('CustomDeviceProperties', 
'{type=interface;prop={SecurityGroups=^(?:(?:[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12},
 *)*[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}|)$}}', 
'{type=interface;prop={SecurityGroups=^(?:(?:[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12},
 *)*[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}|)$}}', '3.4', false);
+select fn_db_update_default_config_value('CustomDeviceProperties', 
'{type=interface;prop={SecurityGroups=^(?:(?:[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12},
 *)*[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}|)$}}', 
'{type=interface;prop={SecurityGroups=^(?:(?:[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12},
 *)*[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}|)$}}', '3.5', false);
 
 
------------------------------------------------------------------------------------
 --              Cleanup deprecated configuration values section


-- 
To view, visit http://gerrit.ovirt.org/36567
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If77c367ec0fea2c9db8475f659b403fee9ded7e4
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