Sahina Bose has posted comments on this change.

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


Patch Set 8: (3 inline comments)

Minor : equals comparison parameter may be incorrect. Please check 
UpdateVdsCommand

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RegisterVdsQuery.java
Line 356:         VDS vds_byHostName = 
DbFacade.getInstance().getVdsDao().getByHostname(
Line 357:                 getParameters().getVdsHostName());
Line 358:         int lastIteratedIndex = 1;
Line 359:         if (vds_byHostName != null) {
Line 360:             log.debugFormat(
{0} here as Allon mentioned
Line 361:                     "RegisterVdsQuery::HandleOldVdssWithSameHostName 
- found VDS with the same host name {1}.  Will try to change their hostname to 
a different value",
Line 362:                     getParameters().getVdsHostName());
Line 363: 
Line 364:             if (vdsByUniqueId == null


Line 432:         List<String> allHostNames = getAllHostNames(vdsDAO.getAll());
Line 433:         boolean hostExistInDB = hostToRegister != null;
Line 434: 
Line 435:         if (host != null) {
Line 436:             log.debugFormat(
{0} here
Line 437:                     "found a VDS with the same name {1}.  Will try to 
register with a new name",
Line 438:                     getParameters().getVdsName());
Line 439: 
Line 440:             String nameToRegister = getParameters().getVdsName();


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java
Line 61:                     returnValue = false;
Line 62:                     // check that VDS name is not too long
Line 63:                 } else if (vdsName.length() > maxVdsNameLength) {
Line 64:                     
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_NAME_LENGTH_IS_TOO_LONG);
Line 65:                     returnValue = false;
getParameters().getvds() or getVdsId() ?
Line 66:                 } else if (vdsByName != null && 
!vdsByName.getId().equals(getParameters().getvds())) {
Line 67:                     
addCanDoActionMessage(VdcBllMessages.VDS_TRY_CREATE_WITH_EXISTING_PARAMS);
Line 68:                     returnValue = false;
Line 69:                 } 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: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <lhorn...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhorn...@redhat.com>
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: Shireesh Anjal <san...@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

Reply via email to