summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2019-06-06 13:19:29 +0530
committerAtin Mukherjee <amukherj@redhat.com>2019-06-08 02:12:17 +0000
commitecafe78378209ea28201624fca262bfdbd425365 (patch)
tree94d1e0537de2dfccd017eebcc1387a59a7284742 /xlators
parentfdc596731ea49af87a1dfdc4f255459e5fda60aa (diff)
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 <ravishankar@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c11
1 files changed, 11 insertions, 0 deletions
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;
}