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