summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorBarak Sason Rofman <bsasonro@redhat.com>2020-02-09 15:09:30 +0200
committerBarak Sason Rofman <sason922@gmail.com>2020-03-04 11:40:24 +0200
commit3a9254d4ed5452c6da4401abd9626db6345629b7 (patch)
tree28a7f8796a07b8ce81871d9fe028247f61c883b6 /xlators
parent3e059ec1216535a7866bcb8c3d6dc3cc8047b940 (diff)
downloadglusterfs-3a9254d4ed5452c6da4401abd9626db6345629b7.tar.gz
glusterfs-3a9254d4ed5452c6da4401abd9626db6345629b7.tar.xz
glusterfs-3a9254d4ed5452c6da4401abd9626db6345629b7.zip
dht/rebalance - fixing failure occurace due to rebalance stop
Probelm description: When topping rebalance, the following error messages appear in the rebalance log file: [2020-01-28 14:31:42.452070] W [dht-rebalance.c:3447:gf_defrag_process_dir] 0-distrep-dht: Found error from gf_defrag_get_entry [2020-01-28 14:31:42.452764] E [MSGID: 109111] [dht-rebalance.c:3971:gf_defrag_fix_layout] 0-distrep-dht: gf_defrag_process_dir failed for directory: /0/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31 [2020-01-28 14:31:42.453498] E [MSGID: 109016] [dht-rebalance.c:3906:gf_defrag_fix_layout] 0-distrep-dht: Fix layout failed for /0/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30 In order to avoid seing these error messages, a modification to the error handling mechanism has been made. In addition, several log messages had been added in order to improve debugging efficiency fixes: bz#1800956 Change-Id: Ifc82dae79ab3da9fe22ee25088a2a6b855afcfcf Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 0d68ed53e0..29eb3803cf 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -3443,6 +3443,10 @@ gf_defrag_process_dir(xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
defrag, fd, migrate_data, dir_dfmeta,
xattr_req, &should_commit_hash, perrno);
+ if (defrag->defrag_status == GF_DEFRAG_STATUS_STOPPED) {
+ goto out;
+ }
+
if (ret) {
gf_log(this->name, GF_LOG_WARNING,
"Found "
@@ -3902,6 +3906,10 @@ gf_defrag_fix_layout(xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
ret = gf_defrag_fix_layout(this, defrag, &entry_loc, fix_layout,
migrate_data);
+ if (defrag->defrag_status == GF_DEFRAG_STATUS_STOPPED) {
+ goto out;
+ }
+
if (ret && ret != 2) {
gf_msg(this->name, GF_LOG_ERROR, 0, DHT_MSG_LAYOUT_FIX_FAILED,
"Fix layout failed for %s", entry_loc.path);