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