Eli Mesika has uploaded a new change for review. Change subject: core: custom fencing settings are not save to DB ......................................................................
core: custom fencing settings are not save to DB 3.5 version introduced a new way to define custom fencing agents. However, there is a bug that caused custom PM agent settings not to be saved in DB. The UpdateVdsCommand canDoAction checks for validity of the agent and it comapres the selected agent against all of agents supported natively by the agent. The code was changed to take into account custom PM agents as well in the canDoAction validation Change-Id: If41fb226cbb3a80aa2a524e22756a91553dec1b1 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1122473 Signed-off-by: Eli Mesika <emes...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsCommand.java 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/48/30648/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsCommand.java index 43036d5..a69b7c3 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsCommand.java @@ -36,6 +36,7 @@ import org.ovirt.engine.core.utils.EngineLocalConfig; import org.ovirt.engine.core.utils.ThreadUtils; import org.ovirt.engine.core.utils.lock.EngineLock; +import org.ovirt.engine.core.utils.pm.FenceConfigHelper; import org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil; public abstract class VdsCommand<T extends VdsActionParameters> extends CommandBase<T> { @@ -206,9 +207,9 @@ if (StringUtils.isEmpty(vdsStatic.getPmType())) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_PM_ENABLED_WITHOUT_AGENT); result = false; - } else if (!Regex.IsMatch(Config.<String> getValue(ConfigValues.VdsFenceType, - clusterCompatibilityVersion), String.format("(,|^)%1$s(,|$)", - vdsStatic.getPmType()))) { + } else if (!Regex.IsMatch( + FenceConfigHelper.getFenceConfigurationValue(ConfigValues.VdsFenceType.name(), clusterCompatibilityVersion), + String.format("(,|^)%1$s(,|$)", vdsStatic.getPmType()))) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_AGENT_NOT_SUPPORTED); result = false; } -- To view, visit http://gerrit.ovirt.org/30648 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If41fb226cbb3a80aa2a524e22756a91553dec1b1 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5 Gerrit-Owner: Eli Mesika <emes...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches