From ecafe78378209ea28201624fca262bfdbd425365 Mon Sep 17 00:00:00 2001 From: Ravishankar N Date: Thu, 6 Jun 2019 13:19:29 +0530 Subject: glusterd: store fips-mode-rchecksum option in the info file commit 146e4b45d0ce906ae50fd6941a1efafd133897ea enabled storage.fips-mode-rchecksum option for all new volumes with op-version >=GD_OP_VERSION_7_0 but `gluster vol get $volname storage.fips-mode-rchecksum` was displaying it as 'off'. This patch fixes it. fixes: bz#1717782 Change-Id: Ie09f89838893c5776a3f60569dfe8d409d1494dd Signed-off-by: Ravishankar N --- xlators/mgmt/glusterd/src/glusterd-utils.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'xlators/mgmt') diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index d7ab6cda6d1..5beb13a1420 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -12435,6 +12435,17 @@ glusterd_enable_default_options(glusterd_volinfo_t *volinfo, char *option) } } } + if (conf->op_version >= GD_OP_VERSION_7_0) { + ret = dict_set_dynstr_with_alloc(volinfo->dict, + "storage.fips-mode-rchecksum", "on"); + if (ret) { + gf_msg(this->name, GF_LOG_ERROR, errno, GD_MSG_DICT_SET_FAILED, + "Failed to set option 'storage.fips-mode-rchecksum' " + "on volume %s", + volinfo->volname); + goto out; + } + } out: return ret; } -- cgit