diff options
author | Samikshan Bairagya <samikshan@gmail.com> | 2016-12-19 15:07:14 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2017-01-08 21:16:12 -0800 |
commit | 76fbeafbf56a61768c81f622b354e3c95a00e986 (patch) | |
tree | 0b8959761c59a86067368b6883feef2240578fbe /xlators/mgmt/glusterd/src/glusterd.h | |
parent | 3fcd790d9ca01a95026026d64385c52b5476174d (diff) |
glusterd: Get maximum supported op-version in a cluster
gluster volume get <VOLNAME> cluster.opversion gives us the current
op-version on which the cluster is operating. There is no command
that lets the user know the maximum supported op-version that the
cluster can run on.
This patch adds a new global option cluster.max-op-version, that
can be used to retrieve the maximum supported op-version in a
cluster.
Usage:
# gluster volume get all cluster.max-op-version
Example output:
Option Value
------ -----
cluster.max-op-version 30900
NOTE: The only way to test this feature for now is to set the
GD_OP_VERSION_MAX macro to different values (30800 for 3.8,30900
for 3.9, and so on) and rebuild glusterd. Since the regression test
framework currently doesn't have support to simulate these tests,
there are no accompanying regression tests for this feature. It
should be possible to add tests once glusto comes in and makes it
easier to run a heterogeneous cluster.
Change-Id: I547480ee5e7912664784643e436feb198b6d16d0
BUG: 1365822
Signed-off-by: Samikshan Bairagya <samikshan@gmail.com>
Reviewed-on: http://review.gluster.org/16283
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index d7e5964346e..9d3d867e64c 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -44,6 +44,7 @@ #define GLUSTERD_QUORUM_RATIO_KEY "cluster.server-quorum-ratio" #define GLUSTERD_GLOBAL_OPT_VERSION "global-option-version" #define GLUSTERD_GLOBAL_OP_VERSION_KEY "cluster.op-version" +#define GLUSTERD_MAX_OP_VERSION_KEY "cluster.max-op-version" #define GLUSTERD_COMMON_PEM_PUB_FILE "/geo-replication/common_secret.pem.pub" #define GEO_CONF_MAX_OPT_VALS 6 #define GLUSTERD_CREATE_HOOK_SCRIPT "/hooks/1/gsync-create/post/" \ @@ -123,6 +124,7 @@ typedef enum glusterd_op_ { GD_OP_SCRUB_STATUS, GD_OP_SCRUB_ONDEMAND, GD_OP_RESET_BRICK, + GD_OP_MAX_OPVERSION, GD_OP_MAX, } glusterd_op_t; @@ -1115,6 +1117,8 @@ int glusterd_op_statedump_volume_args_get (dict_t *dict, char **volname, int glusterd_op_gsync_args_get (dict_t *dict, char **op_errstr, char **master, char **slave, char **host_uuid); +int glusterd_op_get_max_opversion (char **op_errstr, dict_t *rsp_dict); + int glusterd_start_volume (glusterd_volinfo_t *volinfo, int flags, gf_boolean_t wait); |