summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index f2c102e7c0b..9fe3b4e16ce 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -6055,6 +6055,7 @@ generate_client_volfiles (glusterd_volinfo_t *volinfo,
int i = 0;
int ret = -1;
char filepath[PATH_MAX] = {0,};
+ char *volname = NULL;
char *types[] = {NULL, NULL, NULL};
dict_t *dict = NULL;
xlator_t *this = NULL;
@@ -6062,6 +6063,26 @@ generate_client_volfiles (glusterd_volinfo_t *volinfo,
this = THIS;
+ volname = volinfo->is_snap_volume ?
+ volinfo->parent_volname : volinfo->volname;
+
+
+ if (volname && !strcmp (volname, GLUSTER_SHARED_STORAGE) &&
+ client_type != GF_CLIENT_TRUSTED) {
+ /*
+ * shared storage volume cannot be mounted from non trusted
+ * nodes. So we are not creating volfiles for non-trusted
+ * clients for shared volumes as well as snapshot of shared
+ * volumes.
+ */
+
+ ret = 0;
+ gf_msg_debug ("glusterd", 0, "Skipping the non-trusted volfile"
+ "creation for shared storage volume. Volume %s",
+ volname);
+ goto out;
+ }
+
enumerate_transport_reqs (volinfo->transport_type, types);
dict = dict_new ();
if (!dict)