diff options
author | Dan Lambright <dlambrig@redhat.com> | 2015-10-26 14:19:24 -0400 |
---|---|---|
committer | Dan Lambright <dlambrig@redhat.com> | 2015-10-30 05:53:32 -0700 |
commit | c360e8d3e33ac02a3bdb11d16fa4f638fc7dea9c (patch) | |
tree | 39ac9e7dc976d7513ffdc025fa2ce9cce86283b9 /xlators/cluster | |
parent | af5e4e4ef75c845149aee4a8fefd50115157a6da (diff) |
cluster/tier dont log error on lookup heal for files on hot tier
This is a backport of 12430
On fix-layout heal files are scanned. Files found are exist on the hot or cold
subvolume. Those not found in the cold tier would exist on the hot. They
should not be flagged as an error.
Replace INFO with TRACE for common tier migration logs. Frequent migration
was growing the log files too quickly.
On migratation failures, do not acrue files towards cycle limit's budget.
> Change-Id: Ie832ee07c43bce5477ae81c939d1fe8416a11615
> BUG: 1275383
> Signed-off-by: Dan Lambright <dlambrig@redhat.com>
> Reviewed-on: http://review.gluster.org/12430
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
> Reviewed-by: Joseph Fernandes
Signed-off-by: Dan Lambright <dlambrig@redhat.com>
Change-Id: Ia1ce5c3ac9c8c43cf3f3f7e0bd6161aa13affe5f
BUG: 1272398
Signed-off-by: Dan Lambright <dlambrig@redhat.com>
Reviewed-on: http://review.gluster.org/12465
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/dht/src/dht-rebalance.c | 15 | ||||
-rw-r--r-- | xlators/cluster/dht/src/tier.c | 27 |
2 files changed, 25 insertions, 17 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 3cb247f1865..41bb0b800f7 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -1179,12 +1179,17 @@ dht_migrate_file (xlator_t *this, loc_t *loc, xlator_t *from, xlator_t *to, gf_defrag_info_t *defrag = NULL; gf_boolean_t clean_src = _gf_false; gf_boolean_t clean_dst = _gf_false; + int log_level = GF_LOG_INFO; defrag = conf->defrag; if (!defrag) goto out; - gf_log (this->name, GF_LOG_INFO, "%s: attempting to move from %s to %s", + if (defrag->tier_conf.is_tier) + log_level = GF_LOG_TRACE; + + gf_log (this->name, + log_level, "%s: attempting to move from %s to %s", loc->path, from->name, to->name); dict = dict_new (); @@ -1552,7 +1557,7 @@ dht_migrate_file (xlator_t *this, loc_t *loc, xlator_t *from, xlator_t *to, ret = -1; } - gf_msg (this->name, GF_LOG_INFO, 0, + gf_msg (this->name, log_level, 0, DHT_MSG_MIGRATE_FILE_COMPLETE, "completed migration of %s from subvolume %s to %s", loc->path, from->name, to->name); @@ -2814,8 +2819,10 @@ gf_fix_layout_tier_attach_lookup (xlator_t *this, ret = syncop_lookup (conf->subvolumes[0], &file_loc, &iatt, NULL, lookup_xdata, NULL); if (ret) { - gf_msg (this->name, GF_LOG_ERROR, 0, DHT_MSG_LOG_TIER_ERROR, - "%s lookup failed", file_loc.path); + /* If the file does not exist on the cold tier than it must */ + /* have been discovered on the hot tier. This is not an error. */ + gf_msg (this->name, GF_LOG_INFO, 0, DHT_MSG_LOG_TIER_STATUS, + "%s lookup to cold tier on attach heal failed", file_loc.path); goto out; } diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c index ecb8709547c..bda4bf799c7 100644 --- a/xlators/cluster/dht/src/tier.c +++ b/xlators/cluster/dht/src/tier.c @@ -110,8 +110,8 @@ tier_check_same_node (xlator_t *this, loc_t *loc, gf_defrag_info_t *defrag) } if (gf_uuid_compare (node_uuid, defrag->node_uuid)) { - gf_msg (this->name, GF_LOG_INFO, 0, DHT_MSG_LOG_TIER_STATUS, - "%s does not belong to this node", loc->path); + gf_msg_trace (this->name, 0, + "%s does not belong to this node", loc->path); ret = 1; goto out; } @@ -489,8 +489,8 @@ tier_migrate_using_query_file (void *_args) goto abort; } - gf_msg (this->name, GF_LOG_INFO, 0, - DHT_MSG_LOG_TIER_STATUS, "Tier %d" + gf_msg_trace (this->name, 0, + "Tier %d" " src_subvol %s file %s", query_cbk_args->is_promotion, src_subvol->name, @@ -548,13 +548,6 @@ tier_migrate_using_query_file (void *_args) defrag->tier_conf.blocks_total; pthread_mutex_unlock (&dm_stat_mutex); } -abort: - loc_wipe(&loc); - loc_wipe(&p_loc); - - token_str = NULL; - token_str = strtok (NULL, delimiter); - GF_FREE (link_str); if ((++total_files > defrag->tier_conf.max_migrate_files) || (total_migrated_bytes > defrag->tier_conf.max_migrate_bytes)) { @@ -566,6 +559,15 @@ abort: total_files); goto out; } + +abort: + loc_wipe(&loc); + loc_wipe(&p_loc); + + token_str = NULL; + token_str = strtok (NULL, delimiter); + GF_FREE (link_str); + } per_file_status = per_link_status; per_file_out: @@ -1032,8 +1034,7 @@ tier_build_migration_qfile (demotion_args_t *args, ret = remove (GET_QFILE_PATH (is_promotion)); if (ret == -1) { - gf_msg (args->this->name, GF_LOG_INFO, 0, - DHT_MSG_LOG_TIER_STATUS, + gf_msg_trace (args->this->name, 0, "Failed to remove %s", GET_QFILE_PATH (is_promotion)); } |