14f8ab
From 17a2a880290d2038c913c23985df620e3c9741b3 Mon Sep 17 00:00:00 2001
14f8ab
From: Sunny Kumar <sunkumar@redhat.com>
14f8ab
Date: Mon, 16 Mar 2020 15:17:23 +0000
14f8ab
Subject: [PATCH 495/511] geo-rep: descriptive message when worker crashes due
14f8ab
 to EIO
14f8ab
14f8ab
With this patch now you can notice log if it is due to EIO:
14f8ab
14f8ab
[2020-03-16 16:24:48.293837] E [syncdutils(worker /bricks/brick1/mbr3):348:log_raise_exception] <top>: Getting "Input/Output error" is most likely due to a. Brick is down or b. Split brain issue.
14f8ab
[2020-03-16 16:24:48.293915] E [syncdutils(worker /bricks/brick1/mbr3):352:log_raise_exception] <top>: This is expected as per design to keep the consistency of the file system. Once the above issue is resolved geo-rep would automatically proceed further.
14f8ab
14f8ab
>Change-Id: Ie33f2440bc96089731ce12afa8dab91d9550a7ca
14f8ab
>Fixes: #1104
14f8ab
>Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
14f8ab
>Upstream Patch : https://review.gluster.org/c/glusterfs/+/24228/
14f8ab
14f8ab
BUG: 1412494
14f8ab
Change-Id: Ie33f2440bc96089731ce12afa8dab91d9550a7ca
14f8ab
Signed-off-by: srijan-sivakumar <ssivakum@redhat.com>
14f8ab
Reviewed-on: https://code.engineering.redhat.com/gerrit/220874
14f8ab
Tested-by: RHGS Build Bot <nigelb@redhat.com>
14f8ab
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
14f8ab
---
14f8ab
 geo-replication/syncdaemon/syncdutils.py | 13 ++++++++++++-
14f8ab
 1 file changed, 12 insertions(+), 1 deletion(-)
14f8ab
14f8ab
diff --git a/geo-replication/syncdaemon/syncdutils.py b/geo-replication/syncdaemon/syncdutils.py
14f8ab
index f43e13b..d5a94d4 100644
14f8ab
--- a/geo-replication/syncdaemon/syncdutils.py
14f8ab
+++ b/geo-replication/syncdaemon/syncdutils.py
14f8ab
@@ -22,7 +22,7 @@ import socket
14f8ab
 from subprocess import PIPE
14f8ab
 from threading import Lock, Thread as baseThread
14f8ab
 from errno import EACCES, EAGAIN, EPIPE, ENOTCONN, ENOMEM, ECONNABORTED
14f8ab
-from errno import EINTR, ENOENT, ESTALE, EBUSY, ENODATA, errorcode
14f8ab
+from errno import EINTR, ENOENT, ESTALE, EBUSY, ENODATA, errorcode, EIO
14f8ab
 from signal import signal, SIGTERM
14f8ab
 import select as oselect
14f8ab
 from os import waitpid as owaitpid
14f8ab
@@ -346,6 +346,17 @@ def log_raise_exception(excont):
14f8ab
                                                         ECONNABORTED):
14f8ab
             logging.error(lf('Gluster Mount process exited',
14f8ab
                              error=errorcode[exc.errno]))
14f8ab
+        elif isinstance(exc, OSError) and exc.errno == EIO:
14f8ab
+            logging.error("Getting \"Input/Output error\" "
14f8ab
+                          "is most likely due to "
14f8ab
+                          "a. Brick is down or "
14f8ab
+                          "b. Split brain issue.")
14f8ab
+            logging.error("This is expected as per design to "
14f8ab
+                          "keep the consistency of the file system. "
14f8ab
+                          "Once the above issue is resolved "
14f8ab
+                          "geo-replication would automatically "
14f8ab
+                          "proceed further.")
14f8ab
+            logtag = "FAIL"
14f8ab
         else:
14f8ab
             logtag = "FAIL"
14f8ab
         if not logtag and logging.getLogger().isEnabledFor(logging.DEBUG):
14f8ab
-- 
14f8ab
1.8.3.1
14f8ab