summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2017-08-30 12:36:11 +0530
committerjiffin tony Thottan <jthottan@redhat.com>2017-09-07 07:09:20 +0000
commit30d787f05fef4c2bd7b0f4a293f683603dca28e6 (patch)
treec976cbe6bb1643d90c2b8c235d592a6352f176fe
parent268bb635aca729a24242412c6f9dd9d5ba2a2654 (diff)
cluster/dht: Log files skipped by rebalance
There was no easy way to find out which files were skipped during a rebalance. Rebalance now logs a message for every skipped file using msgid 109126, making it easier to find all files that were skipped. > BUG: 1480445 > Signed-off-by: N Balachandran <nbalacha@redhat.com> > Reviewed-on: https://review.gluster.org/18021 > Smoke: Gluster Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: hari gowtham <hari.gowtham005@gmail.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: I2cac7db7285e2f82354251f3ea4094827b0daf3e BUG: 1486557 (cherry picked from commit a4c43ba9374b8f75a48d38a032353a0c7d311a73) Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: https://review.gluster.org/18149 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
-rw-r--r--xlators/cluster/dht/src/dht-messages.h9
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c11
2 files changed, 19 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-messages.h b/xlators/cluster/dht/src/dht-messages.h
index b6184eb..dcfd747 100644
--- a/xlators/cluster/dht/src/dht-messages.h
+++ b/xlators/cluster/dht/src/dht-messages.h
@@ -40,7 +40,7 @@
*/
#define GLFS_DHT_BASE GLFS_MSGID_COMP_DHT
-#define GLFS_DHT_NUM_MESSAGES 125
+#define GLFS_DHT_NUM_MESSAGES 126
#define GLFS_MSGID_END (GLFS_DHT_BASE + GLFS_DHT_NUM_MESSAGES + 1)
/* Messages with message IDs */
@@ -1134,5 +1134,12 @@
*/
#define DHT_MSG_UNKNOWN_FOP (GLFS_DHT_BASE + 125)
+/*
+ * @messageid 109126
+ * @diagnosis
+ * @recommendedaction None
+ */
+#define DHT_MSG_MIGRATE_FILE_SKIPPED (GLFS_DHT_BASE + 126)
+
#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
#endif /* _DHT_MESSAGES_H_ */
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 101946a..b81be03 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -2674,6 +2674,11 @@ gf_defrag_migrate_single_file (void *opaque)
defrag->skipped += 1;
}
UNLOCK (&defrag->lock);
+
+ gf_msg (this->name, GF_LOG_INFO, 0,
+ DHT_MSG_MIGRATE_FILE_SKIPPED,
+ "File migration skipped for %s.",
+ entry_loc.path);
}
} else if (fop_errno == ENOTSUP) {
@@ -2684,6 +2689,12 @@ gf_defrag_migrate_single_file (void *opaque)
defrag->skipped += 1;
}
UNLOCK (&defrag->lock);
+
+ gf_msg (this->name, GF_LOG_INFO, 0,
+ DHT_MSG_MIGRATE_FILE_SKIPPED,
+ "File migration skipped for %s.",
+ entry_loc.path);
+
} else if (fop_errno != EEXIST) {
gf_msg (this->name, GF_LOG_ERROR, fop_errno,
DHT_MSG_MIGRATE_FILE_FAILED,