We should compare node id with node_id_cmp() (the bug was introduced in 5fed9d696c70).
Cc: Saeki Masaki <[email protected]> Signed-off-by: Hitoshi Mitake <[email protected]> --- sheep/group.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sheep/group.c b/sheep/group.c index 2034300..85b9249 100644 --- a/sheep/group.c +++ b/sheep/group.c @@ -1360,12 +1360,8 @@ int create_cluster(int port, int64_t zone, int nr_vnodes, if (!is_cluster_autovnodes(&sys->cinfo)) { for (i = 0; i < nr_nodes; i++) { - if ((addr_to_str(sys->this_node.nid.addr, - sys->this_node.nid.port) - == addr_to_str(sys->cinfo.nodes[i].nid.addr, - sys->cinfo.nodes[i].nid.port)) - && (sys->this_node.nid.port - == sys->cinfo.nodes[i].nid.port)) { + if (!node_id_cmp(&sys->this_node.nid, + &sys->cinfo.nodes[i].nid)) { vnodes = sys->cinfo.nodes[i].nr_vnodes; break; } -- 1.9.1 -- sheepdog mailing list [email protected] https://lists.wpkg.org/mailman/listinfo/sheepdog
