From 3ec6ae1c1fb103df077f44b18604e768fea00ddc Mon Sep 17 00:00:00 2001 From: Susant Palai Date: Thu, 3 May 2018 17:41:16 +0530 Subject: features/cloudsync: Make plugins configurable This patch brings the configuration option for plugins. For new plugins, an entry has to be created in to cs_plugin structure e.g. struct cs_plugin plugins[] = { { .name = "amazons3", .library = "libamazons3.so", .description = "amazon s3 store." }, {.name = NULL}, }; Library field describes the name of the shared library for the plugin. To configure plugin type "feature.cloudsync-storetype" option need to be set to the remote-store type. e.g. gluster volume set VOLNAME cloudsync-storetype amazons3. This should be same as the ".name" field in cs_plugin structure. cs_init will pick this up in run time to load the plugin. Change-Id: I2cec10b206f71ac4e71d472631a3a5badf278b59 fixes: bz#1576842 Signed-off-by: Susant Palai --- xlators/mgmt/glusterd/src/glusterd-volume-set.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'xlators/mgmt/glusterd/src') diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index 0f4df92f07d..4fbc45d7cb3 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -3821,6 +3821,11 @@ struct volopt_map_entry glusterd_volopt_map[] = { .description = "enable/disable utime translator on the volume.", .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT }, + { .key = "feature.cloudsync-storetype", + .voltype = "features/cloudsync", + .op_version = GD_OP_VERSION_4_1_0, + .flags = VOLOPT_FLAG_CLIENT_OPT + }, { .key = NULL } }; -- cgit