|
|
74b1de |
From 243075b593c6fccbffb3e82ffcfdb58acfd68269 Mon Sep 17 00:00:00 2001
|
|
|
74b1de |
From: Mohit Agrawal <moagrawal@redhat.com>
|
|
|
74b1de |
Date: Thu, 22 Aug 2019 15:51:43 +0530
|
|
|
74b1de |
Subject: [PATCH 284/284] posix: log aio_error return codes in
|
|
|
74b1de |
posix_fs_health_check
|
|
|
74b1de |
|
|
|
74b1de |
Problem: Sometime brick is going down to health check thread is
|
|
|
74b1de |
failed without logging error codes return by aio system calls.
|
|
|
74b1de |
As per aio_error man page it returns a positive error number
|
|
|
74b1de |
if the asynchronous I/O operation failed.
|
|
|
74b1de |
|
|
|
74b1de |
Solution: log aio_error return codes in error message
|
|
|
74b1de |
|
|
|
74b1de |
> Change-Id: I2496b1bc16e602b0fd3ad53e211de11ec8c641ef
|
|
|
74b1de |
> Fixes: bz#1744519
|
|
|
74b1de |
> Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
|
|
|
74b1de |
> Reviewed on upstream link https://review.gluster.org/#/c/glusterfs/+/23284/
|
|
|
74b1de |
|
|
|
74b1de |
Change-Id: I2496b1bc16e602b0fd3ad53e211de11ec8c641ef
|
|
|
74b1de |
BUG: 1744518
|
|
|
74b1de |
Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
|
|
|
74b1de |
Reviewed-on: https://code.engineering.redhat.com/gerrit/179211
|
|
|
74b1de |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
74b1de |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
74b1de |
---
|
|
|
74b1de |
xlators/storage/posix/src/posix-helpers.c | 5 ++---
|
|
|
74b1de |
1 file changed, 2 insertions(+), 3 deletions(-)
|
|
|
74b1de |
|
|
|
74b1de |
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
|
|
|
74b1de |
index ef5bfd5..d143d4c 100644
|
|
|
74b1de |
--- a/xlators/storage/posix/src/posix-helpers.c
|
|
|
74b1de |
+++ b/xlators/storage/posix/src/posix-helpers.c
|
|
|
74b1de |
@@ -2025,7 +2025,6 @@ posix_fs_health_check(xlator_t *this)
|
|
|
74b1de |
if (ret != 0) {
|
|
|
74b1de |
op_errno = errno;
|
|
|
74b1de |
op = "aio_write_error";
|
|
|
74b1de |
- ret = -1;
|
|
|
74b1de |
goto out;
|
|
|
74b1de |
}
|
|
|
74b1de |
|
|
|
74b1de |
@@ -2064,7 +2063,6 @@ posix_fs_health_check(xlator_t *this)
|
|
|
74b1de |
if (ret != 0) {
|
|
|
74b1de |
op_errno = errno;
|
|
|
74b1de |
op = "aio_read_error";
|
|
|
74b1de |
- ret = -1;
|
|
|
74b1de |
goto out;
|
|
|
74b1de |
}
|
|
|
74b1de |
|
|
|
74b1de |
@@ -2089,7 +2087,8 @@ out:
|
|
|
74b1de |
}
|
|
|
74b1de |
if (ret && file_path[0]) {
|
|
|
74b1de |
gf_msg(this->name, GF_LOG_WARNING, errno, P_MSG_HEALTHCHECK_FAILED,
|
|
|
74b1de |
- "%s() on %s returned", op, file_path);
|
|
|
74b1de |
+ "%s() on %s returned ret is %d error is %s", op, file_path, ret,
|
|
|
74b1de |
+ ret != -1 ? strerror(ret) : strerror(op_errno));
|
|
|
74b1de |
gf_event(EVENT_POSIX_HEALTH_CHECK_FAILED,
|
|
|
74b1de |
"op=%s;path=%s;error=%s;brick=%s:%s timeout is %d", op,
|
|
|
74b1de |
file_path, strerror(op_errno), priv->hostname, priv->base_path,
|
|
|
74b1de |
--
|
|
|
74b1de |
1.8.3.1
|
|
|
74b1de |
|