e3c68b
From c001b60047c73e07f42ee858dd8ae19136ecd61b Mon Sep 17 00:00:00 2001
e3c68b
From: Ravishankar N <ravishankar@redhat.com>
e3c68b
Date: Thu, 6 Jun 2019 13:19:29 +0530
e3c68b
Subject: [PATCH 173/178] glusterd: store fips-mode-rchecksum option in the
e3c68b
 info file
e3c68b
e3c68b
commit 146e4b45d0ce906ae50fd6941a1efafd133897ea enabled
e3c68b
storage.fips-mode-rchecksum option for all new volumes with op-version
e3c68b
>=GD_OP_VERSION_7_0 but `gluster vol get $volname
e3c68b
storage.fips-mode-rchecksum` was displaying it as 'off'. This patch fixes it.
e3c68b
e3c68b
>upstream patch link : https://review.gluster.org/#/c/glusterfs/+/22830/
e3c68b
e3c68b
>fixes: bz#1717782
e3c68b
>Change-Id: Ie09f89838893c5776a3f60569dfe8d409d1494dd
e3c68b
>Signed-off-by: Ravishankar N <ravishankar@redhat.com>
e3c68b
e3c68b
BUG: 1715407
e3c68b
Change-Id: Ie09f89838893c5776a3f60569dfe8d409d1494dd
e3c68b
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
e3c68b
Reviewed-on: https://code.engineering.redhat.com/gerrit/172799
e3c68b
Tested-by: RHGS Build Bot <nigelb@redhat.com>
e3c68b
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
e3c68b
---
e3c68b
 xlators/mgmt/glusterd/src/glusterd-utils.c | 11 +++++++++++
e3c68b
 1 file changed, 11 insertions(+)
e3c68b
e3c68b
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
e3c68b
index 2bc4836..7768b8e 100644
e3c68b
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
e3c68b
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
e3c68b
@@ -13124,6 +13124,17 @@ glusterd_enable_default_options(glusterd_volinfo_t *volinfo, char *option)
e3c68b
             }
e3c68b
         }
e3c68b
     }
e3c68b
+    if (conf->op_version >= GD_OP_VERSION_7_0) {
e3c68b
+        ret = dict_set_dynstr_with_alloc(volinfo->dict,
e3c68b
+                                         "storage.fips-mode-rchecksum", "on");
e3c68b
+        if (ret) {
e3c68b
+            gf_msg(this->name, GF_LOG_ERROR, errno, GD_MSG_DICT_SET_FAILED,
e3c68b
+                   "Failed to set option 'storage.fips-mode-rchecksum' "
e3c68b
+                   "on volume %s",
e3c68b
+                   volinfo->volname);
e3c68b
+            goto out;
e3c68b
+        }
e3c68b
+    }
e3c68b
 out:
e3c68b
     return ret;
e3c68b
 }
e3c68b
-- 
e3c68b
1.8.3.1
e3c68b