Yaniv Bronhaim has posted comments on this change. Change subject: core: set cluster for host registration if null ......................................................................
Patch Set 2: Code-Review-1 (2 comments) http://gerrit.ovirt.org/#/c/37842/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RegisterVdsQuery.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RegisterVdsQuery.java: Line 210: vdsGroupId); Line 211: } else { Line 212: vdsGroupId = getParameters().getVdsGroupId(); Line 213: } Line 214: if (vdsGroupId == null || Guid.Empty.equals(vdsGroupId)) { check here also if the groupid that you got is actually exist.. Line 215: // try to get the default cluster id Line 216: VdsGroupDAO dao = DbFacade.getInstance().getVdsGroupDao(); Line 217: VDSGroup cluster = dao.getByName("Default"); Line 218: if (cluster != null) { Line 222: List<VDSGroup> clusters = dao.getAll(); Line 223: if (clusters.size() > 0) { Line 224: vdsGroupId = clusters.get(0).getId(); Line 225: } else { Line 226: log.error("AddVdsCommand: No default or valid cluster was found, host registration failed."); do this outside in caller (executeRegisterVdsCommand) if vdsGroupId == None getQueryReturnValue().setSucceeded(False) report and return Line 227: AuditLogableBase logableBase = new AuditLogableBase(); Line 228: AuditLogDirector.log(logableBase, AuditLogType.HOST_FAILED_REGISTRATION_INVALID_CLUSTER); Line 229: } Line 230: } -- To view, visit http://gerrit.ovirt.org/37842 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5eda0fe04de8338a49000d62338717584518b153 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <[email protected]> Gerrit-Reviewer: Eli Mesika <[email protected]> Gerrit-Reviewer: Oved Ourfali <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
