summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorSanju Rakonde <srakonde@redhat.com>2018-08-01 15:09:08 +0530
committerAtin Mukherjee <amukherj@redhat.com>2018-08-03 09:03:49 +0000
commit93d7f3f2da52b6fb513ad2ff91c5bd0589d1482b (patch)
treea1c4b3319d732851bf5456fbc9b981095909d073 /xlators
parent60f1aeb08df80501caf6b17543592de02d61381f (diff)
glusterd: Bricks of a normal volumes should not attach to gluster_shared_storage bricks
Problem: In a brick multiplexing environment, Bricks of a normal volume created by user are getting attached to the bricks of a volume "gluster_shared_storage" which is created by enabling the enable-shared-storage option. Mounting gluster_shared_storage has strict authentication checks. when we attach bricks of a normal volume to bricks of gluster_shared_storage, mounting the normal volume created by user will fail due to strict authentication checks. Solution: We should not attach bricks of a normal volume to brick process of gluster_shared_storage volume and vice versa. fixes: bz#1610726 Change-Id: If1b5a2a02675789a2915ba480fb48c145449163d Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 1d4de35fad6..bc119adf6eb 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -5801,6 +5801,7 @@ find_compat_brick_in_vol (glusterd_conf_t *conf,
int mux_limit = -1;
int ret = -1;
gf_boolean_t brick_status = _gf_false;
+ gf_boolean_t is_shared_storage = _gf_false;
/*
* If comp_vol is provided, we have to check *volume* compatibility
@@ -5808,6 +5809,19 @@ find_compat_brick_in_vol (glusterd_conf_t *conf,
*/
if (comp_vol) {
/*
+ * We should not attach bricks of a normal volume to bricks
+ * of shared storage volume.
+ */
+ if (!strcmp (srch_vol->volname, GLUSTER_SHARED_STORAGE))
+ is_shared_storage = _gf_true;
+
+ if (!strcmp (comp_vol->volname, GLUSTER_SHARED_STORAGE)) {
+ if (!is_shared_storage)
+ return NULL;
+ } else if (is_shared_storage)
+ return NULL;
+
+ /*
* It's kind of a shame that we have to do this check in both
* directions, but an option might only exist on one of the two
* dictionaries and dict_foreach_match will only find that one.