Blob Blame History Raw
From 41c0ac66b7e9e8a608b1bbaa00180d5c86b69ea0 Mon Sep 17 00:00:00 2001
From: Kotresh HR <khiremat@redhat.com>
Date: Mon, 6 Jul 2015 15:05:43 +0530
Subject: [PATCH 213/234] glusterd/geo-rep: Fix failure of geo-rep pause

Geo-replication pause fails if one or more of the nodes
in the master cluster is not part of master volume.
If the master volume bricks are not part of the node,
it should be ignored. The check is added to fix the issue.

BUG: 1240196
Change-Id: Iae08c8141778bfcf0a83723a623b29648e5a17a9
Reviewed-on: http://review.gluster.org/11549
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/52479
Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
---
 xlators/mgmt/glusterd/src/glusterd-geo-rep.c |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
index f7f0086..2f2ad86 100644
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
@@ -3018,13 +3018,26 @@ glusterd_op_stage_gsync_set (dict_t *dict, char **op_errstr)
 
                 ret = glusterd_op_verify_gsync_running (volinfo, slave,
                                                         conf_path, op_errstr);
-                if (ret)
-                        goto out;
+                if (ret) {
+                        ret = glusterd_get_local_brickpaths (volinfo,
+                                                             &path_list);
+                        if (path_list) {
+                                ret = -1;
+                                goto out;
+                        }
+                }
+
                 if (!is_force) {
                         ret = gd_pause_resume_validation (type, volinfo, slave,
                                                           statefile, op_errstr);
-                        if (ret)
-                                goto out;
+                        if (ret) {
+                                ret = glusterd_get_local_brickpaths (volinfo,
+                                                                    &path_list);
+                                if (path_list) {
+                                        ret = -1;
+                                        goto out;
+                                }
+                        }
                 }
                 break;
 
-- 
1.7.1