From 76fbeafbf56a61768c81f622b354e3c95a00e986 Mon Sep 17 00:00:00 2001 From: Samikshan Bairagya Date: Mon, 19 Dec 2016 15:07:14 +0530 Subject: glusterd: Get maximum supported op-version in a cluster gluster volume get 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 Reviewed-on: http://review.gluster.org/16283 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Atin Mukherjee --- xlators/mgmt/glusterd/src/glusterd-volume-set.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd-volume-set.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index 5bda3fedd43..b8f92e4fcd5 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -2593,6 +2593,11 @@ struct volopt_map_entry glusterd_volopt_map[] = { .voltype = "mgmt/glusterd", .op_version = GD_OP_VERSION_3_6_0, }, + { + .key = "cluster.max-op-version", + .voltype = "mgmt/glusterd", + .op_version = GD_OP_VERSION_3_10_0, + }, /*Trash translator options */ { .key = "features.trash", .voltype = "features/trash", -- cgit