summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-hooks.c9
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c28
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-set.c10
-rw-r--r--xlators/nfs/server/src/nfs.c10
4 files changed, 56 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-hooks.c b/xlators/mgmt/glusterd/src/glusterd-hooks.c
index 78730a5645f..a845f540afa 100644
--- a/xlators/mgmt/glusterd/src/glusterd-hooks.c
+++ b/xlators/mgmt/glusterd/src/glusterd-hooks.c
@@ -46,7 +46,7 @@ char glusterd_hook_dirnames[GD_OP_MAX][256] =
[GD_OP_REMOVE_BRICK] = "remove-brick",
[GD_OP_REPLACE_BRICK] = EMPTY,
[GD_OP_SET_VOLUME] = "set",
- [GD_OP_RESET_VOLUME] = EMPTY,
+ [GD_OP_RESET_VOLUME] = "reset",
[GD_OP_SYNC_VOLUME] = EMPTY,
[GD_OP_LOG_ROTATE] = EMPTY,
[GD_OP_GSYNC_CREATE] = "gsync-create",
@@ -277,6 +277,13 @@ glusterd_hooks_add_op_args (runner_t *runner, glusterd_op_t op,
glusterd_hooks_add_hooks_version (runner);
glusterd_hooks_add_op (runner, "add-brick");
glusterd_hooks_add_working_dir (runner, priv);
+ break;
+
+ case GD_OP_RESET_VOLUME:
+ glusterd_hooks_add_hooks_version (runner);
+ glusterd_hooks_add_op (runner, "reset");
+ glusterd_hooks_add_working_dir (runner, priv);
+ break;
default:
break;
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index ecc8f7cafe6..82ff8826843 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -3057,6 +3057,34 @@ nfs_option_handler (volgen_graph_t *graph,
return -1;
}
+ if (! strcmp (vme->option, "!nfs-ganesha.enable")) {
+ ret = gf_asprintf (&aa, "nfs-ganesha.%s.enable",
+ volinfo->volname);
+
+ if (ret != -1) {
+ ret = xlator_set_option (xl, aa, vme->value);
+ GF_FREE (aa);
+ }
+
+ if (ret)
+ return -1;
+ }
+
+ if (! strcmp (vme->option, "!nfs-ganesha.host")) {
+ ret = gf_asprintf (&aa, "nfs-ganesha.%s.host",
+ volinfo->volname);
+
+ if (ret != -1) {
+ ret = xlator_set_option (xl, aa, vme->value);
+ GF_FREE (aa);
+ }
+
+ if (ret)
+ return -1;
+ }
+
+
+
if ( (strcmp (vme->voltype, "nfs/server") == 0) &&
(vme->option && vme->option[0]!='!') ) {
ret = xlator_set_option (xl, vme->option, vme->value);
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index 8998d8478d0..b8eb8a56582 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -1392,6 +1392,16 @@ struct volopt_map_entry glusterd_volopt_map[] = {
.option = "!nfs-disable",
.op_version = 1
},
+ { .key = "nfs-ganesha.enable",
+ .voltype = "nfs/server",
+ .option = "!nfs-ganesha.enable",
+ .op_version = 4
+ },
+ { .key = "nfs-ganesha.host",
+ .voltype = "nfs/server",
+ .option = "!nfs-ganesha.host",
+ .op_version = 4
+ },
{ .key = "nfs.nlm",
.voltype = "nfs/server",
.option = "nfs.nlm",
diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c
index 918e8631255..65814ebc17c 100644
--- a/xlators/nfs/server/src/nfs.c
+++ b/xlators/nfs/server/src/nfs.c
@@ -1827,6 +1827,16 @@ struct volume_options options[] = {
.description = "This option is used to start or stop the NFS server "
"for individual volumes."
},
+ { .key = {"nfs-ganesha.*.host"},
+ .type = GF_OPTION_TYPE_INTERNET_ADDRESS_LIST,
+ .default_value = "none",
+ .description = "Set nfs-ganesha host IP"
+ },
+ { .key = {"nfs-ganesha.*.enable"},
+ .type = GF_OPTION_TYPE_BOOL,
+ .default_value = "off",
+ .description = "This option, if set to 'on', enables exports via nfs-ganesha "
+ },
{ .key = {"nfs.nlm"},
.type = GF_OPTION_TYPE_BOOL,