17b94a
From a325e7b3bbe5c1f67b999f375b83d2e2f1b2c1c6 Mon Sep 17 00:00:00 2001
17b94a
From: Sanju Rakonde <srakonde@redhat.com>
17b94a
Date: Tue, 9 Apr 2019 13:56:24 +0530
17b94a
Subject: [PATCH 119/124] glusterd: provide a way to detach failed node
17b94a
17b94a
When a gluster node in trusted storage pool has failed
17b94a
due to hardware issues, volume delete operation fails
17b94a
saying "Not all peers are up" and peer detach for failed
17b94a
node fails saying "Brick(s) with peer <peer_ip> exists
17b94a
in cluster".
17b94a
17b94a
The idea here is to use either replace-brick or remove-brick
17b94a
command to remove all the bricks hosted by failed node and
17b94a
then re-attempting the peer detach. This change adds this
17b94a
trick in peer detach error message.
17b94a
17b94a
> upstream patch : https://review.gluster.org/22534
17b94a
17b94a
>fixes: bz#1697866
17b94a
>Change-Id: I0c58887479d31db603ad8d6535ea9d547880ccc8
17b94a
>Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
17b94a
17b94a
BUG: 1696334
17b94a
Change-Id: I0c58887479d31db603ad8d6535ea9d547880ccc8
17b94a
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
17b94a
Reviewed-on: https://code.engineering.redhat.com/gerrit/168614
17b94a
Tested-by: RHGS Build Bot <nigelb@redhat.com>
17b94a
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
17b94a
---
17b94a
 xlators/mgmt/glusterd/src/glusterd-handler.c | 7 +++++--
17b94a
 1 file changed, 5 insertions(+), 2 deletions(-)
17b94a
17b94a
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
17b94a
index 6147995..af8a8a4 100644
17b94a
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
17b94a
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
17b94a
@@ -4134,8 +4134,11 @@ set_deprobe_error_str(int op_ret, int op_errno, char *op_errstr, char *errstr,
17b94a
 
17b94a
             case GF_DEPROBE_BRICK_EXIST:
17b94a
                 snprintf(errstr, len,
17b94a
-                         "Brick(s) with the peer "
17b94a
-                         "%s exist in cluster",
17b94a
+                         "Peer %s hosts one or more bricks. If the peer is in "
17b94a
+                         "not recoverable state then use either replace-brick "
17b94a
+                         "or remove-brick command with force to remove all "
17b94a
+                         "bricks from the peer and attempt the peer detach "
17b94a
+                         "again.",
17b94a
                          hostname);
17b94a
                 break;
17b94a
 
17b94a
-- 
17b94a
1.8.3.1
17b94a