bfc9fbf386
- fencer: get current time correctly * 0001-Fix-fencer-get-current-time-correctly.patch - Update to version 2.1.2+20211124.ada5c3b36 (Pacemaker-2.1.2): - fencer: add missing space to topology message - controller: handle remote connection start timeouts correctly - Update to version 2.1.1+20211116.8db4569e4 (Pacemaker-2.1.2-rc2): - fencing: mark state as done if remapped "on" times out - Fix OCF_RA_INSTALL_DIR Autoconf variable name in pkg-config files - daemons: Free memory at the end of fail_pending_op. - Update to version 2.1.1+20211104.62c36e2b1 (Pacemaker-2.1.2-rc1): - Use user_include_exclude_cb in crm_mon more. (clbz#5485) - Only set default sections in crm_mon once. (clbz#5485) - fencer: improve messages for dynamic target queries (rh#1470834) - fencer: consolidate messages for asynchronous results (rh#1470834) - fencer: log a message when out of memory for dynamic target search (rh#1470834) - libcrmservice: distinguish local and global configuration errors (rh#1470834) - libcrmservice: improve messages for pre-execution failures in child (rh#1470834) - Update to version 2.1.1+20211028.70f82d2c0: - attrd: check election status upon loss of a voter to prevent unexpected pending (bsc#1191676) - Update to version 2.1.1+20211028.7ee8b5bdd: - tools: select technical or human-friendly output of failed actions (rh#1470834) - controller,executor: tweak action result messages (rh#1470834) - install init scripts only if not using systemd - executor: log execution status and exit reason with results (rh#1470834) - executor: improve result message (rh#1470834) OBS-URL: https://build.opensuse.org/request/show/942220 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/pacemaker?expand=0&rev=354
44 lines
1.3 KiB
Diff
44 lines
1.3 KiB
Diff
From 0339e89f3238b31df78b864dae8684b82c370741 Mon Sep 17 00:00:00 2001
|
|
From: Ken Gaillot <kgaillot@redhat.com>
|
|
Date: Mon, 13 Dec 2021 15:22:40 -0600
|
|
Subject: [PATCH] Fix: fencer: get current time correctly
|
|
|
|
f52bc8e1ce (2.1.2) introduced a regression by using clock_gettime() with
|
|
CLOCK_MONOTONIC to get the current time. Use qb_util_timespec_from_epoch_get()
|
|
instead (which as of this writing uses clock_gettime() with CLOCK_REALTIME if
|
|
available, and falls back to gettimeofday() if not).
|
|
---
|
|
daemons/fenced/fenced_commands.c | 11 +++--------
|
|
1 file changed, 3 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/daemons/fenced/fenced_commands.c b/daemons/fenced/fenced_commands.c
|
|
index f34cb4f13..7685cb8c3 100644
|
|
--- a/daemons/fenced/fenced_commands.c
|
|
+++ b/daemons/fenced/fenced_commands.c
|
|
@@ -2746,19 +2746,14 @@ bool fencing_peer_active(crm_node_t *peer)
|
|
return FALSE;
|
|
}
|
|
|
|
-void set_fencing_completed(remote_fencing_op_t * op)
|
|
+void
|
|
+set_fencing_completed(remote_fencing_op_t *op)
|
|
{
|
|
-#ifdef CLOCK_MONOTONIC
|
|
struct timespec tv;
|
|
|
|
- clock_gettime(CLOCK_MONOTONIC, &tv);
|
|
-
|
|
+ qb_util_timespec_from_epoch_get(&tv);
|
|
op->completed = tv.tv_sec;
|
|
op->completed_nsec = tv.tv_nsec;
|
|
-#else
|
|
- op->completed = time(NULL);
|
|
- op->completed_nsec = 0L;
|
|
-#endif
|
|
}
|
|
|
|
/*!
|
|
--
|
|
2.31.1
|
|
|