Sahina Bose has posted comments on this change.

Change subject: engine: check if host exists with same name
......................................................................


Patch Set 5: (2 inline comments)

Also, there are similar methods in VDSHandler - isVdsWithSameNameExistStatic, 
isisVdsWithSameHostExistStatic
Can these be used instead of VdsDao calls?

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RegisterVdsQuery.java
Line 347:             }
Line 348:         return returnValue;
Line 349:     }
Line 350: 
Line 351:     private boolean HandleOldVdssWithSameHostName(VDS vdsByUniqueId) {
Maybe out of scope for this patch, but - Is this function required now as 
hostname is unique? Would this scenario arise?
Line 352:         // handle old VDSs with same host_name (IP)
Line 353:         
log.debugFormat("RegisterVdsQuery::HandleOldVdssWithSameHostName - Entering");
Line 354: 
Line 355:         boolean returnValue = true;


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java
Line 60:                     returnValue = false;
Line 61:                     // check that VDS name is not too long
Line 62:                 } else if (vdsName.length() > maxVdsNameLength) {
Line 63:                     
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_NAME_LENGTH_IS_TOO_LONG);
Line 64:                     returnValue = false;
Wouldn't this check fail if name is not updated? I think check against db 
should only be if name's been changed from existing. There's such a check 
further down in the code so this may not be required. Pls check.
Line 65:                 } else if(getDbFacade().getVdsDao().getByName(vdsName) 
!=  null) {
Line 66:                     
addCanDoActionMessage(VdcBllMessages.VDS_TRY_CREATE_WITH_EXISTING_PARAMS);
Line 67:                     returnValue = false;
Line 68:                 } else if (_oldVds.getstatus() != 
VDSStatus.InstallFailed && !_oldVds.gethost_name().equals(hostName)) {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4791d49b128126269d9b2b0c2e9bb35debf5a7ec
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Shireesh Anjal <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to