diff options
author | Kotresh HR <khiremat@redhat.com> | 2015-01-06 20:26:39 +0530 |
---|---|---|
committer | Krishnan Parthasarathi <kparthas@redhat.com> | 2015-02-16 04:22:18 -0800 |
commit | 8618abaaf07a96c0384db9bd1e7dbbe663f4f24c (patch) | |
tree | 8982056824e7e084f84e2a6bfebdf8e7ac8ca5cd /xlators/mgmt/glusterd/src/glusterd-volgen.c | |
parent | 04c4ec96b88ee6392812a511de32b48bbe63a421 (diff) |
glusterd/geo-rep: Allow replace/remove brick if geo-rep is stopped.
Replace brick:
If geo-replication was configured on a volume, replace brick
used to fail. This patch allows replace brick to go through
if all geo-rep sessions corresponding to that volume is stopped.
Remove brick:
There was no check for geo-replication for remove brick. Enforce
'remove brick commit' to fail if geo-rep session corresponding
to volume is running. Allow 'remove brick commit' only if all of
the geo-rep sessions corresponding to that volume is stopped.
Code is re-organized for better readability.
Change-Id: I02282c2764d8b81e319489c977847e6e437511a4
BUG: 1179638
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/9402
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: ajeet jha <ajha@redhat.com>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 5310e72070e..29b34883a81 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -30,7 +30,7 @@ #include "glusterd-mem-types.h" #include "cli1-xdr.h" #include "glusterd-volgen.h" -#include "glusterd-op-sm.h" +#include "glusterd-geo-rep.h" #include "glusterd-utils.h" #include "run.h" #include "options.h" @@ -1315,7 +1315,7 @@ server_check_marker_off (volgen_graph_t *graph, struct volopt_map_entry *vme, if (ret) { enabled = _gf_false; - ret = glusterd_check_gsync_running (volinfo, &enabled); + glusterd_check_geo_rep_configured (volinfo, &enabled); if (enabled) { gf_log ("", GF_LOG_WARNING, GEOREP" sessions active" @@ -1327,12 +1327,6 @@ server_check_marker_off (volgen_graph_t *graph, struct volopt_map_entry *vme, ret = -1; goto out; } - - if (ret) { - gf_log ("", GF_LOG_WARNING, "Unable to get the status" - " of active gsync session"); - goto out; - } } ret = 0; |