Frank Kobzik has uploaded a new change for review. Change subject: [wip] core: Remove Windows ProductKey* from db ......................................................................
[wip] core: Remove Windows ProductKey* from db This patch removes ProductKey* values from db and config as their role has been replaced by osinfo mechanism. TODO: - script that transforms old db values into osinfo config file to prevent losing old product keys. Change-Id: I876894e7ba5fcd28ee0d435b4a2561f662140174 Bug-Url: https://bugzilla.redhat.com/1012330 Signed-off-by: Frantisek Kobzik <[email protected]> --- M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java A packaging/dbscripts/upgrade/03_03_0920_drop_product_key.sql M packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql M packaging/etc/engine-config/engine-config.properties 4 files changed, 12 insertions(+), 65 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/43/19743/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 8fdcc4b..8bbc973 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 @@ -152,38 +152,6 @@ @DefaultValueAttribute("30") TimeoutToResetVdsInSeconds(50), @Reloadable - @TypeConverterAttribute(String.class) - @DefaultValueAttribute("") - ProductKey2003(52), - @Reloadable - @TypeConverterAttribute(String.class) - @DefaultValueAttribute("") - ProductKey2003x64(53), - @Reloadable - @TypeConverterAttribute(String.class) - @DefaultValueAttribute("") - ProductKey2008(54), - @Reloadable - @TypeConverterAttribute(String.class) - @DefaultValueAttribute("") - ProductKey2008x64(55), - @Reloadable - @TypeConverterAttribute(String.class) - @DefaultValueAttribute("") - ProductKey2008R2(56), - @Reloadable - @TypeConverterAttribute(String.class) - @DefaultValueAttribute("") - ProductKeyWindow7(57), - @Reloadable - @TypeConverterAttribute(String.class) - @DefaultValueAttribute("") - ProductKeyWindow7x64(58), - @Reloadable - @TypeConverterAttribute(String.class) - @DefaultValueAttribute("") - ProductKey(59), - @Reloadable @TypeConverterAttribute(Integer.class) @DefaultValueAttribute("10") FreeSpaceLow(60), @@ -1195,24 +1163,11 @@ @TypeConverterAttribute(String.class) @DefaultValueAttribute("") - ProductKeyWindows8(402), - - @TypeConverterAttribute(String.class) - @DefaultValueAttribute("") SysPrepWindows8x64Path(403), @TypeConverterAttribute(String.class) @DefaultValueAttribute("") - ProductKeyWindows8x64(404), - - @TypeConverterAttribute(String.class) - @DefaultValueAttribute("") SysPrepWindows2012x64Path(405), - - @TypeConverterAttribute(String.class) - @DefaultValueAttribute("") - ProductKeyWindows2012x64(406), - @TypeConverterAttribute(Boolean.class) @DefaultValueAttribute("false") diff --git a/packaging/dbscripts/upgrade/03_03_0920_drop_product_key.sql b/packaging/dbscripts/upgrade/03_03_0920_drop_product_key.sql new file mode 100644 index 0000000..70ab579 --- /dev/null +++ b/packaging/dbscripts/upgrade/03_03_0920_drop_product_key.sql @@ -0,0 +1,12 @@ +-- Drops columns with Windows product keys as they are in osinfo. +SELECT fn_db_drop_column ('vdc_options', 'ProductKey2003'); +SELECT fn_db_drop_column ('vdc_options', 'ProductKey2003x64'); +SELECT fn_db_drop_column ('vdc_options', 'ProductKey2008'); +SELECT fn_db_drop_column ('vdc_options', 'ProductKey2008R2'); +SELECT fn_db_drop_column ('vdc_options', 'ProductKey2008x64'); +SELECT fn_db_drop_column ('vdc_options', 'ProductKey'); +SELECT fn_db_drop_column ('vdc_options', 'ProductKeyWindow7'); +SELECT fn_db_drop_column ('vdc_options', 'ProductKeyWindow7x64'); +SELECT fn_db_drop_column ('vdc_options', 'ProductKeyWindows8'); +SELECT fn_db_drop_column ('vdc_options', 'ProductKeyWindows8x64'); +SELECT fn_db_drop_column ('vdc_options', 'ProductKeyWindows2012x64'); diff --git a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql index a02d727..a920bfb 100644 --- a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql +++ b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql @@ -401,18 +401,6 @@ select fn_db_add_config_value('PredefinedVMProperties','sap_agent=^(true|false)$;sndbuf=^[0-9]+$;vhost=^(([a-zA-Z0-9_]*):(true|false))(,(([a-zA-Z0-9_]*):(true|false)))*$;viodiskcache=^(none|writeback|writethrough)$','3.1'); select fn_db_add_config_value('PredefinedVMProperties','sap_agent=^(true|false)$;sndbuf=^[0-9]+$;vhost=^(([a-zA-Z0-9_]*):(true|false))(,(([a-zA-Z0-9_]*):(true|false)))*$;viodiskcache=^(none|writeback|writethrough)$','3.2'); select fn_db_add_config_value('PredefinedVMProperties','sap_agent=^(true|false)$;sndbuf=^[0-9]+$;vhost=^(([a-zA-Z0-9_]*):(true|false))(,(([a-zA-Z0-9_]*):(true|false)))*$;viodiskcache=^(none|writeback|writethrough)$','3.3'); -select fn_db_add_config_value('ProductKey2003','','general'); -select fn_db_add_config_value('ProductKey2003x64','','general'); -select fn_db_add_config_value('ProductKey2008','','general'); -select fn_db_add_config_value('ProductKey2008R2','','general'); -select fn_db_add_config_value('ProductKey2008x64','','general'); ---Handling Product Key (for Windows XP) -select fn_db_add_config_value('ProductKey','','general'); -select fn_db_add_config_value('ProductKeyWindow7','','general'); -select fn_db_add_config_value('ProductKeyWindow7x64','','general'); -select fn_db_add_config_value('ProductKeyWindows8','','general'); -select fn_db_add_config_value('ProductKeyWindows8x64','','general'); -select fn_db_add_config_value('ProductKeyWindows2012x64','','general'); select fn_db_add_config_value('ProductRPMVersion','3.0.0.0','general'); select fn_db_add_config_value('QuotaGraceStorage','20','general'); select fn_db_add_config_value('QuotaGraceVdsGroup','20','general'); diff --git a/packaging/etc/engine-config/engine-config.properties b/packaging/etc/engine-config/engine-config.properties index 9fb2088..a00039c 100644 --- a/packaging/etc/engine-config/engine-config.properties +++ b/packaging/etc/engine-config/engine-config.properties @@ -97,14 +97,6 @@ NumberVmRefreshesBeforeSave.description="Number of Virtual Machine Data Refreshes Before Saving to Database" NumberVmRefreshesBeforeSave.type=Integer oVirtISOsRepositoryPath.description="The oVirt Node installation files path" -ProductKey2003.description="Product Key (for Windows 2003)" -ProductKey2003x64.description="Product Key (for Windows 2003 x64)" -ProductKey2008.description="Product Key (for Windows 2008)" -ProductKey2008R2.description="Product Key (for Windows 2008 R2)" -ProductKey2008x64.description="Product Key (for Windows 2008 x64)" -ProductKey.description="Product Key (for Windows XP)" -ProductKeyWindow7.description="Product Key (for Windows 7)" -ProductKeyWindow7x64.description="Product Key (for Windows 7 x64)" ProductRPMVersion.description="oVirt Engine RPM Version" SANWipeAfterDelete.description="Initializing disk image is more secure but it is time consuming and I/O intensive (depends on the size of the image)" SANWipeAfterDelete.validValues=true,false -- To view, visit http://gerrit.ovirt.org/19743 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I876894e7ba5fcd28ee0d435b4a2561f662140174 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Frank Kobzik <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
