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

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/common/operations.c | 4 ++++
 1 file changed, 4 insertions(+)

Index: pacemaker-2.0.1+20190417.13d370ca9/lib/common/operations.c
===================================================================
--- pacemaker-2.0.1+20190417.13d370ca9.orig/lib/common/operations.c
+++ pacemaker-2.0.1+20190417.13d370ca9/lib/common/operations.c
@@ -494,6 +494,10 @@ create_operation_update(xmlNode * parent
         if (op->interval_ms == 0) {
             // Ensure 'last' gets updated, in case record-pending is true
             op_id_additional = generate_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