Maor Lipchuk has posted comments on this change. Change subject: core: fixes to RecoveryStoragePool command ......................................................................
Patch Set 5: (3 inline comments) Is there a test that can be added for this flow? .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RecoveryStoragePoolCommand.java Line 96: try { Line 97: if (StorageHelperDirector.getInstance().getItem(getStorageDomain().getstorage_type()) Line 98: .connectStorageToDomainByVdsId(getNewMaster(false), getVds().getId())) { Line 99: getRecoveryStoragePoolParametersData().setStorageDomainId(getStorageDomainId().getValue()); Line 100: ((EventQueue) EjbUtils.findBean(BeanType.EVENTQUEUE_MANAGER, BeanProxyType.LOCAL)).submitEventSync(new Event(getRecoveryStoragePoolParametersData().getStoragePoolId(), I would refactor this to a seperate method, and move the comment to be java doc. Line 101: _newMasterStorageDomainId, Line 102: null, Line 103: EventType.RECOVERY), Line 104: new Callable<EventResult>() { Line 113: // as is in order to provide the user immediate response whether it's possible to initiate the command when Line 114: // he attempts to run recovery. Line 115: setStorageDomain(null); Line 116: setStoragePool(null); Line 117: if (canDoAction()) { What about messages from CDA if it fails, please log them Line 118: StoragePoolIsoMap domainPoolMap = Line 119: new StoragePoolIsoMap(getRecoveryStoragePoolParametersData() Line 120: .getNewMasterDomainId(), Line 121: getRecoveryStoragePoolParametersData().getStoragePoolId(), Line 126: Line 127: getStoragePool().setstatus(StoragePoolStatus.Problematic); Line 128: executeReconstruct(); Line 129: } Line 130: return new EventResult(reconstructOpSucceeded, EventType.RECONSTRUCT); Please add a comment here, why we return reconstruct although it was recovery event. (For the queue to be cleared) Line 131: } Line 132: }); Line 133: } else { Line 134: getReturnValue().setFault(new VdcFault(new VdcBLLException(VdcBllErrors.StorageServerConnectionError, -- To view, visit http://gerrit.ovirt.org/10549 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9423d880a7d10a5bfa917e415fe41651f9d7e7f1 Gerrit-PatchSet: 5 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: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches