From 2fc95e14cbdf856015eb813da4ee59273b297e47 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Sat, 22 Oct 2016 23:50:02 +0530 Subject: [PATCH 152/157] 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 > Reviewed-on: http://review.gluster.org/15700 > Smoke: Gluster Build System > NetBSD-regression: NetBSD Build System > CentOS-regression: Gluster Build System > Reviewed-by: Atin Mukherjee >Change-Id: I85e668e254e6f29c447ddb4ad2ce2fc04f98bf3c >BUG: 1387964 >Signed-off-by: Kotresh HR >Reviewed-on: http://review.gluster.org/15705 >Smoke: Gluster Build System >CentOS-regression: Gluster Build System >NetBSD-regression: NetBSD Build System >Reviewed-by: Aravinda VK Change-Id: I85e668e254e6f29c447ddb4ad2ce2fc04f98bf3c BUG: 1384311 Signed-off-by: Kotresh HR Reviewed-on: https://code.engineering.redhat.com/gerrit/89264 Reviewed-by: Atin Mukherjee Tested-by: Atin Mukherjee --- cli/src/cli-cmd-volume.c | 3 +++ 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 d7037d3..67da5a6 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -1794,6 +1794,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 06953b2..33398ee 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", -- 1.7.1