parent
328a55940b
commit
9d5b409bf2
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,59 @@
|
||||
From 04d1ba5ff20e135c900239f0ebadad42a41b5eba Mon Sep 17 00:00:00 2001
|
||||
From: Reid Wahl <nrwahl@protonmail.com>
|
||||
Date: Sat, 10 Sep 2022 03:39:12 -0700
|
||||
Subject: [PATCH] Fix: controller: Resource reordering doesn't cause transition
|
||||
abort
|
||||
|
||||
The te_update_diff_v2() function ignores all move operations. This is
|
||||
correct for most CIB sections. However, a move in the resources section
|
||||
affects placement order and can require resources to change nodes. In
|
||||
that case, since the diff handler does not cause a transition abort, the
|
||||
moves will not be initiated until the next natural transition (up to the
|
||||
value of cluster-recheck-interval).
|
||||
|
||||
This commit modifies te_update_diff_v2() so that it no longer ignores
|
||||
moves within the resources section.
|
||||
|
||||
This fixes a regression triggered by 41d0a1a and set up by 45e5e82.
|
||||
However, the underlying bug had already been present. Prior to 41d0a1a,
|
||||
the CIB replacement notification handler caused a transition abort, when
|
||||
the resources section was replaced, which hid this bug.
|
||||
|
||||
Closes T549
|
||||
|
||||
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
|
||||
---
|
||||
daemons/controld/controld_te_callbacks.c | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/daemons/controld/controld_te_callbacks.c b/daemons/controld/controld_te_callbacks.c
|
||||
index 6e0dd216e..87ad861a2 100644
|
||||
--- a/daemons/controld/controld_te_callbacks.c
|
||||
+++ b/daemons/controld/controld_te_callbacks.c
|
||||
@@ -419,7 +419,13 @@ te_update_diff_v2(xmlNode *diff)
|
||||
crm_trace("Ignoring %s change for version field", op);
|
||||
continue;
|
||||
|
||||
- } else if (strcmp(op, "move") == 0) {
|
||||
+ } else if ((strcmp(op, "move") == 0)
|
||||
+ && (strstr(xpath,
|
||||
+ "/" XML_TAG_CIB "/" XML_CIB_TAG_CONFIGURATION
|
||||
+ "/" XML_CIB_TAG_RESOURCES) == NULL)) {
|
||||
+ /* We still need to consider moves within the resources section,
|
||||
+ * since they affect placement order.
|
||||
+ */
|
||||
crm_trace("Ignoring move change at %s", xpath);
|
||||
continue;
|
||||
}
|
||||
@@ -434,7 +440,7 @@ te_update_diff_v2(xmlNode *diff)
|
||||
match = match->children;
|
||||
}
|
||||
|
||||
- } else if (strcmp(op, "delete") != 0) {
|
||||
+ } else if (!pcmk__str_any_of(op, "delete", "move", NULL)) {
|
||||
crm_warn("Ignoring malformed CIB update (%s operation on %s is unrecognized)",
|
||||
op, xpath);
|
||||
continue;
|
||||
--
|
||||
2.31.1
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue