Liron Aravot has uploaded a new change for review. Change subject: Reinitialize DC doesn't connect all hosts to the new master(#880180) ......................................................................
Reinitialize DC doesn't connect all hosts to the new master(#880180) When reinitializing a DC, the user choses a domain which is not attached to the DC to be the new master - therefore ConnectStorageServer should be performed for all of the DC hosts to the new master domain otherwise they will move to non-operational state. Change-Id: I3733b732b37f3a687b24f90bfdb1799757434d75 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=880180 Signed-off-by: Liron Aravot <lara...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RecoveryStoragePoolCommand.java 2 files changed, 19 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/48/9748/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java index 81f04c0..ef3cee8 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java @@ -196,10 +196,14 @@ return commandSucceeded; } + protected boolean performConnectOperations(VDS vds) { + return true; + } + private void connectAndRefreshAllUpHosts(final boolean commandSucceeded) { for (VDS vds : getAllRunningVdssInPool()) { try { - if (!_isLastMaster && commandSucceeded) { + if (!_isLastMaster && commandSucceeded && performConnectOperations(vds)) { try { runVdsCommand( VDSCommandType.RefreshStoragePool, diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RecoveryStoragePoolCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RecoveryStoragePoolCommand.java index 1f3c6ac..a175eef 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RecoveryStoragePoolCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RecoveryStoragePoolCommand.java @@ -7,6 +7,7 @@ import org.ovirt.engine.core.common.businessentities.StorageDomainStatus; import org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId; import org.ovirt.engine.core.common.businessentities.StoragePoolStatus; +import org.ovirt.engine.core.common.businessentities.VDS; import org.ovirt.engine.core.common.businessentities.storage_domains; import org.ovirt.engine.core.common.businessentities.storage_pool_iso_map; import org.ovirt.engine.core.common.errors.VdcBLLException; @@ -82,6 +83,19 @@ } @Override + protected boolean performConnectOperations(VDS vds) { + if (vds.getId().equals(getVds().getId()) + || StorageHelperDirector.getInstance().getItem(getStorageDomain().getstorage_type()) + .ConnectStorageToDomainByVdsId(getNewMaster(false), vds.getId())) { + return true; + } + log.errorFormat("Error while trying connect host {0} to the needed storage server during the reinitialization of Data Center {1}", + vds.getId(), + getStoragePool().getId()); + return false; + } + + @Override protected void executeCommand() { storage_pool_iso_map domainPoolMap = TransactionSupport.executeInNewTransaction( -- To view, visit http://gerrit.ovirt.org/9748 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3733b732b37f3a687b24f90bfdb1799757434d75 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Aravot <lara...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches