File bsc#1239533-0001-Fix-libcrmcommon-Increase-poll-timeout-to-5s-for-liv.patch of Package pacemaker.41101
From 4228085d8548d4951875a737703bd0de874a7663 Mon Sep 17 00:00:00 2001
From: "Gao,Yan" <ygao@suse.com>
Date: Tue, 24 Jun 2025 09:24:07 +0200
Subject: [PATCH] Fix: libcrmcommon: Increase poll() timeout to 5s for liveness
checks on sub-daemons
If a node is temporarily running into a difficult situation, for the
liveness checks on sub-daemons by pacemakerd, the 5
`PCMK_PROCESS_CHECK_RETRIES` offer a certain degree of tolerance. But in
practice with the current 2s of poll() timeout, if the situation is a
little too difficult, the liveness checks seem to run into 5 failures in
a row rather easily while the situation still seems acceptable.
This commit offers a longer timeout of 5s for a sub-daemon to respond to
a liveness check.
See discussion at:
https://github.com/ClusterLabs/pacemaker/pull/2588#discussion_r2122975853
---
lib/common/ipc_client.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/common/ipc_client.c b/lib/common/ipc_client.c
index c40ca744d0..3c5c13dd15 100644
--- a/lib/common/ipc_client.c
+++ b/lib/common/ipc_client.c
@@ -1685,7 +1685,7 @@ pcmk__ipc_is_authentic_process_active(const char *name, uid_t refuid,
#ifdef HAVE_QB_IPCC_CONNECT_ASYNC
pollfd.events = POLLIN;
do {
- poll_rc = poll(&pollfd, 1, 2000);
+ poll_rc = poll(&pollfd, 1, 5000);
} while ((poll_rc == -1) && (errno == EINTR));
/* If poll() failed, given that disconnect function is not registered yet,
--
2.43.0