File pacemaker#3409-0006-Log-scheduler-correct-lifetime-deprecation-warning.patch of Package pacemaker.34780
From 1595482d4edda42b4f84b7a55661c364f5767381 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Wed, 13 Mar 2024 09:20:25 -0500
Subject: [PATCH 6/7] Log: scheduler: correct lifetime deprecation warning
Contrary to the log message as it was, rules cannot simply be moved from the
lifetime element to its parent constraint element. Colocation, ordering, and
ticket constraints do not support rules at all, and location constraints
support them with different semantics.
The feature is undocumented and has been deprecated since 1.0.8, so it should
be fine to not recommend any alternative.
---
lib/pacemaker/pcmk_sched_constraints.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Index: pacemaker-2.1.5+20221208.a3f44794f/lib/pacemaker/pcmk_sched_constraints.c
===================================================================
--- pacemaker-2.1.5+20221208.a3f44794f.orig/lib/pacemaker/pcmk_sched_constraints.c
+++ pacemaker-2.1.5+20221208.a3f44794f/lib/pacemaker/pcmk_sched_constraints.c
@@ -75,10 +75,9 @@ pcmk__unpack_constraints(pe_working_set_
lifetime = first_named_child(xml_obj, "lifetime");
if (lifetime != NULL) {
- pcmk__config_warn("Support for 'lifetime' attribute (in %s) is "
- "deprecated (the rules it contains should "
- "instead be direct descendents of the "
- "constraint object)", id);
+ pcmk__config_warn("Support for 'lifetime' element "
+ "(in %s) is deprecated and will be dropped "
+ "in a later release", id);
}
if ((lifetime != NULL) && !evaluate_lifetime(lifetime, data_set)) {