Skip to content

change connect glusterd addr filter localhost (#4442)#4443

Open
shenwen2012 wants to merge 2 commits intogluster:develfrom
shenwen2012:devel
Open

change connect glusterd addr filter localhost (#4442)#4443
shenwen2012 wants to merge 2 commits intogluster:develfrom
shenwen2012:devel

Conversation

@shenwen2012
Copy link
Copy Markdown

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: #4442

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 <tanshiping44@gmail.com>
…lusterd-server

change connect glusterd addr filter localhost (gluster#4442)
@gluster-ant
Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

2 similar comments
@gluster-ant
Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@gluster-ant
Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@gluster-ant
Copy link
Copy Markdown
Collaborator

CLANG-FORMAT FAILURE:
Before merging the patch, this diff needs to be considered for passing clang-format

index b34710065..ba7de91a9 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -2830,9 +2830,11 @@ mgmt_rpc_notify(struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event,
                         "Exhausted all volfile servers, Retrying from again!");
                 }
             } else {
-                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);
+                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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

connected to the volfile server too long time when cluster have many node and mount server glusterd restart

2 participants