Michael Kublin has posted comments on this change.

Change subject: core: wip: initVdsOnUp - reconstructs and host status.
......................................................................


Patch Set 5: No score

(3 inline comments)

Stop working on this , moved to Liron, some comments inside

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java
Line 175: 
Line 176:     private EventResult runConnectHostToPoolEvent(final Guid 
storagePoolId, final VDS vds) {
Line 177:         EventResult result = new EventResult(true, 
EventType.VDSCONNECTTOPOOL);
Line 178:         storage_pool storagePool = 
getStoragePoolDAO().get(storagePoolId);
Line 179:         Guid masterDomainIdFromDb = 
getStorageDomainDAO().getMasterStorageDomainIdForPool(storagePoolId);
please change API, you can get a master domain here, you don't need get id 
separetly
Line 180:         StorageDomain masterDomain = 
getStorageDomainDAO().getForStoragePool(masterDomainIdFromDb, storagePoolId);
Line 181:         try {
Line 182:             runVdsCommand(VDSCommandType.ConnectStoragePool,
Line 183:                     new 
ConnectStoragePoolVDSCommandParameters(vds.getId(), storagePoolId,


Line 183:                     new 
ConnectStoragePoolVDSCommandParameters(vds.getId(), storagePoolId,
Line 184:                             vds.getVdsSpmId(), masterDomainIdFromDb,
Line 185:                             
storagePool.getmaster_domain_version())).getSucceeded();
Line 186:         } catch (VdcBLLException e) {
Line 187:             boolean isMasterPossiblyUnreachable =
add this check if error is network exception
Line 188:                     masterDomain.getStatus() == 
StorageDomainStatus.InActive || masterDomain.getStatus() == 
StorageDomainStatus.Unknown;
Line 189:             if (e.getErrorCode() == 
VdcBllErrors.StoragePoolWrongMaster
Line 190:                     || (e.getErrorCode() == 
VdcBllErrors.StoragePoolMasterNotFound && isMasterPossiblyUnreachable)) {
Line 191:                 boolean reconstructResult =


Line 186:         } catch (VdcBLLException e) {
Line 187:             boolean isMasterPossiblyUnreachable =
Line 188:                     masterDomain.getStatus() == 
StorageDomainStatus.InActive || masterDomain.getStatus() == 
StorageDomainStatus.Unknown;
Line 189:             if (e.getErrorCode() == 
VdcBllErrors.StoragePoolWrongMaster
Line 190:                     || (e.getErrorCode() == 
VdcBllErrors.StoragePoolMasterNotFound && isMasterPossiblyUnreachable)) {
as agreed , pleaae remove reconstruct
Line 191:                 boolean reconstructResult =
Line 192:                         Backend.getInstance()
Line 193:                                 
.runInternalAction(VdcActionType.ReconstructMasterDomain,
Line 194:                                         new 
ReconstructMasterParameters(vds.getStoragePoolId(),


--
To view, visit http://gerrit.ovirt.org/13709
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6418b9d2826146e1e4ceff4341c6d7cd3a0024af
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to