|
|
256ebe |
From bbcfd7e28b43845bac675dcc486bde09b0953f64 Mon Sep 17 00:00:00 2001
|
|
|
256ebe |
From: Hari Gowtham <hgowtham@redhat.com>
|
|
|
256ebe |
Date: Thu, 11 Apr 2019 14:40:11 +0530
|
|
|
256ebe |
Subject: [PATCH 088/124] tier: fix failures noticed during tier start and tier
|
|
|
256ebe |
restart.
|
|
|
256ebe |
|
|
|
256ebe |
Problem 1: when tier is started using the tier start command,
|
|
|
256ebe |
the out put was skipped during a failure. failures don't have an
|
|
|
256ebe |
transaction id. this id was checked and if its missing then
|
|
|
256ebe |
it skips.
|
|
|
256ebe |
|
|
|
256ebe |
fix: had to remove the unnecessary jump for that case.
|
|
|
256ebe |
|
|
|
256ebe |
problem 2: When tier was restarted, the tierd doesn't come online.
|
|
|
256ebe |
This was because, there were a certain values that were supposed
|
|
|
256ebe |
to be stored in glusterd (gluster-store.c) which will be used
|
|
|
256ebe |
during restart to come to the original state.
|
|
|
256ebe |
These values were stored. as they were missing, tierd didn't come
|
|
|
256ebe |
online.
|
|
|
256ebe |
|
|
|
256ebe |
fix: store the value and make it available during the start.
|
|
|
256ebe |
|
|
|
256ebe |
Label: DOWNSTREAM ONLY
|
|
|
256ebe |
|
|
|
256ebe |
Change-Id: I7df898fa4c3b72fe8ded4adbf573307a59a37e5e
|
|
|
256ebe |
Signed-off-by: Hari Gowtham <hgowtham@redhat.com>
|
|
|
256ebe |
Reviewed-on: https://code.engineering.redhat.com/gerrit/167653
|
|
|
256ebe |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
256ebe |
Reviewed-by: Sanju Rakonde <srakonde@redhat.com>
|
|
|
256ebe |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
256ebe |
---
|
|
|
256ebe |
cli/src/cli-rpc-ops.c | 1 -
|
|
|
256ebe |
xlators/mgmt/glusterd/src/glusterd-store.c | 13 +++++++++++++
|
|
|
256ebe |
2 files changed, 13 insertions(+), 1 deletion(-)
|
|
|
256ebe |
|
|
|
256ebe |
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
|
|
|
256ebe |
index 736cd18..b167e26 100644
|
|
|
256ebe |
--- a/cli/src/cli-rpc-ops.c
|
|
|
256ebe |
+++ b/cli/src/cli-rpc-ops.c
|
|
|
256ebe |
@@ -1973,7 +1973,6 @@ gf_cli_defrag_volume_cbk(struct rpc_req *req, struct iovec *iov, int count,
|
|
|
256ebe |
if (ret) {
|
|
|
256ebe |
gf_log("cli", GF_LOG_WARNING, "failed to get %s from dict",
|
|
|
256ebe |
GF_REBALANCE_TID_KEY);
|
|
|
256ebe |
- goto out;
|
|
|
256ebe |
}
|
|
|
256ebe |
if (rsp.op_ret && strcmp(rsp.op_errstr, "")) {
|
|
|
256ebe |
snprintf(msg, sizeof(msg), "%s", rsp.op_errstr);
|
|
|
256ebe |
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
|
|
|
256ebe |
index 351bd9e..4889217 100644
|
|
|
256ebe |
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
|
|
|
256ebe |
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
|
|
|
256ebe |
@@ -3336,6 +3336,19 @@ glusterd_store_update_volinfo(glusterd_volinfo_t *volinfo)
|
|
|
256ebe |
break;
|
|
|
256ebe |
|
|
|
256ebe |
case GF_CLUSTER_TYPE_TIER:
|
|
|
256ebe |
+ if (volinfo->tier_info.cold_type ==
|
|
|
256ebe |
+ GF_CLUSTER_TYPE_DISPERSE)
|
|
|
256ebe |
+ volinfo->tier_info.cold_dist_leaf_count
|
|
|
256ebe |
+ = volinfo->disperse_count;
|
|
|
256ebe |
+ else
|
|
|
256ebe |
+ volinfo->tier_info.cold_dist_leaf_count
|
|
|
256ebe |
+ = glusterd_calc_dist_leaf_count (
|
|
|
256ebe |
+ volinfo->tier_info.
|
|
|
256ebe |
+ cold_replica_count,
|
|
|
256ebe |
+ 1);
|
|
|
256ebe |
+
|
|
|
256ebe |
+ break;
|
|
|
256ebe |
+
|
|
|
256ebe |
case GF_CLUSTER_TYPE_STRIPE:
|
|
|
256ebe |
case GF_CLUSTER_TYPE_STRIPE_REPLICATE:
|
|
|
256ebe |
gf_msg(this->name, GF_LOG_CRITICAL, ENOTSUP,
|
|
|
256ebe |
--
|
|
|
256ebe |
1.8.3.1
|
|
|
256ebe |
|