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