Shireesh Anjal has posted comments on this change. Change subject: gluster: resolve hostname before checking ip in db ......................................................................
Patch Set 1: (3 inline comments) Thanks Sahina, new patch-set to follow. .................................................... File backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/gluster/GlusterDBUtils.java Line 81: * Line 82: * @return VDS object for the server if found, else null Line 83: */ Line 84: public VDS getServer(Guid clusterId, String hostnameOrIp) { Line 85: // first check for hostname Done Line 86: List<VDS> servers = getVdsDao().getAllForHostname(hostnameOrIp); Line 87: if (servers.size() > 0) { Line 88: return getServerOfCluster(clusterId, servers); Line 89: } Line 99: // not found Line 100: return null; Line 101: case 1: Line 102: VDS server = getVdsDao().get(ifaces.get(0).getVdsId()); Line 103: if (server != null && server.getVdsGroupId().equals(clusterId)) { Done Line 104: return server; Line 105: } Line 106: return null; Line 107: default: Line 108: // There are multiple servers in the DB having this ip address. Throw an exception so that the gluster Line 109: // manager doesn't try to update/add bricks belonging to such servers Line 110: throw new RuntimeException(String.format("There are multiple servers in DB having same IP address %1$s! " Line 111: + Line 112: "Cannot arrive at correct server id for bricks related to this ip address in cluster %2$s", Done Line 113: hostnameOrIp, Line 114: clusterId)); Line 115: Line 116: } -- To view, visit http://gerrit.ovirt.org/12021 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iab25afc5cb0acb5be288c005d1110c1ad0a54b2d Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shireesh Anjal <san...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Sahina Bose <sab...@redhat.com> Gerrit-Reviewer: Shireesh Anjal <san...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches