diff options
author | Kotresh HR <khiremat@redhat.com> | 2016-10-22 23:50:02 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2016-10-22 23:39:40 -0700 |
commit | 255cc64375abe2925c7da1e13e45018dad4462df (patch) | |
tree | c050d82a7f3ee692983190411513fc89625ba1f1 | |
parent | 9565222c3bb17d124e3d62ec0ab987ce45999047 (diff) |
bitrot/cli: Add ondemand scrub event
Following Bitrot Events are added
BITROT_SCRUB_ONDEMAND
{
"nodeid": NODEID,
"ts": TIMESTAMP,
"event": EVENT_TYPE,
"message": {
"name": VOLUME_NAME,
}
}
Change-Id: I85e668e254e6f29c447ddb4ad2ce2fc04f98bf3c
BUG: 1387864
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/15700
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: Atin Mukherjee <amukherj@redhat.com>
-rw-r--r-- | cli/src/cli-cmd-volume.c | 3 | ||||
-rw-r--r-- | events/eventskeygen.py | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index 7693a96e6e5..9b4c43e03f5 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -1761,6 +1761,9 @@ out: case GF_BITROT_OPTION_TYPE_DISABLE: event_type = EVENT_BITROT_DISABLE; break; + case GF_BITROT_CMD_SCRUB_ONDEMAND: + event_type = EVENT_BITROT_SCRUB_ONDEMAND; + break; case GF_BITROT_OPTION_TYPE_SCRUB_THROTTLE: event_type = EVENT_BITROT_SCRUB_THROTTLE; ret1 = dict_get_str (options, "scrub-throttle-value", diff --git a/events/eventskeygen.py b/events/eventskeygen.py index 49f93fff4bd..d54968a1d33 100644 --- a/events/eventskeygen.py +++ b/events/eventskeygen.py @@ -51,6 +51,7 @@ keys = ( "EVENT_BITROT_SCRUB_THROTTLE", "EVENT_BITROT_SCRUB_FREQ", "EVENT_BITROT_SCRUB_OPTION", + "EVENT_BITROT_SCRUB_ONDEMAND", #quota events "EVENT_QUOTA_ENABLE", |