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