Eli Mesika has uploaded a new change for review. Change subject: core: fixing other_dc proxy preference implementation ......................................................................
core: fixing other_dc proxy preference implementation Fencing with proxy from other_dc is actually performed by a proxy in the same dc This patch actually issues two things 1) the selected proxy preferences where not passed by the HostModel so always the "cluster,dc" default was treated 2) when searching for a proxy on other_dc, hosts from the fenced host DC where not filtered out. Change-Id: I0de81858dc9f9b76bd27c75cb47086c884f1d6cd Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1131411 Signed-off-by: Eli Mesika <emes...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceExecutor.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetNewVdsFenceStatusQuery.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/GetNewVdsFenceStatusParameters.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java 4 files changed, 19 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/70/31870/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceExecutor.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceExecutor.java index 95ef4bd..baefdf4 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceExecutor.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceExecutor.java @@ -391,19 +391,23 @@ if (onlyUpHost) { if (filterSelf) { return !vds.getId().equals(_vds.getId()) + && !vds.getStoragePoolId().equals(_vds.getStoragePoolId()) && vds.getStatus() == VDSStatus.Up; } else { - return vds.getStatus() == VDSStatus.Up; + return vds.getStatus() == VDSStatus.Up + && !vds.getStoragePoolId().equals(_vds.getStoragePoolId()); } } else { if (filterSelf) { return !isHostNetworkUnreacable(vds) - && !vds.getId().equals(_vds.getId()); + && !vds.getId().equals(_vds.getId()) + && !vds.getStoragePoolId().equals(_vds.getStoragePoolId()); } else { - return !isHostNetworkUnreacable(vds); + return !isHostNetworkUnreacable(vds) + && !vds.getStoragePoolId().equals(_vds.getStoragePoolId()); } } } diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetNewVdsFenceStatusQuery.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetNewVdsFenceStatusQuery.java index a1a038d..26dba2b 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetNewVdsFenceStatusQuery.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetNewVdsFenceStatusQuery.java @@ -37,6 +37,7 @@ tempVar.setPmSecondaryUser(getParameters().getUser()); tempVar.setPmSecondaryPassword(getParameters().getPassword()); } + tempVar.setPmProxyPreferences(getParameters().getProxyPreferences()); VDS vds = tempVar; FenceExecutor executor = new FenceExecutor(vds, FenceActionType.Status); if (executor.findProxyHost()) { diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/GetNewVdsFenceStatusParameters.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/GetNewVdsFenceStatusParameters.java index bca7a67..86d53da 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/GetNewVdsFenceStatusParameters.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/GetNewVdsFenceStatusParameters.java @@ -91,4 +91,14 @@ public void setOrder(FenceAgentOrder order) { this.order = order; } + + public String getProxyPreferences() { + return proxyPreferences; + } + + public void setProxyPreferences(String proxyPreferences) { + this.proxyPreferences = proxyPreferences; + } + + private String proxyPreferences; } diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java index fa3a748..7eb139b 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java @@ -1619,6 +1619,7 @@ param.setPassword(isPrimary ? getPmPassword().getEntity() : getPmSecondaryPassword().getEntity()); param.setStoragePoolId(cluster.getStoragePoolId() != null ? cluster.getStoragePoolId() : Guid.Empty); param.setFencingOptions(getPmOptionsMap()); + param.setProxyPreferences(getPmProxyPreferences()); Frontend.getInstance().runQuery(VdcQueryType.GetNewVdsFenceStatus, param, new AsyncQuery(this, new INewAsyncCallback() { -- To view, visit http://gerrit.ovirt.org/31870 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0de81858dc9f9b76bd27c75cb47086c884f1d6cd Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <emes...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches