Liron Aravot has posted comments on this change. Change subject: core: prevent simultaneous reconstructs on the same pool(#845838) ......................................................................
Patch Set 12: (4 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java Line 54: Line 55: @Override Line 56: protected boolean canDoAction() { Line 57: boolean toReturn = false; Line 58: // if we perform an recovery storage pool comand we should only try to lock the pool will change Line 59: // in order to avoid interrupting automatic processes. Line 60: if (VdcActionType.RecoveryStoragePool.equals(getActionType()) && Line 61: !IrsBrokerCommand.tryLockIrsProxyData(getStoragePool().getId())) { Line 62: // TODO: distinguish between storage pool during reconstruct and deleted storage pool, this message Line 71: } Line 72: } Line 73: Line 74: try { Line 75: toReturn = performChecks(); because I don't want to throw exception in case of validation error (normal flow execution) as it's an expensive operation on java and there's no reason that we will ever reach that catch block (as it will be reached only after some DB error or something like that, it's will be hardly ever reached). Line 76: } catch (Exception e) { Line 77: toReturn = false; Line 78: } finally { Line 79: if (!toReturn) { Line 187: .RunVdsCommand( Line 188: VDSCommandType.MarkPoolInReconstructMode, Line 189: new MarkPoolInReconstructModeVDSCommandParameters(getStoragePoolId() Line 190: .getValue(), ReconstructMarkAction.ClearCache)); Line 191: // if we got here - it mean that the IrsProxyData lock was performed by will change Line 192: // canDoAction() method and that it's still held by this thread. Line 193: IrsBrokerCommand.unLockIrsProxyData(getStoragePool().getId()); Line 194: } Line 195: } .................................................... File backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties Line 330: ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL=Cannot ${action} ${type}. The relevant Storage Domain is inaccessible.\n\ Line 331: -Please handle Storage Domain issues and retry the operation. Line 332: ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL2=Cannot ${action} ${type}. Storage status is ${status}.\n\ Line 333: -Please check Storage Domain and retry the operation. Line 334: ACTION_TYPE_FAILED_STORAGE_POOL_DURING_RECONSTRUCT=Cannot ${action}. Storage Pool is currently being reconstructed. will change Line 335: STORAGE_POOL_REINITIALIZE_WITH_MORE_THAN_ONE_DATA_DOMAIN = Cannot ${action} ${type}.\n\ Line 336: The ${action} action can be performed on a Data Center that has only one Storage Domain in Active/Unknown state. Line 337: ACTION_TYPE_FAILED_STORAGE_POOL_NOT_EXIST= Data Center doesn't exist. Line 338: ACTION_TYPE_FAILED_STORAGE_DOMAIN_NOT_IN_STORAGE_POOL=Cannot ${action} ${type}. The selected Storage Domain is not part of the Data Center. -- To view, visit http://gerrit.ovirt.org/7982 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia0dfb227b014af602e5bd1ab952d7c543992aa0f Gerrit-PatchSet: 12 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Ayal Baron <aba...@redhat.com> Gerrit-Reviewer: Daniel Paikov <pai...@gmail.com> Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com> Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches