summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht
diff options
context:
space:
mode:
authorhari gowtham <hgowtham@redhat.com>2016-03-08 16:38:34 +0530
committerDan Lambright <dlambrig@redhat.com>2016-03-14 23:06:01 -0700
commit4d37476f264bdb7e213f302840ac3238dc6d9791 (patch)
treea5549e5d89acc9ae88dbc4d769643428bde8a844 /xlators/cluster/dht
parent40a24f5ab917863d1549508ae9cf31085955d174 (diff)
TIER: stopping the tierd when the volume goes down
If there are large number of files to be migrated and by this time if the volume goes down, then the tierd has to be stopped. But on a huge query file list it keeps checking for each file before stopping. If the volume comes up before the old tierd dies then due to the presence of old tierd new one won't be created. After the old one completes the task, it dies and the status ends up as failed. This patch will check if the status is still running and then let it continue its work. Else it will stop running the tierd. Change-Id: I6522a4e2919e84bf502b99b13873795b9274f3cd BUG: 1315659 Signed-off-by: hari gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/13646 Tested-by: Dan Lambright <dlambrig@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/cluster/dht')
-rw-r--r--xlators/cluster/dht/src/tier.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c
index f35787ec010..007cfc60c5a 100644
--- a/xlators/cluster/dht/src/tier.c
+++ b/xlators/cluster/dht/src/tier.c
@@ -512,6 +512,15 @@ tier_migrate_using_query_file (void *_args)
goto out;
}
+ if (defrag->defrag_status != GF_DEFRAG_STATUS_STARTED) {
+ ret = -1;
+ gf_msg (this->name, GF_LOG_ERROR, 0,
+ DHT_MSG_LOG_TIER_ERROR,
+ "Exiting tier migration as"
+ "defrag status is not started");
+ goto out;
+ }
+
ret = gettimeofday (&current_time, NULL);
if (ret < 0) {
gf_msg (this->name, GF_LOG_ERROR, 0,