summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix
diff options
context:
space:
mode:
authorMohit Agrawal <moagrawal@redhat.com>2019-09-18 19:11:33 +0530
committerAtin Mukherjee <amukherj@redhat.com>2019-09-26 05:46:55 +0000
commitc4d926900dc36f71c04b3f65ceca5150ce0e8c81 (patch)
tree7ef76b94a4905278638bea75025090d69dcbe149 /xlators/storage/posix
parent0c2d25956b022cb61f0b62873c97b7346ef7c4c3 (diff)
posix: Brick is going down unexpectedly
Problem: In brick_mux environment, while multiple volumes are created (1-1000) sometimes brick is going down due to health_check thread failure Solution: Ignore EAGAIN error in health_check thread code to avoid the issue Change-Id: Id44c59f8e071a363a14d09d188813a6633855213 Fixes: bz#1751907 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
Diffstat (limited to 'xlators/storage/posix')
-rw-r--r--xlators/storage/posix/src/posix-helpers.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
index 6c54490..1d9361a 100644
--- a/xlators/storage/posix/src/posix-helpers.c
+++ b/xlators/storage/posix/src/posix-helpers.c
@@ -2120,14 +2120,20 @@ out:
if (fd != -1) {
sys_close(fd);
}
+
if (ret && file_path[0]) {
gf_msg(this->name, GF_LOG_WARNING, errno, P_MSG_HEALTHCHECK_FAILED,
"%s() on %s returned ret is %d error is %s", op, file_path, ret,
ret != -1 ? strerror(ret) : strerror(op_errno));
- gf_event(EVENT_POSIX_HEALTH_CHECK_FAILED,
- "op=%s;path=%s;error=%s;brick=%s:%s timeout is %d", op,
- file_path, strerror(op_errno), priv->hostname, priv->base_path,
- timeout);
+
+ if ((op_errno == EAGAIN) || (ret == EAGAIN)) {
+ ret = 0;
+ } else {
+ gf_event(EVENT_POSIX_HEALTH_CHECK_FAILED,
+ "op=%s;path=%s;error=%s;brick=%s:%s timeout is %d", op,
+ file_path, strerror(op_errno), priv->hostname,
+ priv->base_path, timeout);
+ }
}
return ret;
}