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