Blame SOURCES/bz1835885-3-main-Make-schedmiss-in-cmap-and-log-equal.patch

c29fdf
From 44c1c8ea31f981bdd7856d4eb8f4ac49f95a85e3 Mon Sep 17 00:00:00 2001
c29fdf
From: Jan Friesse <jfriesse@redhat.com>
c29fdf
Date: Fri, 5 Jun 2020 14:42:26 +0200
c29fdf
Subject: [PATCH] main: Make schedmiss in cmap and log equal
c29fdf
c29fdf
Second call of qb_util_nano_from_epoch_get may differ a bit. Solution is
c29fdf
to use previously stored timestamp (similarly as in master branch).
c29fdf
c29fdf
Also fix man page to follow similar style as other keys.
c29fdf
c29fdf
Thanks Patrik Hagara <phagara@redhat.com> for reporting the problem.
c29fdf
c29fdf
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
c29fdf
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
c29fdf
---
c29fdf
 exec/main.c     |  2 +-
c29fdf
 man/cmap_keys.8 | 12 +++++++-----
c29fdf
 2 files changed, 8 insertions(+), 6 deletions(-)
c29fdf
c29fdf
diff --git a/exec/main.c b/exec/main.c
c29fdf
index 545c123d..5d05d573 100644
c29fdf
--- a/exec/main.c
c29fdf
+++ b/exec/main.c
c29fdf
@@ -858,7 +858,7 @@ static void timer_function_scheduler_timeout (void *data)
c29fdf
 		    (float)tv_diff / QB_TIME_NS_IN_MSEC, (float)timeout_data->max_tv_diff / QB_TIME_NS_IN_MSEC);
c29fdf
 
c29fdf
 		icmap_set_float("runtime.schedmiss.delay", (float)tv_diff / QB_TIME_NS_IN_MSEC);
c29fdf
-		icmap_set_uint64("runtime.schedmiss.timestamp", qb_util_nano_from_epoch_get() / QB_TIME_NS_IN_MSEC);
c29fdf
+		icmap_set_uint64("runtime.schedmiss.timestamp", schedmiss_event_tstamp);
c29fdf
 	}
c29fdf
 
c29fdf
 	/*
c29fdf
diff --git a/man/cmap_keys.8 b/man/cmap_keys.8
c29fdf
index 1045c65e..d9e512d6 100644
c29fdf
--- a/man/cmap_keys.8
c29fdf
+++ b/man/cmap_keys.8
c29fdf
@@ -256,13 +256,15 @@ Status of the processor. Can be one of joined and left.
c29fdf
 Config version of the member node.
c29fdf
 
c29fdf
 .TP
c29fdf
-runtime.schedmiss.timestamp
c29fdf
+runtime.schedmiss.*
c29fdf
+If corosync is not scheduled after the required period of time it will
c29fdf
+log this event and also write an entry to cmap under following keys:
c29fdf
+
c29fdf
+.B timestamp
c29fdf
 The timestamp of the last time when corosync failed to be scheduled
c29fdf
-for the required amount of time. The even is warned in syslog but this
c29fdf
-is easier to find. The time is milli-seconds since the epoch.
c29fdf
+for the required amount of time. The time is milli-seconds since the epoch.
c29fdf
 
c29fdf
-.B
c29fdf
-runtime.schedmiss.delay
c29fdf
+.B delay
c29fdf
 The amount of time (milliseconds as a float) that corosync was delayed.
c29fdf
 
c29fdf
 .TP
c29fdf
-- 
c29fdf
2.18.2
c29fdf