diff options
author | Kotresh HR <khiremat@redhat.com> | 2015-07-06 15:05:43 +0530 |
---|---|---|
committer | Krishnan Parthasarathi <kparthas@redhat.com> | 2015-07-10 19:29:07 -0700 |
commit | b99dc077873afe90411085006739d1c1832f083b (patch) | |
tree | cc88cef7aa71d1426c7c44c42213498684afd0c8 | |
parent | 23a004d37ba624970f4d6cf9bde694f403397af7 (diff) |
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: 1240616
Change-Id: If10da6921d0c87d6e1c1c4ceba975c4b1e3bf302
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: http://review.gluster.org/11564
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com>
-rw-r--r-- | 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 f7f00868680..2f2ad867a5b 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; |