Martin Peřina has uploaded a new change for review. Change subject: core: Add config value to enable to skip fencing if SD is active ......................................................................
core: Add config value to enable to skip fencing if SD is active Adds config value to enable feature to skip fencing of host when it's connected to at least one storage domain. Change-Id: If9f1e480a5cedb7988eba37701c3db7b3950c010 Bug-Url: https://bugzilla.redhat.com/1090799 Signed-off-by: Martin Perina <mper...@redhat.com> --- M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/FeatureSupported.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java M packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql 4 files changed, 26 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/93/30193/1 diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/FeatureSupported.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/FeatureSupported.java index eb7fb20..0174231 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/FeatureSupported.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/FeatureSupported.java @@ -385,4 +385,14 @@ return supportedInConfig(ConfigValues.LiveMergeSupported, version); } + + /** + * @param version + * Compatibility version to check for. + * @return <code>true</code> if skip fencing when host connected to SD feature is supported for the given version. + */ + public static boolean isSkipFencingIfSDActiveSupported(Version version) { + return supportedInConfig(ConfigValues.SkipFencingIfSDActiveSupported, version); + + } } 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 57451bf..b2e276f 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 @@ -1872,5 +1872,12 @@ @OptionBehaviourAttribute(behaviour = OptionBehaviour.CommaSeparatedStringArray) UnsupportedLocalesFilter, + /** + * Feature to skip fencing if host is connected to at least one storage domain + */ + @TypeConverterAttribute(Boolean.class) + @DefaultValueAttribute("false") + SkipFencingIfSDActiveSupported, + Invalid } diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java index 35fec2e..3097698 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java @@ -136,7 +136,8 @@ SpiceFileTransferToggleSupported(ConfigAuthType.User), SpiceCopyPasteToggleSupported(ConfigAuthType.User), DefaultMtu, - LiveMergeSupported(ConfigAuthType.User); + LiveMergeSupported(ConfigAuthType.User), + SkipFencingIfSDActiveSupported; public static enum ConfigAuthType { Admin, diff --git a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql index e3855c9..aa80f2f 100644 --- a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql +++ b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql @@ -789,6 +789,13 @@ select fn_db_add_config_value('CSRFProtection','false','general'); +select fn_db_add_config_value('SkipFencingIfSDActiveSupported', 'false', '3.0'); +select fn_db_add_config_value('SkipFencingIfSDActiveSupported', 'false', '3.1'); +select fn_db_add_config_value('SkipFencingIfSDActiveSupported', 'false', '3.2'); +select fn_db_add_config_value('SkipFencingIfSDActiveSupported', 'false', '3.3'); +select fn_db_add_config_value('SkipFencingIfSDActiveSupported', 'false', '3.4'); +select fn_db_add_config_value('SkipFencingIfSDActiveSupported', 'true', '3.5'); + ------------------------------------------------------------------------------------ -- Update with override section ------------------------------------------------------------------------------------ -- To view, visit http://gerrit.ovirt.org/30193 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9f1e480a5cedb7988eba37701c3db7b3950c010 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Peřina <mper...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches