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