import pacemaker-2.1.0-5.el8

This commit is contained in:
CentOS Sources 2021-08-10 04:24:36 +00:00 committed by Cloud User
parent a6ec13acdf
commit 2bdf9c35a7
4 changed files with 1888 additions and 26 deletions

465
SOURCES/014-str-list.patch Normal file
View File

@ -0,0 +1,465 @@
From 45813df3eb4c8ad8b1744fa5dd56af86ad0fb3dd Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Thu, 17 Jun 2021 16:07:55 -0400
Subject: [PATCH] Refactor: libs: pcmk__str_in_list should support pcmk__str_*
flags.
---
include/crm/common/strings_internal.h | 2 +-
lib/common/strings.c | 34 +++++++++++++++++++++++----
lib/fencing/st_output.c | 10 ++++----
lib/pengine/bundle.c | 8 +++----
lib/pengine/clone.c | 28 +++++++++++-----------
lib/pengine/group.c | 18 +++++++-------
lib/pengine/native.c | 4 ++--
lib/pengine/pe_output.c | 22 ++++++++---------
lib/pengine/utils.c | 6 ++---
9 files changed, 79 insertions(+), 53 deletions(-)
diff --git a/include/crm/common/strings_internal.h b/include/crm/common/strings_internal.h
index 94982cb4e..687079814 100644
--- a/include/crm/common/strings_internal.h
+++ b/include/crm/common/strings_internal.h
@@ -117,7 +117,7 @@ pcmk__intkey_table_remove(GHashTable *hash_table, int key)
return g_hash_table_remove(hash_table, GINT_TO_POINTER(key));
}
-gboolean pcmk__str_in_list(GList *lst, const gchar *s);
+gboolean pcmk__str_in_list(GList *lst, const gchar *s, uint32_t flags);
bool pcmk__strcase_any_of(const char *s, ...) G_GNUC_NULL_TERMINATED;
bool pcmk__str_any_of(const char *s, ...) G_GNUC_NULL_TERMINATED;
diff --git a/lib/common/strings.c b/lib/common/strings.c
index 3264db5b6..e1e98803b 100644
--- a/lib/common/strings.c
+++ b/lib/common/strings.c
@@ -872,14 +872,30 @@ pcmk__parse_ll_range(const char *srcstring, long long *start, long long *end)
* Search \p lst for \p s, taking case into account. As a special case,
* if "*" is the only element of \p lst, the search is successful.
*
- * \param[in] lst List to search
- * \param[in] s String to search for
+ * Behavior can be changed with various flags:
+ *
+ * - pcmk__str_casei - By default, comparisons are done taking case into
+ * account. This flag makes comparisons case-insensitive.
+ * - pcmk__str_null_matches - If the input string is NULL, return TRUE.
+ *
+ * \note The special "*" matching rule takes precedence over flags. In
+ * particular, "*" will match a NULL input string even without
+ * pcmk__str_null_matches being specified.
+ *
+ * \note No matter what input string or flags are provided, an empty
+ * list will always return FALSE.
+ *
+ * \param[in] lst List to search
+ * \param[in] s String to search for
+ * \param[in] flags A bitfield of pcmk__str_flags to modify operation
*
* \return \c TRUE if \p s is in \p lst, or \c FALSE otherwise
*/
gboolean
-pcmk__str_in_list(GList *lst, const gchar *s)
+pcmk__str_in_list(GList *lst, const gchar *s, uint32_t flags)
{
+ GCompareFunc fn;
+
if (lst == NULL) {
return FALSE;
}
@@ -888,7 +904,17 @@ pcmk__str_in_list(GList *lst, const gchar *s)
return TRUE;
}
- return g_list_find_custom(lst, s, (GCompareFunc) strcmp) != NULL;
+ if (s == NULL) {
+ return pcmk_is_set(flags, pcmk__str_null_matches);
+ }
+
+ if (pcmk_is_set(flags, pcmk__str_casei)) {
+ fn = (GCompareFunc) strcasecmp;
+ } else {
+ fn = (GCompareFunc) strcmp;
+ }
+
+ return g_list_find_custom(lst, s, fn) != NULL;
}
static bool
diff --git a/lib/fencing/st_output.c b/lib/fencing/st_output.c
index 568ae46a8..e1ae8ac87 100644
--- a/lib/fencing/st_output.c
+++ b/lib/fencing/st_output.c
@@ -47,7 +47,7 @@ stonith__failed_history(pcmk__output_t *out, va_list args) {
continue;
}
- if (!pcmk__str_in_list(only_node, hp->target)) {
+ if (!pcmk__str_in_list(only_node, hp->target, pcmk__str_none)) {
continue;
}
@@ -72,7 +72,7 @@ stonith__history(pcmk__output_t *out, va_list args) {
int rc = pcmk_rc_no_output;
for (stonith_history_t *hp = history; hp; hp = hp->next) {
- if (!pcmk__str_in_list(only_node, hp->target)) {
+ if (!pcmk__str_in_list(only_node, hp->target, pcmk__str_none)) {
continue;
}
@@ -101,7 +101,7 @@ stonith__full_history(pcmk__output_t *out, va_list args) {
int rc = pcmk_rc_no_output;
for (stonith_history_t *hp = history; hp; hp = hp->next) {
- if (!pcmk__str_in_list(only_node, hp->target)) {
+ if (!pcmk__str_in_list(only_node, hp->target, pcmk__str_none)) {
continue;
}
@@ -129,7 +129,7 @@ full_history_xml(pcmk__output_t *out, va_list args) {
if (history_rc == 0) {
for (stonith_history_t *hp = history; hp; hp = hp->next) {
- if (!pcmk__str_in_list(only_node, hp->target)) {
+ if (!pcmk__str_in_list(only_node, hp->target, pcmk__str_none)) {
continue;
}
@@ -218,7 +218,7 @@ stonith__pending_actions(pcmk__output_t *out, va_list args) {
int rc = pcmk_rc_no_output;
for (stonith_history_t *hp = history; hp; hp = hp->next) {
- if (!pcmk__str_in_list(only_node, hp->target)) {
+ if (!pcmk__str_in_list(only_node, hp->target, pcmk__str_none)) {
continue;
}
diff --git a/lib/pengine/bundle.c b/lib/pengine/bundle.c
index 9237392e4..6ba786ae6 100644
--- a/lib/pengine/bundle.c
+++ b/lib/pengine/bundle.c
@@ -1492,7 +1492,7 @@ pe__bundle_xml(pcmk__output_t *out, va_list args)
return rc;
}
- print_everything = pcmk__str_in_list(only_rsc, rsc->id);
+ print_everything = pcmk__str_in_list(only_rsc, rsc->id, pcmk__str_none);
for (GList *gIter = bundle_data->replicas; gIter != NULL;
gIter = gIter->next) {
@@ -1614,7 +1614,7 @@ pe__bundle_html(pcmk__output_t *out, va_list args)
return rc;
}
- print_everything = pcmk__str_in_list(only_rsc, rsc->id);
+ print_everything = pcmk__str_in_list(only_rsc, rsc->id, pcmk__str_none);
for (GList *gIter = bundle_data->replicas; gIter != NULL;
gIter = gIter->next) {
@@ -1742,7 +1742,7 @@ pe__bundle_text(pcmk__output_t *out, va_list args)
return rc;
}
- print_everything = pcmk__str_in_list(only_rsc, rsc->id);
+ print_everything = pcmk__str_in_list(only_rsc, rsc->id, pcmk__str_none);
for (GList *gIter = bundle_data->replicas; gIter != NULL;
gIter = gIter->next) {
@@ -2044,7 +2044,7 @@ pe__bundle_is_filtered(pe_resource_t *rsc, GList *only_rsc, gboolean check_paren
gboolean passes = FALSE;
pe__bundle_variant_data_t *bundle_data = NULL;
- if (pcmk__str_in_list(only_rsc, rsc_printable_id(rsc))) {
+ if (pcmk__str_in_list(only_rsc, rsc_printable_id(rsc), pcmk__str_none)) {
passes = TRUE;
} else {
get_bundle_variant_data(bundle_data, rsc);
diff --git a/lib/pengine/clone.c b/lib/pengine/clone.c
index 5662338f3..5a6bfa61f 100644
--- a/lib/pengine/clone.c
+++ b/lib/pengine/clone.c
@@ -624,8 +624,8 @@ pe__clone_xml(pcmk__output_t *out, va_list args)
return rc;
}
- print_everything = pcmk__str_in_list(only_rsc, rsc_printable_id(rsc)) ||
- (strstr(rsc->id, ":") != NULL && pcmk__str_in_list(only_rsc, rsc->id));
+ print_everything = pcmk__str_in_list(only_rsc, rsc_printable_id(rsc), pcmk__str_none) ||
+ (strstr(rsc->id, ":") != NULL && pcmk__str_in_list(only_rsc, rsc->id, pcmk__str_none));
for (; gIter != NULL; gIter = gIter->next) {
pe_resource_t *child_rsc = (pe_resource_t *) gIter->data;
@@ -693,8 +693,8 @@ pe__clone_html(pcmk__output_t *out, va_list args)
return rc;
}
- print_everything = pcmk__str_in_list(only_rsc, rsc_printable_id(rsc)) ||
- (strstr(rsc->id, ":") != NULL && pcmk__str_in_list(only_rsc, rsc->id));
+ print_everything = pcmk__str_in_list(only_rsc, rsc_printable_id(rsc), pcmk__str_none) ||
+ (strstr(rsc->id, ":") != NULL && pcmk__str_in_list(only_rsc, rsc->id, pcmk__str_none));
out->begin_list(out, NULL, NULL, "Clone Set: %s [%s]%s%s%s%s",
rsc->id, ID(clone_data->xml_obj_child),
@@ -801,7 +801,7 @@ pe__clone_html(pcmk__output_t *out, va_list args)
for (gIter = promoted_list; gIter; gIter = gIter->next) {
pe_node_t *host = gIter->data;
- if (!pcmk__str_in_list(only_node, host->details->uname)) {
+ if (!pcmk__str_in_list(only_node, host->details->uname, pcmk__str_none)) {
continue;
}
@@ -822,7 +822,7 @@ pe__clone_html(pcmk__output_t *out, va_list args)
for (gIter = started_list; gIter; gIter = gIter->next) {
pe_node_t *host = gIter->data;
- if (!pcmk__str_in_list(only_node, host->details->uname)) {
+ if (!pcmk__str_in_list(only_node, host->details->uname, pcmk__str_none)) {
continue;
}
@@ -884,7 +884,7 @@ pe__clone_html(pcmk__output_t *out, va_list args)
pe_node_t *node = (pe_node_t *)nIter->data;
if (pe_find_node(rsc->running_on, node->details->uname) == NULL &&
- pcmk__str_in_list(only_node, node->details->uname)) {
+ pcmk__str_in_list(only_node, node->details->uname, pcmk__str_none)) {
pcmk__add_word(&stopped_list, &stopped_list_len,
node->details->uname);
}
@@ -933,8 +933,8 @@ pe__clone_text(pcmk__output_t *out, va_list args)
return rc;
}
- print_everything = pcmk__str_in_list(only_rsc, rsc_printable_id(rsc)) ||
- (strstr(rsc->id, ":") != NULL && pcmk__str_in_list(only_rsc, rsc->id));
+ print_everything = pcmk__str_in_list(only_rsc, rsc_printable_id(rsc), pcmk__str_none) ||
+ (strstr(rsc->id, ":") != NULL && pcmk__str_in_list(only_rsc, rsc->id, pcmk__str_none));
out->begin_list(out, NULL, NULL, "Clone Set: %s [%s]%s%s%s%s",
rsc->id, ID(clone_data->xml_obj_child),
@@ -1041,7 +1041,7 @@ pe__clone_text(pcmk__output_t *out, va_list args)
for (gIter = promoted_list; gIter; gIter = gIter->next) {
pe_node_t *host = gIter->data;
- if (!pcmk__str_in_list(only_node, host->details->uname)) {
+ if (!pcmk__str_in_list(only_node, host->details->uname, pcmk__str_none)) {
continue;
}
@@ -1062,7 +1062,7 @@ pe__clone_text(pcmk__output_t *out, va_list args)
for (gIter = started_list; gIter; gIter = gIter->next) {
pe_node_t *host = gIter->data;
- if (!pcmk__str_in_list(only_node, host->details->uname)) {
+ if (!pcmk__str_in_list(only_node, host->details->uname, pcmk__str_none)) {
continue;
}
@@ -1120,7 +1120,7 @@ pe__clone_text(pcmk__output_t *out, va_list args)
pe_node_t *node = (pe_node_t *)nIter->data;
if (pe_find_node(rsc->running_on, node->details->uname) == NULL &&
- pcmk__str_in_list(only_node, node->details->uname)) {
+ pcmk__str_in_list(only_node, node->details->uname, pcmk__str_none)) {
pcmk__add_word(&stopped_list, &stopped_list_len,
node->details->uname);
}
@@ -1220,11 +1220,11 @@ pe__clone_is_filtered(pe_resource_t *rsc, GList *only_rsc, gboolean check_parent
gboolean passes = FALSE;
clone_variant_data_t *clone_data = NULL;
- if (pcmk__str_in_list(only_rsc, rsc_printable_id(rsc))) {
+ if (pcmk__str_in_list(only_rsc, rsc_printable_id(rsc), pcmk__str_none)) {
passes = TRUE;
} else {
get_clone_variant_data(clone_data, rsc);
- passes = pcmk__str_in_list(only_rsc, ID(clone_data->xml_obj_child));
+ passes = pcmk__str_in_list(only_rsc, ID(clone_data->xml_obj_child), pcmk__str_none);
if (!passes) {
for (GList *gIter = rsc->children; gIter != NULL; gIter = gIter->next) {
diff --git a/lib/pengine/group.c b/lib/pengine/group.c
index 23a72cff7..5f9aa83ce 100644
--- a/lib/pengine/group.c
+++ b/lib/pengine/group.c
@@ -201,8 +201,8 @@ pe__group_xml(pcmk__output_t *out, va_list args)
return rc;
}
- print_everything = pcmk__str_in_list(only_rsc, rsc_printable_id(rsc)) ||
- (strstr(rsc->id, ":") != NULL && pcmk__str_in_list(only_rsc, rsc->id));
+ print_everything = pcmk__str_in_list(only_rsc, rsc_printable_id(rsc), pcmk__str_none) ||
+ (strstr(rsc->id, ":") != NULL && pcmk__str_in_list(only_rsc, rsc->id, pcmk__str_none));
for (; gIter != NULL; gIter = gIter->next) {
pe_resource_t *child_rsc = (pe_resource_t *) gIter->data;
@@ -248,8 +248,8 @@ pe__group_html(pcmk__output_t *out, va_list args)
return rc;
}
- print_everything = pcmk__str_in_list(only_rsc, rsc_printable_id(rsc)) ||
- (strstr(rsc->id, ":") != NULL && pcmk__str_in_list(only_rsc, rsc->id));
+ print_everything = pcmk__str_in_list(only_rsc, rsc_printable_id(rsc), pcmk__str_none) ||
+ (strstr(rsc->id, ":") != NULL && pcmk__str_in_list(only_rsc, rsc->id, pcmk__str_none));
if (options & pe_print_brief) {
GList *rscs = pe__filter_rsc_list(rsc->children, only_rsc);
@@ -303,8 +303,8 @@ pe__group_text(pcmk__output_t *out, va_list args)
return rc;
}
- print_everything = pcmk__str_in_list(only_rsc, rsc_printable_id(rsc)) ||
- (strstr(rsc->id, ":") != NULL && pcmk__str_in_list(only_rsc, rsc->id));
+ print_everything = pcmk__str_in_list(only_rsc, rsc_printable_id(rsc), pcmk__str_none) ||
+ (strstr(rsc->id, ":") != NULL && pcmk__str_in_list(only_rsc, rsc->id, pcmk__str_none));
if (options & pe_print_brief) {
GList *rscs = pe__filter_rsc_list(rsc->children, only_rsc);
@@ -387,11 +387,11 @@ pe__group_is_filtered(pe_resource_t *rsc, GList *only_rsc, gboolean check_parent
{
gboolean passes = FALSE;
- if (check_parent && pcmk__str_in_list(only_rsc, rsc_printable_id(uber_parent(rsc)))) {
+ if (check_parent && pcmk__str_in_list(only_rsc, rsc_printable_id(uber_parent(rsc)), pcmk__str_none)) {
passes = TRUE;
- } else if (pcmk__str_in_list(only_rsc, rsc_printable_id(rsc))) {
+ } else if (pcmk__str_in_list(only_rsc, rsc_printable_id(rsc), pcmk__str_none)) {
passes = TRUE;
- } else if (strstr(rsc->id, ":") != NULL && pcmk__str_in_list(only_rsc, rsc->id)) {
+ } else if (strstr(rsc->id, ":") != NULL && pcmk__str_in_list(only_rsc, rsc->id, pcmk__str_none)) {
passes = TRUE;
} else {
for (GList *gIter = rsc->children; gIter != NULL; gIter = gIter->next) {
diff --git a/lib/pengine/native.c b/lib/pengine/native.c
index c2333d0d2..56054fc4a 100644
--- a/lib/pengine/native.c
+++ b/lib/pengine/native.c
@@ -1338,8 +1338,8 @@ pe__rscs_brief_output(pcmk__output_t *out, GList *rsc_list, unsigned int show_op
gboolean
pe__native_is_filtered(pe_resource_t *rsc, GList *only_rsc, gboolean check_parent)
{
- if (pcmk__str_in_list(only_rsc, rsc_printable_id(rsc)) ||
- pcmk__str_in_list(only_rsc, rsc->id)) {
+ if (pcmk__str_in_list(only_rsc, rsc_printable_id(rsc), pcmk__str_none) ||
+ pcmk__str_in_list(only_rsc, rsc->id, pcmk__str_none)) {
return FALSE;
} else if (check_parent) {
pe_resource_t *up = uber_parent(rsc);
diff --git a/lib/pengine/pe_output.c b/lib/pengine/pe_output.c
index 727475735..a6dc4ade8 100644
--- a/lib/pengine/pe_output.c
+++ b/lib/pengine/pe_output.c
@@ -670,8 +670,8 @@ ban_list(pcmk__output_t *out, va_list args) {
continue;
}
- if (!pcmk__str_in_list(only_rsc, rsc_printable_id(location->rsc_lh)) &&
- !pcmk__str_in_list(only_rsc, rsc_printable_id(uber_parent(location->rsc_lh)))) {
+ if (!pcmk__str_in_list(only_rsc, rsc_printable_id(location->rsc_lh), pcmk__str_none) &&
+ !pcmk__str_in_list(only_rsc, rsc_printable_id(uber_parent(location->rsc_lh)), pcmk__str_none)) {
continue;
}
@@ -1254,7 +1254,7 @@ failed_action_list(pcmk__output_t *out, va_list args) {
xml_op = pcmk__xml_next(xml_op)) {
char *rsc = NULL;
- if (!pcmk__str_in_list(only_node, crm_element_value(xml_op, XML_ATTR_UNAME))) {
+ if (!pcmk__str_in_list(only_node, crm_element_value(xml_op, XML_ATTR_UNAME), pcmk__str_none)) {
continue;
}
@@ -1263,7 +1263,7 @@ failed_action_list(pcmk__output_t *out, va_list args) {
continue;
}
- if (!pcmk__str_in_list(only_rsc, rsc)) {
+ if (!pcmk__str_in_list(only_rsc, rsc, pcmk__str_none)) {
free(rsc);
continue;
}
@@ -1738,7 +1738,7 @@ node_attribute_list(pcmk__output_t *out, va_list args) {
continue;
}
- if (!pcmk__str_in_list(only_node, node->details->uname)) {
+ if (!pcmk__str_in_list(only_node, node->details->uname, pcmk__str_none)) {
g_list_free(attr_list);
continue;
}
@@ -1835,8 +1835,8 @@ node_history_list(pcmk__output_t *out, va_list args) {
* For other resource types, is_filtered is okay.
*/
if (uber_parent(rsc)->variant == pe_group) {
- if (!pcmk__str_in_list(only_rsc, rsc_printable_id(rsc)) &&
- !pcmk__str_in_list(only_rsc, rsc_printable_id(uber_parent(rsc)))) {
+ if (!pcmk__str_in_list(only_rsc, rsc_printable_id(rsc), pcmk__str_none) &&
+ !pcmk__str_in_list(only_rsc, rsc_printable_id(uber_parent(rsc)), pcmk__str_none)) {
continue;
}
} else {
@@ -1899,7 +1899,7 @@ node_list_html(pcmk__output_t *out, va_list args) {
for (GList *gIter = nodes; gIter != NULL; gIter = gIter->next) {
pe_node_t *node = (pe_node_t *) gIter->data;
- if (!pcmk__str_in_list(only_node, node->details->uname)) {
+ if (!pcmk__str_in_list(only_node, node->details->uname, pcmk__str_none)) {
continue;
}
@@ -1940,7 +1940,7 @@ pe__node_list_text(pcmk__output_t *out, va_list args) {
const char *node_mode = NULL;
char *node_name = pe__node_display_name(node, print_clone_detail);
- if (!pcmk__str_in_list(only_node, node->details->uname)) {
+ if (!pcmk__str_in_list(only_node, node->details->uname, pcmk__str_none)) {
free(node_name);
continue;
}
@@ -2059,7 +2059,7 @@ node_list_xml(pcmk__output_t *out, va_list args) {
for (GList *gIter = nodes; gIter != NULL; gIter = gIter->next) {
pe_node_t *node = (pe_node_t *) gIter->data;
- if (!pcmk__str_in_list(only_node, node->details->uname)) {
+ if (!pcmk__str_in_list(only_node, node->details->uname, pcmk__str_none)) {
continue;
}
@@ -2097,7 +2097,7 @@ node_summary(pcmk__output_t *out, va_list args) {
continue;
}
- if (!pcmk__str_in_list(only_node, node->details->uname)) {
+ if (!pcmk__str_in_list(only_node, node->details->uname, pcmk__str_none)) {
continue;
}
diff --git a/lib/pengine/utils.c b/lib/pengine/utils.c
index 450d8348c..d1be9e4ca 100644
--- a/lib/pengine/utils.c
+++ b/lib/pengine/utils.c
@@ -2394,7 +2394,7 @@ pe__rsc_running_on_any_node_in_list(pe_resource_t *rsc, GList *node_list)
{
for (GList *ele = rsc->running_on; ele; ele = ele->next) {
pe_node_t *node = (pe_node_t *) ele->data;
- if (pcmk__str_in_list(node_list, node->details->uname)) {
+ if (pcmk__str_in_list(node_list, node->details->uname, pcmk__str_none)) {
return true;
}
}
@@ -2419,8 +2419,8 @@ pe__filter_rsc_list(GList *rscs, GList *filter)
/* I think the second condition is safe here for all callers of this
* function. If not, it needs to move into pe__node_text.
*/
- if (pcmk__str_in_list(filter, rsc_printable_id(rsc)) ||
- (rsc->parent && pcmk__str_in_list(filter, rsc_printable_id(rsc->parent)))) {
+ if (pcmk__str_in_list(filter, rsc_printable_id(rsc), pcmk__str_none) ||
+ (rsc->parent && pcmk__str_in_list(filter, rsc_printable_id(rsc->parent), pcmk__str_none))) {
retval = g_list_prepend(retval, rsc);
}
}
--
2.27.0

1312
SOURCES/015-sbd.patch Normal file

File diff suppressed because it is too large Load Diff

59
SOURCES/016-cts.patch Normal file
View File

@ -0,0 +1,59 @@
From b37391fef92548f31822f9df2a9b5fa2a61b4514 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Wed, 23 Jun 2021 15:17:54 -0500
Subject: [PATCH] Fix: CTS: handle longer Corosync token timeouts
Previously, startall() would call cluster_stable() immediately after detecting
the "controller successfully started" message. If the Corosync token timeout is
small enough, this will be fine. However with a token timeout of more than
about 1 second, the controllers will not have formed a membership by this
point, causing cluster_stable() to think there are multiple partitions, and
wait for a DC to be elected in each one, when really they will unite into a
single partition in a short time, and only elect a single DC.
Now, startall() waits until seeing that each node is a cluster member before
calling cluster_stable().
---
cts/lab/CTS.py.in | 3 ++-
cts/lab/patterns.py | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/cts/lab/CTS.py.in b/cts/lab/CTS.py.in
index abcb9d285..d9924437b 100644
--- a/cts/lab/CTS.py.in
+++ b/cts/lab/CTS.py.in
@@ -628,9 +628,10 @@ class ClusterManager(UserDict):
watchpats = [ ]
watchpats.append(self.templates["Pat:DC_IDLE"])
for node in nodelist:
- watchpats.append(self.templates["Pat:Local_started"] % node)
watchpats.append(self.templates["Pat:InfraUp"] % node)
watchpats.append(self.templates["Pat:PacemakerUp"] % node)
+ watchpats.append(self.templates["Pat:Local_started"] % node)
+ watchpats.append(self.templates["Pat:They_up"] % (nodelist[0], node))
# Start all the nodes - at about the same time...
watch = LogWatcher(self.Env["LogFileName"], watchpats, "fast-start", self.Env["DeadTime"]+10, hosts=self.Env["nodes"], kind=self.Env["LogWatcher"])
diff --git a/cts/lab/patterns.py b/cts/lab/patterns.py
index e21a016ff..400fd3dc8 100644
--- a/cts/lab/patterns.py
+++ b/cts/lab/patterns.py
@@ -61,6 +61,7 @@ class BasePatterns(object):
"Pat:We_stopped" : "%s\W.*OVERRIDE THIS PATTERN",
"Pat:They_stopped" : "%s\W.*LOST:.* %s ",
"Pat:They_dead" : "node %s.*: is dead",
+ "Pat:They_up" : "%s %s\W.*OVERRIDE THIS PATTERN",
"Pat:TransitionComplete" : "Transition status: Complete: complete",
"Pat:Fencing_start" : r"Requesting peer fencing .* targeting %s",
@@ -130,6 +131,7 @@ class crm_corosync(BasePatterns):
"Pat:We_stopped" : "%s\W.*Unloading all Corosync service engines",
"Pat:They_stopped" : "%s\W.*pacemaker-controld.*Node %s(\[|\s).*state is now lost",
"Pat:They_dead" : "pacemaker-controld.*Node %s(\[|\s).*state is now lost",
+ "Pat:They_up" : "\W%s\W.*pacemaker-controld.*Node %s state is now member",
"Pat:ChildExit" : r"\[[0-9]+\] exited with status [0-9]+ \(",
# "with signal 9" == pcmk_child_exit(), "$" == check_active_before_startup_processes()
--
2.27.0

View File

@ -36,14 +36,18 @@
## can be incremented to build packages reliably considered "newer" ## can be incremented to build packages reliably considered "newer"
## than previously built packages with the same pcmkversion) ## than previously built packages with the same pcmkversion)
%global pcmkversion 2.1.0 %global pcmkversion 2.1.0
%global specversion 4 %global specversion 5
## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build ## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build
%global commit 7c3f660707a495a1331716ad32cd3ac9d9f8ff58 %global commit 7c3f660707a495a1331716ad32cd3ac9d9f8ff58
## Since git v2.11, the extent of abbreviation is autoscaled by default ## Since git v2.11, the extent of abbreviation is autoscaled by default
## (used to be constant of 7), so we need to convey it for non-tags, too. ## (used to be constant of 7), so we need to convey it for non-tags, too.
%if (0%{?fedora} >= 26) || (0%{?rhel} >= 9)
%global commit_abbrev 9
%else
%global commit_abbrev 7 %global commit_abbrev 7
%endif
## Nagios source control identifiers ## Nagios source control identifiers
%global nagios_name nagios-agents-metadata %global nagios_name nagios-agents-metadata
@ -146,14 +150,6 @@
%define gnutls_priorities %{?pcmk_gnutls_priorities}%{!?pcmk_gnutls_priorities:@SYSTEM} %define gnutls_priorities %{?pcmk_gnutls_priorities}%{!?pcmk_gnutls_priorities:@SYSTEM}
%endif %endif
%if !%{defined _rundir}
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1200
%define _rundir /run
%else
%define _rundir /var/run
%endif
%endif
%if 0%{?fedora} > 22 || 0%{?rhel} > 7 %if 0%{?fedora} > 22 || 0%{?rhel} > 7
%global supports_recommends 1 %global supports_recommends 1
%endif %endif
@ -280,6 +276,9 @@ Patch10: 010-probe-pending.patch
Patch11: 011-crm_attribute-regression.patch Patch11: 011-crm_attribute-regression.patch
Patch12: 012-string-arguments.patch Patch12: 012-string-arguments.patch
Patch13: 013-leaks.patch Patch13: 013-leaks.patch
Patch14: 014-str-list.patch
Patch15: 015-sbd.patch
Patch16: 016-cts.patch
# downstream-only commits # downstream-only commits
#Patch1xx: 1xx-xxxx.patch #Patch1xx: 1xx-xxxx.patch
@ -310,18 +309,34 @@ Requires: libqb >= 0.17.0
BuildRequires: libqb-devel >= 0.17.0 BuildRequires: libqb-devel >= 0.17.0
# Required basic build tools # Required basic build tools
BuildRequires: coreutils findutils grep sed BuildRequires: autoconf
BuildRequires: autoconf automake gcc make pkgconfig BuildRequires: automake
BuildRequires: libtool %{?pkgname_libtool_devel} BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: gcc
BuildRequires: grep
BuildRequires: libtool
%if %{defined pkgname_libtool_devel}
BuildRequires: %{?pkgname_libtool_devel}
%endif
BuildRequires: make
BuildRequires: pkgconfig
BuildRequires: sed
# Required for core functionality # Required for core functionality
BuildRequires: pkgconfig(glib-2.0) >= 2.42 BuildRequires: pkgconfig(glib-2.0) >= 2.42
BuildRequires: libxml2-devel libxslt-devel libuuid-devel BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: libuuid-devel
BuildRequires: %{pkgname_bzip2_devel} BuildRequires: %{pkgname_bzip2_devel}
# Enables optional functionality # Enables optional functionality
BuildRequires: ncurses-devel %{pkgname_docbook_xsl} BuildRequires: pkgconfig(dbus-1)
BuildRequires: help2man %{pkgname_gnutls_devel} pam-devel pkgconfig(dbus-1) BuildRequires: %{pkgname_docbook_xsl}
BuildRequires: %{pkgname_gnutls_devel}
BuildRequires: help2man
BuildRequires: ncurses-devel
BuildRequires: pam-devel
%if %{systemd_native} %if %{systemd_native}
BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(systemd)
@ -338,7 +353,9 @@ BuildRequires: %{pkgname_glue_libs}-devel
%endif %endif
%if %{with doc} %if %{with doc}
BuildRequires: asciidoc inkscape %{python_name}-sphinx BuildRequires: asciidoc
BuildRequires: inkscape
BuildRequires: %{python_name}-sphinx
%endif %endif
Provides: pcmk-cluster-manager = %{version}-%{release} Provides: pcmk-cluster-manager = %{version}-%{release}
@ -368,12 +385,9 @@ Available rpmbuild rebuild options:
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
Summary: Command line tools for controlling Pacemaker clusters Summary: Command line tools for controlling Pacemaker clusters
Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release} Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release}
%if 0%{?supports_recommends}
#Recommends: pcmk-cluster-manager = %{version}-%{release}
# For crm_report # For crm_report
Requires: tar Requires: tar
Requires: bzip2 Requires: bzip2
%endif
Requires: perl-TimeDate Requires: perl-TimeDate
Requires: %{pkgname_procps} Requires: %{pkgname_procps}
Requires: psmisc Requires: psmisc
@ -448,11 +462,16 @@ License: GPLv2+ and LGPLv2+
Summary: Pacemaker development package Summary: Pacemaker development package
Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release} Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release}
Requires: %{name}-cluster-libs%{?_isa} = %{version}-%{release} Requires: %{name}-cluster-libs%{?_isa} = %{version}-%{release}
Requires: %{?pkgname_libtool_devel_arch} libuuid-devel%{?_isa} Requires: %{pkgname_bzip2_devel}%{?_isa}
Requires: libxml2-devel%{?_isa} libxslt-devel%{?_isa}
Requires: %{pkgname_bzip2_devel}%{?_isa} glib2-devel%{?_isa}
Requires: libqb-devel%{?_isa}
Requires: corosync-devel >= 2.0.0 Requires: corosync-devel >= 2.0.0
Requires: glib2-devel%{?_isa}
Requires: libqb-devel%{?_isa}
%if %{defined pkgname_libtool_devel_arch}
Requires: %{?pkgname_libtool_devel_arch}
%endif
Requires: libuuid-devel%{?_isa}
Requires: libxml2-devel%{?_isa}
Requires: libxslt-devel%{?_isa}
%description -n %{pkgname_pcmk_libs}-devel %description -n %{pkgname_pcmk_libs}-devel
Pacemaker is an advanced, scalable High-Availability cluster resource Pacemaker is an advanced, scalable High-Availability cluster resource
@ -476,7 +495,6 @@ BuildArch: noarch
%if 0%{?fedora} > 22 || 0%{?rhel} > 7 %if 0%{?fedora} > 22 || 0%{?rhel} > 7
Requires: %{python_name}-systemd Requires: %{python_name}-systemd
%endif %endif
%endif %endif
%description cts %description cts
@ -559,6 +577,7 @@ export LDFLAGS_HARDENED_LIB="%{?_hardening_ldflags}"
%{?concurrent_fencing} \ %{?concurrent_fencing} \
%{?resource_stickiness} \ %{?resource_stickiness} \
%{?compat20} \ %{?compat20} \
--disable-static \
--with-initdir=%{_initrddir} \ --with-initdir=%{_initrddir} \
--with-runstatedir=%{_rundir} \ --with-runstatedir=%{_rundir} \
--localstatedir=%{_var} \ --localstatedir=%{_var} \
@ -609,8 +628,7 @@ done
mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/lib/rpm-state/%{name} mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/lib/rpm-state/%{name}
%endif %endif
# Don't package static libs # Don't package libtool archives
find %{buildroot} -name '*.a' -type f -print0 | xargs -0 rm -f
find %{buildroot} -name '*.la' -type f -print0 | xargs -0 rm -f find %{buildroot} -name '*.la' -type f -print0 | xargs -0 rm -f
# Do not package these either # Do not package these either
@ -782,6 +800,7 @@ exit 0
%{_sbindir}/crm_attribute %{_sbindir}/crm_attribute
%{_sbindir}/crm_master %{_sbindir}/crm_master
%{_sbindir}/fence_watchdog
%doc %{_mandir}/man7/pacemaker-controld.* %doc %{_mandir}/man7/pacemaker-controld.*
%doc %{_mandir}/man7/pacemaker-schedulerd.* %doc %{_mandir}/man7/pacemaker-schedulerd.*
@ -790,6 +809,7 @@ exit 0
%doc %{_mandir}/man7/ocf_pacemaker_remote.* %doc %{_mandir}/man7/ocf_pacemaker_remote.*
%doc %{_mandir}/man8/crm_attribute.* %doc %{_mandir}/man8/crm_attribute.*
%doc %{_mandir}/man8/crm_master.* %doc %{_mandir}/man8/crm_master.*
%doc %{_mandir}/man8/fence_watchdog.*
%doc %{_mandir}/man8/pacemakerd.* %doc %{_mandir}/man8/pacemakerd.*
%doc %{_datadir}/pacemaker/alerts %doc %{_datadir}/pacemaker/alerts
@ -841,6 +861,7 @@ exit 0
%{_sbindir}/crm_simulate %{_sbindir}/crm_simulate
%{_sbindir}/crm_report %{_sbindir}/crm_report
%{_sbindir}/crm_ticket %{_sbindir}/crm_ticket
%{_sbindir}/fence_watchdog
%{_sbindir}/stonith_admin %{_sbindir}/stonith_admin
# "dirname" is owned by -schemas, which is a prerequisite # "dirname" is owned by -schemas, which is a prerequisite
%{_datadir}/pacemaker/report.collector %{_datadir}/pacemaker/report.collector
@ -864,6 +885,7 @@ exit 0
%doc %{_mandir}/man8/* %doc %{_mandir}/man8/*
%exclude %{_mandir}/man8/crm_attribute.* %exclude %{_mandir}/man8/crm_attribute.*
%exclude %{_mandir}/man8/crm_master.* %exclude %{_mandir}/man8/crm_master.*
%exclude %{_mandir}/man8/fence_watchdog.*
%exclude %{_mandir}/man8/pacemakerd.* %exclude %{_mandir}/man8/pacemakerd.*
%exclude %{_mandir}/man8/pacemaker-remoted.* %exclude %{_mandir}/man8/pacemaker-remoted.*
@ -955,6 +977,10 @@ exit 0
%license %{nagios_name}-%{nagios_hash}/COPYING %license %{nagios_name}-%{nagios_hash}/COPYING
%changelog %changelog
* Fri Aug 06 2021 Ken Gaillot <kgaillot@redhat.com> - 2.1.0-5
- Allow configuring specific nodes to use watchdog-only sbd for fencing
- Resolves: rhbz1443666
* Fri Jul 30 2021 Ken Gaillot <kgaillot@redhat.com> - 2.1.0-4 * Fri Jul 30 2021 Ken Gaillot <kgaillot@redhat.com> - 2.1.0-4
- Show better error messages in crm_resource with invalid resource types - Show better error messages in crm_resource with invalid resource types
- Avoid selecting wrong device when dynamic-list fencing is used with host map - Avoid selecting wrong device when dynamic-list fencing is used with host map