Piotr Kliczewski has uploaded a new change for review. Change subject: jsonrpc: Disconnecting from vdsm for maintanace ......................................................................
jsonrpc: Disconnecting from vdsm for maintanace Jsonrpc client maintains connection with vdsm so when maintanace mode is set we need to disconnect and reconnect on activation of the host. Bug-Url: https://bugzilla.redhat.com/1115044 Change-Id: I3ed4a9c88204dff120914384497e1d6034645fae Signed-off-by: pkliczewski <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ActivateVdsCommand.java M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java 2 files changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/51/29651/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ActivateVdsCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ActivateVdsCommand.java index 265a5cf..81bca04 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ActivateVdsCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ActivateVdsCommand.java @@ -12,6 +12,7 @@ import org.ovirt.engine.core.common.businessentities.HaMaintenanceMode; import org.ovirt.engine.core.common.businessentities.VDS; import org.ovirt.engine.core.common.businessentities.VDSStatus; +import org.ovirt.engine.core.common.businessentities.VdsProtocol; import org.ovirt.engine.core.common.businessentities.network.Network; import org.ovirt.engine.core.common.errors.VdcBllMessages; import org.ovirt.engine.core.common.locks.LockingGroup; @@ -23,6 +24,7 @@ import org.ovirt.engine.core.utils.lock.EngineLock; import org.ovirt.engine.core.utils.transaction.TransactionMethod; import org.ovirt.engine.core.utils.transaction.TransactionSupport; +import org.ovirt.engine.core.vdsbroker.ResourceManager; @LockIdNameAttribute @NonTransactiveCommandAttribute @@ -50,6 +52,9 @@ final VDS vds = getVds(); try (EngineLock monitoringLock = acquireMonitorLock()) { + if (VdsProtocol.STOMP.equals(getVds().getProtocol())) { + ResourceManager.getInstance().AddVds(vds, false); + } ExecutionHandler.updateSpecificActionJobCompleted(vds.getId(), VdcActionType.MaintenanceVds, false); setSucceeded(runVdsCommand(VDSCommandType.SetVdsStatus, new SetVdsStatusVDSCommandParameters(getVdsId(), VDSStatus.Unassigned)).getSucceeded() diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java index a4e7578..96d4b07 100644 --- a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java +++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java @@ -23,6 +23,7 @@ import org.ovirt.engine.core.common.businessentities.VMStatus; import org.ovirt.engine.core.common.businessentities.VdsDynamic; import org.ovirt.engine.core.common.businessentities.VdsNumaNode; +import org.ovirt.engine.core.common.businessentities.VdsProtocol; import org.ovirt.engine.core.common.businessentities.VdsSpmStatus; import org.ovirt.engine.core.common.businessentities.VdsStatistics; import org.ovirt.engine.core.common.businessentities.VmDynamic; @@ -262,6 +263,10 @@ if (_vds != null && _vds.getStatus() != VDSStatus.Maintenance) { storagePoolId = _vds.getStoragePoolId(); domainsList = _vds.getDomains(); + } else { + if (VdsProtocol.STOMP.equals(_vds.getProtocol())) { + ResourceManager.getInstance().RemoveVds(_vds.getId()); + } } } -- To view, visit http://gerrit.ovirt.org/29651 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ed4a9c88204dff120914384497e1d6034645fae Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Piotr Kliczewski <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
