Michael Kublin has posted comments on this change.

Change subject: core: wip: initVdsOnUp- remove reconstruct and host status.
......................................................................


Patch Set 9: (3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java
Line 181:         try {
Line 182:             runVdsCommand(VDSCommandType.ConnectStoragePool,
Line 183:                     new 
ConnectStoragePoolVDSCommandParameters(vds.getId(), storagePoolId,
Line 184:                             vds.getVdsSpmId(), masterDomain.getId(),
Line 185:                             
storagePool.getmaster_domain_version())).getSucceeded();
remove .getSucceeded();
Line 186:         } catch (VdcBLLException e) {
Line 187:             if (e.getErrorCode() != VdcBllErrors.VDS_NETWORK_ERROR &&
Line 188:                     e.getErrorCode() != VdcBllErrors.PROTOCOL_ERROR
Line 189:                     && (masterDomain.getStatus() == 
StorageDomainStatus.InActive


Line 183:                     new 
ConnectStoragePoolVDSCommandParameters(vds.getId(), storagePoolId,
Line 184:                             vds.getVdsSpmId(), masterDomain.getId(),
Line 185:                             
storagePool.getmaster_domain_version())).getSucceeded();
Line 186:         } catch (VdcBLLException e) {
Line 187:             if (e.getErrorCode() != VdcBllErrors.VDS_NETWORK_ERROR &&
First of all that you wrote a patch that did not work and it is means was not 
verified. (Revision 8)

Second , you wrote a patch that should be fixed. It is difficult for me to 
understand why I will write a code that I will know that I need to fix, in next 
revision...
Did you tried to re base your patch? Please try, you will discover something 
interesting.

Third, you think that a following code looks ok, it is readable, it is easy to 
understand, we are talking about 5 lines of code. I will help you , if can be 
easy, lets think about:
masterDomain.getStatus() != StorageDomainStatus.Active. How cool is that ?

Logging? Something to user, failed to connect, but host will be move to Up at 
any case?

Please try make a patch that will not require additional revision, WIP can not 
be excuse for not good patch, when the whole patch is 20 lines of code and we 
are already in 9 revision...
Line 188:                     e.getErrorCode() != VdcBllErrors.PROTOCOL_ERROR
Line 189:                     && (masterDomain.getStatus() == 
StorageDomainStatus.InActive
Line 190:                     || masterDomain.getStatus() == 
StorageDomainStatus.Unknown)) {
Line 191:                 shouldProceedVdsStats = false;


Line 193:                 log.errorFormat("Could not connect host {0} to pool 
{1}", vds.getName(), storagePool
Line 194:                         .getname());
Line 195:                 result.setSuccess(false);
Line 196:             }
Line 197:         } catch (RuntimeException exp) {
This catch is irrelevant anymore
Line 198:             log.errorFormat("Could not connect host {0} to pool {1}", 
vds.getName(), storagePool
Line 199:                     .getname());
Line 200:             result.setSuccess(false);
Line 201:         }


--
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: 9
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