summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-rebalance.c
diff options
context:
space:
mode:
authorMilind Changire <mchangir@redhat.com>2016-09-05 21:51:19 +0530
committerDan Lambright <dlambrig@redhat.com>2016-09-08 05:32:20 -0700
commitcd23242b8953040b231f402c334f16520ac8029f (patch)
tree38c2c11f64765dabfaaeccd332f8859feb39d44c /xlators/cluster/dht/src/dht-rebalance.c
parent6f182733d943aff5212175c58dd59b2da64b9d8b (diff)
cluster/tier: add tiering events
Add events for: * tier attach and detach * tier pause and resume * tier rising and dropping hi and lo watermarks Update eventskeygen.py with tiering events. Update cli help with: * attach: add optional force argument * detach: make force available as non-optional argument on its own Change-Id: I43990d3a8742151a4a7889bafa19cb572fe661bd BUG: 1368336 Signed-off-by: Milind Changire <mchangir@redhat.com> Reviewed-on: http://review.gluster.org/15232 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-rebalance.c')
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 7275b114745..f7fa267b7f5 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -16,6 +16,7 @@
#include <signal.h>
#include <fnmatch.h>
#include <signal.h>
+#include "events.h"
#define GF_DISK_SECTOR_SIZE 512
@@ -4078,6 +4079,8 @@ gf_defrag_check_pause_tier (gf_tier_conf_t *tier_conf)
gf_msg ("tier", GF_LOG_DEBUG, 0,
DHT_MSG_TIER_PAUSED,
"woken %d", woke);
+
+ gf_event (EVENT_TIER_PAUSE, "vol=%s", tier_conf->volname);
out:
state = tier_conf->pause_state;
@@ -4174,6 +4177,8 @@ gf_defrag_resume_tier (xlator_t *this, gf_defrag_info_t *defrag)
gf_defrag_set_pause_state (&defrag->tier_conf, TIER_RUNNING);
+ gf_event (EVENT_TIER_RESUME, "vol=%s", defrag->tier_conf.volname);
+
return 0;
}