From b1d047caeacbcfac4222759af9d5936b7cfd1d7c Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Thu, 3 Dec 2015 14:54:32 +0530 Subject: glusterd: Disallow peer with existing volumes to be probed in cluster As of now we do allow peer to get added in the trusted storage pool even if it has a volume configured. This is definitely not a supported configuration and can lead to issues as we never claim to support merging clusters. A single node running a standalone volume can be considered as a cluster. Change-Id: Id0cf42d6e5f20d6bfdb7ee19d860eee67c7c45be BUG: 1287992 Signed-off-by: Atin Mukherjee Reviewed-on: http://review.gluster.org/12864 Tested-by: NetBSD Build System Reviewed-by: Kaushal M Tested-by: Gluster Build System --- xlators/mgmt/glusterd/src/glusterd-handshake.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-handshake.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c index 755b7aab555..756e48965c2 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handshake.c +++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c @@ -987,7 +987,7 @@ out: /* Validate if glusterd can serve the management handshake request * * Requests are allowed if, - * - glusterd has no peers, or + * - glusterd has no peers & no volumes, or * - the request came from a known peer * A known peer is identified using the following steps * - the dict is checked for a peer uuid, which if present is matched with the @@ -1007,7 +1007,7 @@ gd_validate_mgmt_hndsk_req (rpcsvc_request_t *req, dict_t *dict) this = THIS; GF_ASSERT (this); - if (!glusterd_have_peers ()) + if (!glusterd_have_peers () && !glusterd_have_volumes ()) return _gf_true; ret = dict_get_str (dict, GD_PEER_ID_KEY, &uuid_str); -- cgit