|
|
14f8ab |
From 913a0dc8f1eaa2fb18a6ebd6fcf66f46b48039f1 Mon Sep 17 00:00:00 2001
|
|
|
14f8ab |
From: Mohit Agrawal <moagrawal@redhat.com>
|
|
|
14f8ab |
Date: Wed, 18 Sep 2019 19:11:33 +0530
|
|
|
14f8ab |
Subject: [PATCH 301/302] posix: Brick is going down unexpectedly
|
|
|
14f8ab |
|
|
|
14f8ab |
Problem: In brick_mux environment, while multiple volumes are
|
|
|
14f8ab |
created (1-1000) sometimes brick is going down due to
|
|
|
14f8ab |
health_check thread failure
|
|
|
14f8ab |
|
|
|
14f8ab |
Solution: Ignore EAGAIN error in health_check thread code to
|
|
|
14f8ab |
avoid the issue
|
|
|
14f8ab |
|
|
|
14f8ab |
> Change-Id: Id44c59f8e071a363a14d09d188813a6633855213
|
|
|
14f8ab |
> Fixes: bz#1751907
|
|
|
14f8ab |
> Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
|
|
|
14f8ab |
> (Cherry picked from commit c4d926900dc36f71c04b3f65ceca5150ce0e8c81)
|
|
|
14f8ab |
> (Reviewed on upstream link https://review.gluster.org/#/c/glusterfs/+/23437/)
|
|
|
14f8ab |
|
|
|
14f8ab |
Change-Id: Id44c59f8e071a363a14d09d188813a6633855213
|
|
|
14f8ab |
BUG: 1731826
|
|
|
14f8ab |
Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
|
|
|
14f8ab |
Reviewed-on: https://code.engineering.redhat.com/gerrit/182106
|
|
|
14f8ab |
Tested-by: Mohit Agrawal <moagrawa@redhat.com>
|
|
|
14f8ab |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
14f8ab |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
14f8ab |
---
|
|
|
14f8ab |
xlators/storage/posix/src/posix-helpers.c | 14 ++++++++++----
|
|
|
14f8ab |
1 file changed, 10 insertions(+), 4 deletions(-)
|
|
|
14f8ab |
|
|
|
14f8ab |
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
|
|
|
14f8ab |
index 6a1a35c..35dd3b6 100644
|
|
|
14f8ab |
--- a/xlators/storage/posix/src/posix-helpers.c
|
|
|
14f8ab |
+++ b/xlators/storage/posix/src/posix-helpers.c
|
|
|
14f8ab |
@@ -2108,14 +2108,20 @@ out:
|
|
|
14f8ab |
if (fd != -1) {
|
|
|
14f8ab |
sys_close(fd);
|
|
|
14f8ab |
}
|
|
|
14f8ab |
+
|
|
|
14f8ab |
if (ret && file_path[0]) {
|
|
|
14f8ab |
gf_msg(this->name, GF_LOG_WARNING, errno, P_MSG_HEALTHCHECK_FAILED,
|
|
|
14f8ab |
"%s() on %s returned ret is %d error is %s", op, file_path, ret,
|
|
|
14f8ab |
ret != -1 ? strerror(ret) : strerror(op_errno));
|
|
|
14f8ab |
- gf_event(EVENT_POSIX_HEALTH_CHECK_FAILED,
|
|
|
14f8ab |
- "op=%s;path=%s;error=%s;brick=%s:%s timeout is %d", op,
|
|
|
14f8ab |
- file_path, strerror(op_errno), priv->hostname, priv->base_path,
|
|
|
14f8ab |
- timeout);
|
|
|
14f8ab |
+
|
|
|
14f8ab |
+ if ((op_errno == EAGAIN) || (ret == EAGAIN)) {
|
|
|
14f8ab |
+ ret = 0;
|
|
|
14f8ab |
+ } else {
|
|
|
14f8ab |
+ gf_event(EVENT_POSIX_HEALTH_CHECK_FAILED,
|
|
|
14f8ab |
+ "op=%s;path=%s;error=%s;brick=%s:%s timeout is %d", op,
|
|
|
14f8ab |
+ file_path, strerror(op_errno), priv->hostname,
|
|
|
14f8ab |
+ priv->base_path, timeout);
|
|
|
14f8ab |
+ }
|
|
|
14f8ab |
}
|
|
|
14f8ab |
return ret;
|
|
|
14f8ab |
}
|
|
|
14f8ab |
--
|
|
|
14f8ab |
1.8.3.1
|
|
|
14f8ab |
|