|
|
d1681e |
From d339013984f117159217f48908c517ba32ed278c Mon Sep 17 00:00:00 2001
|
|
|
d1681e |
From: Mohit Agrawal <moagrawa@redhat.com>
|
|
|
d1681e |
Date: Sat, 30 Jun 2018 19:51:34 +0530
|
|
|
d1681e |
Subject: [PATCH 337/351] glusterfs: Brick process is crash at the time of call
|
|
|
d1681e |
server_first_lookup
|
|
|
d1681e |
|
|
|
d1681e |
Problem: Brick process is getting crash while executing test case
|
|
|
d1681e |
tests/bugs/core/bug-1432542-mpx-restart-crash.t
|
|
|
d1681e |
|
|
|
d1681e |
Solution: At the time of initiating connection with brick process by
|
|
|
d1681e |
client brick process call server_setvolume.If cleanup thread
|
|
|
d1681e |
has set cleanup_starting flag after check flag by server_setvolume
|
|
|
d1681e |
then a brick process can crash at the time of calling lookup
|
|
|
d1681e |
on brick root.To avoid crash check cleanup_starting
|
|
|
d1681e |
flag before just call server_first_lookup
|
|
|
d1681e |
|
|
|
d1681e |
> BUG: 1597627
|
|
|
d1681e |
> Change-Id: I12542c124c76429184df34a04c1eae1a30052ca7
|
|
|
d1681e |
> fixes: bz#1597627
|
|
|
d1681e |
> Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
|
|
|
d1681e |
> Note: To test the patch executing test case
|
|
|
d1681e |
> tests/bugs/core/bug-1432542-mpx-restart-crash.t in a loop
|
|
|
d1681e |
> around 100 times
|
|
|
d1681e |
> (Cherry picked from commit dab12ce093628860bf43c3e0c7eaf9099cf7a78f)
|
|
|
d1681e |
> (Reviewed on upstream link https://review.gluster.org/#/c/20427/)
|
|
|
d1681e |
|
|
|
d1681e |
Change-Id: I490d8152e82e254163a2938f75ab0d2f64bc58b4
|
|
|
d1681e |
BUG: 1609724
|
|
|
d1681e |
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
|
|
|
d1681e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/146227
|
|
|
d1681e |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
d1681e |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
d1681e |
---
|
|
|
d1681e |
xlators/protocol/server/src/server-handshake.c | 14 +++++++++++---
|
|
|
d1681e |
1 file changed, 11 insertions(+), 3 deletions(-)
|
|
|
d1681e |
|
|
|
d1681e |
diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c
|
|
|
d1681e |
index a59bcda..12f620c 100644
|
|
|
d1681e |
--- a/xlators/protocol/server/src/server-handshake.c
|
|
|
d1681e |
+++ b/xlators/protocol/server/src/server-handshake.c
|
|
|
d1681e |
@@ -910,9 +910,17 @@ fail:
|
|
|
d1681e |
to client. Very important in case of subdirectory mounts, where if
|
|
|
d1681e |
client is trying to mount a non-existing directory */
|
|
|
d1681e |
if (op_ret >= 0 && client->bound_xl->itable) {
|
|
|
d1681e |
- op_ret = server_first_lookup (this, client, reply);
|
|
|
d1681e |
- if (op_ret == -1)
|
|
|
d1681e |
- op_errno = ENOENT;
|
|
|
d1681e |
+ if (client->bound_xl->cleanup_starting) {
|
|
|
d1681e |
+ op_ret = -1;
|
|
|
d1681e |
+ op_errno = EAGAIN;
|
|
|
d1681e |
+ ret = dict_set_str (reply, "ERROR",
|
|
|
d1681e |
+ "cleanup flag is set for xlator "
|
|
|
d1681e |
+ "before call first_lookup Try again later");
|
|
|
d1681e |
+ } else {
|
|
|
d1681e |
+ op_ret = server_first_lookup (this, client, reply);
|
|
|
d1681e |
+ if (op_ret == -1)
|
|
|
d1681e |
+ op_errno = ENOENT;
|
|
|
d1681e |
+ }
|
|
|
d1681e |
}
|
|
|
d1681e |
|
|
|
d1681e |
rsp = GF_CALLOC (1, sizeof (gf_setvolume_rsp),
|
|
|
d1681e |
--
|
|
|
d1681e |
1.8.3.1
|
|
|
d1681e |
|