File bsc#1206263-0004-Fix-libpacemaker-ensure-any-pending-recurring-monito.patch of Package pacemaker.27546

From 11689380bb663bde3699093248039aa9479082f5 Mon Sep 17 00:00:00 2001
From: "Gao,Yan" <ygao@suse.com>
Date: Mon, 5 Dec 2022 15:13:18 +0100
Subject: [PATCH 4/6] Fix: libpacemaker: ensure any pending recurring monitor
 gets updated if it fails

So that it prevents any pending recurring monitor from getting stuck in
the CIB status.
---
 lib/pacemaker/pcmk_sched_utils.c | 4 ++++
 1 file changed, 4 insertions(+)

Index: pacemaker-2.1.2+20211124.ada5c3b36/lib/pacemaker/pcmk_sched_utils.c
===================================================================
--- pacemaker-2.1.2+20211124.ada5c3b36.orig/lib/pacemaker/pcmk_sched_utils.c
+++ pacemaker-2.1.2+20211124.ada5c3b36/lib/pacemaker/pcmk_sched_utils.c
@@ -621,6 +621,10 @@ pcmk__create_history_xml(xmlNode *parent
         if (op->interval_ms == 0) {
             // Ensure 'last' gets updated, in case record-pending is true
             op_id_additional = pcmk__op_key(op->rsc_id, "last", 0);
+
+        } else {
+            // Ensure any pending recurring monitor gets updated if it fails
+            op_id_additional = strdup(key);
         }
         exit_reason = op->exit_reason;
 
openSUSE Build Service is sponsored by