From 19967cf3ebb49d4736aa08d528eaa93fafd8d98b Mon Sep 17 00:00:00 2001 From: Yan Gao Date: Tue, 10 Mar 2026 12:01:52 +0100 Subject: [PATCH] Fix: pacemakerd: Correctly detect ping requests from sbd This fixes a regression introduced by 6f7dd0b2bc, which has not made it into any release. Even though the ipc_name is set to "sbd:pcmk" by sbd, do_pacemakerd_api_call() generates the sender_system in the format "_sbd:pcmk". --- daemons/pacemakerd/pcmkd_messages.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/daemons/pacemakerd/pcmkd_messages.c b/daemons/pacemakerd/pcmkd_messages.c index 022c70509e5..5eacda7e66c 100644 --- a/daemons/pacemakerd/pcmkd_messages.c +++ b/daemons/pacemakerd/pcmkd_messages.c @@ -75,8 +75,10 @@ handle_ping_request(pcmk__request_t *request) pcmk__set_result(&request->result, CRM_EX_OK, PCMK_EXEC_DONE, NULL); } - /* just proceed state on sbd pinging us */ - if ((from != NULL) && g_str_has_prefix(from, "sbd")) { + /* Just proceed state on sbd pinging us. + * The "from" string is in the format "_sbd:pcmk". + */ + if ((from != NULL) && (strstr(from, "sbd") != NULL)) { if (pcmk__str_eq(pacemakerd_state, PCMK__VALUE_SHUTDOWN_COMPLETE, pcmk__str_none)) { if (pcmk__get_sbd_sync_resource_startup()) {