|
|
233933 |
From 302f3f87c9aa00c17ec3b49a81c8a4441d2bdf5f Mon Sep 17 00:00:00 2001
|
|
|
233933 |
From: Hari Gowtham <hgowtham@redhat.com>
|
|
|
233933 |
Date: Mon, 15 Apr 2019 10:01:40 +0530
|
|
|
233933 |
Subject: [PATCH 097/124] glusterd/tier: while doing an attach tier, the self
|
|
|
233933 |
heal daemon is not getting started
|
|
|
233933 |
|
|
|
233933 |
Problem: on a replicated volume, if attach tier is done,
|
|
|
233933 |
The shd will be restarted. But here the restart fails because of the
|
|
|
233933 |
graph not getting generated properly. The dict which is used for graph
|
|
|
233933 |
creation doesn't get the values copied properly in prepare_shd_volume_options()
|
|
|
233933 |
glusterd_prepare_shd_volume_options_for_tier() fails and skips the copy.
|
|
|
233933 |
|
|
|
233933 |
This patch reverts the changes back to the way it was in 3.4 and
|
|
|
233933 |
help in fixing the issue. Using the old dict_set_str works.
|
|
|
233933 |
|
|
|
233933 |
label: DOWNSTREAM ONLY
|
|
|
233933 |
|
|
|
233933 |
Change-Id: I21534ca177511e018ba76886e899b3b1a4ac4716
|
|
|
233933 |
Signed-off-by: Hari Gowtham <hgowtham@redhat.com>
|
|
|
233933 |
Reviewed-on: https://code.engineering.redhat.com/gerrit/167825
|
|
|
233933 |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
233933 |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
233933 |
---
|
|
|
233933 |
xlators/mgmt/glusterd/src/glusterd-volgen.c | 19 +++++++++++++------
|
|
|
233933 |
1 file changed, 13 insertions(+), 6 deletions(-)
|
|
|
233933 |
|
|
|
233933 |
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
|
|
|
233933 |
index 012f38e..1f53beb 100644
|
|
|
233933 |
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
|
|
|
233933 |
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
|
|
|
233933 |
@@ -4895,14 +4895,21 @@ glusterd_prepare_shd_volume_options_for_tier(glusterd_volinfo_t *volinfo,
|
|
|
233933 |
dict_t *set_dict)
|
|
|
233933 |
{
|
|
|
233933 |
int ret = -1;
|
|
|
233933 |
+ char *key = NULL;
|
|
|
233933 |
|
|
|
233933 |
- ret = volgen_set_shd_key_enable(set_dict, volinfo->tier_info.cold_type);
|
|
|
233933 |
- if (ret)
|
|
|
233933 |
- goto out;
|
|
|
233933 |
+ key = volgen_get_shd_key (volinfo->tier_info.cold_type);
|
|
|
233933 |
+ if (key) {
|
|
|
233933 |
+ ret = dict_set_str (set_dict, key, "enable");
|
|
|
233933 |
+ if (ret)
|
|
|
233933 |
+ goto out;
|
|
|
233933 |
+ }
|
|
|
233933 |
|
|
|
233933 |
- ret = volgen_set_shd_key_enable(set_dict, volinfo->tier_info.hot_type);
|
|
|
233933 |
- if (ret)
|
|
|
233933 |
- goto out;
|
|
|
233933 |
+ key = volgen_get_shd_key (volinfo->tier_info.hot_type);
|
|
|
233933 |
+ if (key) {
|
|
|
233933 |
+ ret = dict_set_str (set_dict, key, "enable");
|
|
|
233933 |
+ if (ret)
|
|
|
233933 |
+ goto out;
|
|
|
233933 |
+ }
|
|
|
233933 |
out:
|
|
|
233933 |
return ret;
|
|
|
233933 |
}
|
|
|
233933 |
--
|
|
|
233933 |
1.8.3.1
|
|
|
233933 |
|