Michael Kublin has posted comments on this change.

Change subject: engine:Validate maximum number of hosts in DC.(#771699)
......................................................................


Patch Set 4: I would prefer that you didn't submit this

(3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java
Line 243:     @Override
Line 244:     public AuditLogType getAuditLogTypeValue() {
Line 245:         return getSucceeded() ? AuditLogType.USER_ADD_VDS : errorType;
Line 246:     }
Line 247: 
where is freeLock()?
Line 248:     @Override
Line 249:     protected Map<String, String> getExclusiveLocks() {
Line 250:         return 
Collections.singletonMap(getVdsGroup().getstorage_pool_id().toString(), 
LockingGroup.POOL_ADD_VDS.name());
Line 251:     }


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java
Line 68: 
Line 69:         if (getTargetCluster() == null) {
Line 70:             
addCanDoActionMessage(VdcBllMessages.VDS_CLUSTER_IS_NOT_VALID);
Line 71:             return false;
Line 72:         }
these check in a wrong place. Look on code in line 78. And I think u can remove 
some null checks
Line 73:         if (getVdsGroup().getstorage_pool_id() != null && 
!getVdsGroup().getstorage_pool_id().equals(getTargetCluster().getId())
Line 74:                 && 
reachedMaxNumOfVdsInPool(getTargetCluster().getId().getValue())) {
Line 75:             
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_EXCEEDED_MAXIMUM_NUMBER_OF_HOSTS_IN_DATA_CENTER);
Line 76:             return false;


Line 133:                 
DbFacade.getInstance().getVdsStaticDAO().update(staticData);
Line 134:                 getCompensationContext().stateChanged();
Line 135:                 return null;
Line 136:             }
Line 137:         });
freeLock()?
Line 138: 
Line 139:         if (getSourceCluster().supportsGlusterService() && 
getClusterUtils().hasServers(getSourceCluster().getId())) {
Line 140:             if (!glusterHostRemove(getSourceCluster().getId())) {
Line 141:                 return;


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie1ef2ce160bc9ee4855b310c9d170ef7c14a0a17
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to