Skip to content

Commit

Permalink
change connect glusterd addr filter localhost (gluster#4442)
Browse files Browse the repository at this point in the history
when use localhost(127.0.0.1)  addr mount a volume,  if glusterd is down ,client not change  connect other glusterd server , because socket bind  127.0.0.1 can not connect other node addr success .
so change volume server round-roubin  filter  127.0.0.1 

Fixes: gluster#4442

Signed-off-by: tanshiping <[email protected]>
  • Loading branch information
shenwen2012 authored Dec 19, 2024
1 parent 7663679 commit 01f8c2a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion glusterfsd/src/glusterfsd-mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2830,7 +2830,10 @@ mgmt_rpc_notify(struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event,
"Exhausted all volfile servers, Retrying from again!");
}
} else {
server = list_entry(server->list.next, typeof(*server), list);
char *local_str="127.0.0.1";
if (strncmp(local_str,rpc_trans->myinfo.identifier,strlen(local_str)) != 0) {
server = list_entry(server->list.next, typeof(*server), list);
}
}
ctx->cmd_args.curr_server = server;
ctx->cmd_args.volfile_server = server->volfile_server;
Expand Down

0 comments on commit 01f8c2a

Please sign in to comment.