|
|
e3c68b |
From f1f27e5839dd99389bef65f79ea491e98e6935d2 Mon Sep 17 00:00:00 2001
|
|
|
e3c68b |
From: Ravishankar N <ravishankar@redhat.com>
|
|
|
e3c68b |
Date: Tue, 23 Apr 2019 18:05:36 +0530
|
|
|
e3c68b |
Subject: [PATCH 133/141] glusterd: enable fips-mode-rchecksum for new volumes
|
|
|
e3c68b |
|
|
|
e3c68b |
...during volume create if the cluster op-version is >=GD_OP_VERSION_7_0.
|
|
|
e3c68b |
|
|
|
e3c68b |
This option itself was introduced in GD_OP_VERSION_4_0_0 via commit 6daa65356.
|
|
|
e3c68b |
We missed enabling it by default for new volume creates in that commit.
|
|
|
e3c68b |
If we are to do it now safely, we need to use op version
|
|
|
e3c68b |
GD_OP_VERSION_7_0 and target it for release-7.
|
|
|
e3c68b |
|
|
|
e3c68b |
Patch in upstream master: https://review.gluster.org/#/c/glusterfs/+/22609/
|
|
|
e3c68b |
BUG: 1706683
|
|
|
e3c68b |
Change-Id: I7c6d4a8abe0816367e7069cb5cad01744f04858f
|
|
|
e3c68b |
fixes: bz#1706683
|
|
|
e3c68b |
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
|
|
|
e3c68b |
Reviewed-on: https://code.engineering.redhat.com/gerrit/169443
|
|
|
e3c68b |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
e3c68b |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
e3c68b |
---
|
|
|
e3c68b |
xlators/mgmt/glusterd/src/glusterd-volgen.c | 13 +++++++++++++
|
|
|
e3c68b |
1 file changed, 13 insertions(+)
|
|
|
e3c68b |
|
|
|
e3c68b |
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
|
|
|
e3c68b |
index da877aa..77aa705 100644
|
|
|
e3c68b |
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
|
|
|
e3c68b |
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
|
|
|
e3c68b |
@@ -1614,10 +1614,17 @@ brick_graph_add_posix(volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
|
|
|
e3c68b |
gf_boolean_t pgfid_feat = _gf_false;
|
|
|
e3c68b |
char *value = NULL;
|
|
|
e3c68b |
xlator_t *xl = NULL;
|
|
|
e3c68b |
+ xlator_t *this = NULL;
|
|
|
e3c68b |
+ glusterd_conf_t *priv = NULL;
|
|
|
e3c68b |
|
|
|
e3c68b |
if (!graph || !volinfo || !set_dict || !brickinfo)
|
|
|
e3c68b |
goto out;
|
|
|
e3c68b |
|
|
|
e3c68b |
+ this = THIS;
|
|
|
e3c68b |
+ GF_VALIDATE_OR_GOTO("glusterd", this, out);
|
|
|
e3c68b |
+ priv = this->private;
|
|
|
e3c68b |
+ GF_VALIDATE_OR_GOTO("glusterd", priv, out);
|
|
|
e3c68b |
+
|
|
|
e3c68b |
ret = glusterd_volinfo_get(volinfo, VKEY_FEATURES_QUOTA, &value);
|
|
|
e3c68b |
if (value) {
|
|
|
e3c68b |
ret = gf_string2boolean(value, "a_enabled);
|
|
|
e3c68b |
@@ -1661,6 +1668,12 @@ brick_graph_add_posix(volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
|
|
|
e3c68b |
}
|
|
|
e3c68b |
}
|
|
|
e3c68b |
|
|
|
e3c68b |
+ if (priv->op_version >= GD_OP_VERSION_7_0) {
|
|
|
e3c68b |
+ ret = xlator_set_fixed_option(xl, "fips-mode-rchecksum", "on");
|
|
|
e3c68b |
+ if (ret) {
|
|
|
e3c68b |
+ goto out;
|
|
|
e3c68b |
+ }
|
|
|
e3c68b |
+ }
|
|
|
e3c68b |
snprintf(tmpstr, sizeof(tmpstr), "%d", brickinfo->fs_share_count);
|
|
|
e3c68b |
ret = xlator_set_fixed_option(xl, "shared-brick-count", tmpstr);
|
|
|
e3c68b |
out:
|
|
|
e3c68b |
--
|
|
|
e3c68b |
1.8.3.1
|
|
|
e3c68b |
|