From 3d1a0c2e3787f1c1b6cb1eb45690f36e175e983b Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Wed, 15 Sep 2010 03:28:48 +0000 Subject: error out if a peer is not connected or not in befriended state Signed-off-by: Raghavendra Bhat Signed-off-by: Vijay Bellur BUG: 1603 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1603 --- xlators/mgmt/glusterd/src/glusterd-handler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index 040dff1be..a069e0ec5 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -1180,7 +1180,7 @@ glusterd_handle_create_volume (rpcsvc_request_t *req) err_ret = 1; goto out; } - if ((!peerinfo->connected) && + if ((!peerinfo->connected) || (peerinfo->state.state != GD_FRIEND_STATE_BEFRIENDED)) { snprintf(err_str, 1048, "Host %s not connected", brickinfo->hostname); -- cgit