summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2010-10-04 11:19:23 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-10-04 09:59:38 -0700
commit846383acb963b9c74a386192bb5050a9366a8036 (patch)
tree9a25f4dc77741ab6c5cbb674686c540e4fa18386
parentbde5cb81e251032594e2bba57fb4a72c10e32207 (diff)
mgmt/glusterd: cleanup during detach
Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1765 (peer probe on removed-detached bricks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1765
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-sm.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-sm.c b/xlators/mgmt/glusterd/src/glusterd-sm.c
index 268ccaff42e..2e872bb8afa 100644
--- a/xlators/mgmt/glusterd/src/glusterd-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-sm.c
@@ -394,24 +394,32 @@ glusterd_ac_handle_friend_remove_req (glusterd_friend_sm_event_t *event,
glusterd_peerinfo_t *peerinfo = NULL;
glusterd_friend_req_ctx_t *ev_ctx = NULL;
glusterd_friend_sm_event_t *new_event = NULL;
+ glusterd_conf_t *priv = NULL;
GF_ASSERT (ctx);
ev_ctx = ctx;
peerinfo = event->peerinfo;
GF_ASSERT (peerinfo);
+ priv = THIS->private;
+ GF_ASSERT (priv);
+
ret = glusterd_xfer_friend_remove_resp (ev_ctx->req, ev_ctx->hostname,
ev_ctx->port);
- ret = glusterd_friend_sm_new_event (GD_FRIEND_EVENT_REMOVE_FRIEND,
- &new_event);
+ list_for_each_entry (peerinfo, &priv->peers, uuid_list) {
- if (ret)
- goto out;
+ ret = glusterd_friend_sm_new_event (GD_FRIEND_EVENT_REMOVE_FRIEND,
+ &new_event);
+ if (ret)
+ goto out;
- new_event->peerinfo = peerinfo;
+ new_event->peerinfo = peerinfo;
- ret = glusterd_friend_sm_inject_event (new_event);
+ ret = glusterd_friend_sm_inject_event (new_event);
+ if (ret)
+ goto out;
+ }
out:
gf_log ("", GF_LOG_DEBUG, "Returning with %d", ret);