Eli Mesika has posted comments on this change. Change subject: core: set cluster for host registration if null ......................................................................
Patch Set 3: (2 comments) https://gerrit.ovirt.org/#/c/37842/3/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 211: AuditLogDirector.log(logableBase, AuditLogType.HOST_FAILED_REGISTRATION_INVALID_CLUSTER); Line 212: } Line 213: Line 214: private Guid getClusterId() { Line 215: Guid vdsGroupId; > doesn't really matter but i'd do - Done Line 216: if (Guid.Empty.equals(getParameters().getVdsGroupId())) { Line 217: vdsGroupId = Guid.createGuidFromStringDefaultEmpty( Line 218: Config.<String> getValue(ConfigValues.AutoRegistrationDefaultVdsGroupID)); Line 219: log.debug( Line 213: Line 214: private Guid getClusterId() { Line 215: Guid vdsGroupId; Line 216: if (Guid.Empty.equals(getParameters().getVdsGroupId())) { Line 217: vdsGroupId = Guid.createGuidFromStringDefaultEmpty( > what about checking if the groupid exists? why getting until canDoAction if Because we are checking in the next "if" if it is null or empty and if so , we will take the "Default" cluster and if we fail to take the "Default" we are taking the first valid cluster Line 218: Config.<String> getValue(ConfigValues.AutoRegistrationDefaultVdsGroupID)); Line 219: log.debug( Line 220: "RegisterVdsQuery::ExecuteCommand - VdsGroupId received as -1, using AutoRegistrationDefaultVdsGroupID: '{}'", Line 221: vdsGroupId); -- To view, visit https://gerrit.ovirt.org/37842 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5eda0fe04de8338a49000d62338717584518b153 Gerrit-PatchSet: 3 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
