cluster/tier remove suprious log messages on valid failed migration
authorDan Lambright <dlambrig@redhat.com>
Mon, 19 Oct 2015 13:04:07 +0000 (09:04 -0400)
committerDan Lambright <dlambrig@redhat.com>
Mon, 19 Oct 2015 16:56:07 +0000 (09:56 -0700)
On a write to a replica volume, we record in all brick's databases an entry.
When the tier daemon runs, it will only move the file if it is the true
owner of the file as defined by the XATTR_NODE_UUID_KEY.

Change-Id: Ib82717f87a3f94f3d0d9f969773de9e88d6aaf22
BUG: 1273043
Signed-off-by: Dan Lambright <dlambrig@redhat.com>
Reviewed-on: http://review.gluster.org/12391
Reviewed-by: Joseph Fernandes
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
xlators/cluster/dht/src/tier.c

index 860b1f7da9ac96c3d3a1dd0fe6f6a61214113dda..81464a815765240b7990ca48079d30994bfe510e 100644 (file)
@@ -68,6 +68,11 @@ out:
         return ret;
 }
 
+/*
+ * return 0 if the same node.
+ * return 1 if not the same node, but no errors.
+ * return -1 if errors.xs
+ */
 static int
 tier_check_same_node (xlator_t *this, loc_t *loc, gf_defrag_info_t *defrag)
 {
@@ -103,6 +108,7 @@ 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);
+                ret = 1;
                 goto out;
         }
 
@@ -472,7 +478,8 @@ tier_migrate_using_query_file (void *_args)
                                 loc.name);
 
                         if (tier_check_same_node (this, &loc, defrag)) {
-                                per_link_status = -1;
+                                if (ret < 0)
+                                        per_link_status = -1;
                                 goto abort;
                         }