cb8e9e
From 41c0ac66b7e9e8a608b1bbaa00180d5c86b69ea0 Mon Sep 17 00:00:00 2001
cb8e9e
From: Kotresh HR <khiremat@redhat.com>
cb8e9e
Date: Mon, 6 Jul 2015 15:05:43 +0530
cb8e9e
Subject: [PATCH 213/234] glusterd/geo-rep: Fix failure of geo-rep pause
cb8e9e
cb8e9e
Geo-replication pause fails if one or more of the nodes
cb8e9e
in the master cluster is not part of master volume.
cb8e9e
If the master volume bricks are not part of the node,
cb8e9e
it should be ignored. The check is added to fix the issue.
cb8e9e
cb8e9e
BUG: 1240196
cb8e9e
Change-Id: Iae08c8141778bfcf0a83723a623b29648e5a17a9
cb8e9e
Reviewed-on: http://review.gluster.org/11549
cb8e9e
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
cb8e9e
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
cb8e9e
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
cb8e9e
Signed-off-by: Kotresh HR <khiremat@redhat.com>
cb8e9e
Reviewed-on: https://code.engineering.redhat.com/gerrit/52479
cb8e9e
Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com>
cb8e9e
Reviewed-by: Venky Shankar <vshankar@redhat.com>
cb8e9e
Tested-by: Venky Shankar <vshankar@redhat.com>
cb8e9e
---
cb8e9e
 xlators/mgmt/glusterd/src/glusterd-geo-rep.c |   21 +++++++++++++++++----
cb8e9e
 1 files changed, 17 insertions(+), 4 deletions(-)
cb8e9e
cb8e9e
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
cb8e9e
index f7f0086..2f2ad86 100644
cb8e9e
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
cb8e9e
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
cb8e9e
@@ -3018,13 +3018,26 @@ glusterd_op_stage_gsync_set (dict_t *dict, char **op_errstr)
cb8e9e
 
cb8e9e
                 ret = glusterd_op_verify_gsync_running (volinfo, slave,
cb8e9e
                                                         conf_path, op_errstr);
cb8e9e
-                if (ret)
cb8e9e
-                        goto out;
cb8e9e
+                if (ret) {
cb8e9e
+                        ret = glusterd_get_local_brickpaths (volinfo,
cb8e9e
+                                                             &path_list);
cb8e9e
+                        if (path_list) {
cb8e9e
+                                ret = -1;
cb8e9e
+                                goto out;
cb8e9e
+                        }
cb8e9e
+                }
cb8e9e
+
cb8e9e
                 if (!is_force) {
cb8e9e
                         ret = gd_pause_resume_validation (type, volinfo, slave,
cb8e9e
                                                           statefile, op_errstr);
cb8e9e
-                        if (ret)
cb8e9e
-                                goto out;
cb8e9e
+                        if (ret) {
cb8e9e
+                                ret = glusterd_get_local_brickpaths (volinfo,
cb8e9e
+                                                                    &path_list);
cb8e9e
+                                if (path_list) {
cb8e9e
+                                        ret = -1;
cb8e9e
+                                        goto out;
cb8e9e
+                                }
cb8e9e
+                        }
cb8e9e
                 }
cb8e9e
                 break;
cb8e9e
 
cb8e9e
-- 
cb8e9e
1.7.1
cb8e9e