summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kparthas@redhat.com>2013-04-12 16:35:51 +0530
committerVijay Bellur <vbellur@redhat.com>2013-04-22 11:13:14 -0700
commit3f22b5bb7069cfff8607320c262702418c731c89 (patch)
tree8f19798d6e1fea85d578e2abdb4cd2206e31c04f /xlators/mgmt/glusterd/src
parenta1db18cf7a6cde96f2e5b920ffbbf88e72a21fd4 (diff)
glusterd: volume-sync needs to work with rejected peers
Change-Id: I970a51d3f62bcf414eb9552a68d1068430b93216 BUG: 950048 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4815 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
index d364596326b..51a89cda865 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -634,7 +634,8 @@ out:
int
-gd_build_peers_list (struct list_head *peers, struct list_head *xact_peers)
+gd_build_peers_list (struct list_head *peers, struct list_head *xact_peers,
+ glusterd_op_t op)
{
glusterd_peerinfo_t *peerinfo = NULL;
int npeers = 0;
@@ -642,7 +643,8 @@ gd_build_peers_list (struct list_head *peers, struct list_head *xact_peers)
list_for_each_entry (peerinfo, peers, uuid_list) {
if (!peerinfo->connected)
continue;
- if (peerinfo->state.state != GD_FRIEND_STATE_BEFRIENDED)
+ if (op != GD_OP_SYNC_VOLUME &&
+ peerinfo->state.state != GD_FRIEND_STATE_BEFRIENDED)
continue;
list_add_tail (&peerinfo->op_peers_list, xact_peers);
@@ -999,7 +1001,7 @@ gd_sync_task_begin (dict_t *op_ctx, rpcsvc_request_t * req)
* the 'cluster' lock*/
glusterd_op_set_op (op);
INIT_LIST_HEAD (&conf->xaction_peers);
- npeers = gd_build_peers_list (&conf->peers, &conf->xaction_peers);
+ npeers = gd_build_peers_list (&conf->peers, &conf->xaction_peers, op);
ret = gd_lock_op_phase (&conf->xaction_peers, op, op_ctx, &op_errstr, npeers);
if (ret)