summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht
diff options
context:
space:
mode:
authorDan Lambright <dlambrig@redhat.com>2015-10-01 11:05:25 -0400
committerDan Lambright <dlambrig@redhat.com>2015-11-16 04:10:02 -0800
commit6000e1aa344e523aa161427a0b9781e052cd4d97 (patch)
treee42629c23ae695e34aeb6407f0d1b23383762bf7 /xlators/cluster/dht
parent571cbcf56ef865d64ebdb1621c791fe467501e52 (diff)
cluster/tier: Disallow detach commit when detach in progress
1. Check if detach is running, disallow detach commit if so. 2. Cleanup shutdown of tier daemon on detach: do not rerun fix-layout, do not send incorrect status back to glusterd. Change-Id: I97202f748773c1176396a4ffd32a4c7fa9b9c1bc BUG: 1279637 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/12560 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/cluster/dht')
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c3
-rw-r--r--xlators/cluster/dht/src/tier.c9
2 files changed, 5 insertions, 7 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 11164b6586a..7e9ba11fb26 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -3374,9 +3374,6 @@ gf_defrag_start_crawl (void *data)
if (ret)
goto out;
- ret = gf_defrag_fix_layout (this, defrag, &loc,
- fix_layout,
- migrate_data);
}
}
gf_log ("DHT", GF_LOG_INFO, "crawling file-system completed");
diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c
index b37c8edfdd5..e857dace038 100644
--- a/xlators/cluster/dht/src/tier.c
+++ b/xlators/cluster/dht/src/tier.c
@@ -1372,10 +1372,11 @@ tier_start (xlator_t *this, gf_defrag_info_t *defrag)
if (defrag->cmd == GF_DEFRAG_CMD_START_DETACH_TIER) {
ret = 0;
defrag->defrag_status =
- GF_DEFRAG_STATUS_COMPLETE;
- gf_msg_debug (this->name, 0,
- "defrag->defrag_cmd == "
- "GF_DEFRAG_CMD_START_DETACH_TIER");
+ GF_DEFRAG_STATUS_COMPLETE;
+ gf_msg (this->name, GF_LOG_DEBUG, 0,
+ DHT_MSG_LOG_TIER_ERROR,
+ "defrag->defrag_cmd == "
+ "GF_DEFRAG_CMD_START_DETACH_TIER");
goto out;
}