Compare commits

...

No commits in common. "9fdce313afa51623dc519f1212e689dd774ccc3e" and "75b8d5ac069b8b0d75840ad4bcc5f285b065527c" have entirely different histories.

14 changed files with 26 additions and 3936 deletions

View File

@ -1,140 +0,0 @@
From 2d15fb37525f88ec8d5acb689b698044c4bb69b1 Mon Sep 17 00:00:00 2001
From: Hideo Yamauchi <renayama19661014@ybb.ne.jp>
Date: Thu, 17 Jun 2021 22:39:12 +0900
Subject: [PATCH 1/2] Low: fenced: Low: fenced: Remove unnecessary release.
---
daemons/fenced/fenced_commands.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/daemons/fenced/fenced_commands.c b/daemons/fenced/fenced_commands.c
index fee55a7..35aec06 100644
--- a/daemons/fenced/fenced_commands.c
+++ b/daemons/fenced/fenced_commands.c
@@ -1104,9 +1104,6 @@ dynamic_list_search_cb(GPid pid, int rc, const char *output, gpointer user_data)
/* Fall back to status */
g_hash_table_replace(dev->params,
strdup(PCMK_STONITH_HOST_CHECK), strdup("status"));
-
- g_list_free_full(dev->targets, free);
- dev->targets = NULL;
} else if (!rc) {
crm_info("Refreshing port list for %s", dev->id);
g_list_free_full(dev->targets, free);
--
1.8.3.1
From a29f88f6020aac5f1ac32072942eb5713d7be50d Mon Sep 17 00:00:00 2001
From: Hideo Yamauchi <renayama19661014@ybb.ne.jp>
Date: Thu, 17 Jun 2021 22:40:40 +0900
Subject: [PATCH 2/2] High: fenced: Wrong device may be selected when
"dynamic-list" is specified.
---
daemons/fenced/fenced_commands.c | 67 +++++++++++++++++++++++-----------------
1 file changed, 38 insertions(+), 29 deletions(-)
diff --git a/daemons/fenced/fenced_commands.c b/daemons/fenced/fenced_commands.c
index 35aec06..da076fb 100644
--- a/daemons/fenced/fenced_commands.c
+++ b/daemons/fenced/fenced_commands.c
@@ -904,6 +904,31 @@ xml2device_params(const char *name, xmlNode *dev)
return params;
}
+static const char *
+target_list_type(stonith_device_t * dev)
+{
+ const char *check_type = NULL;
+
+ check_type = g_hash_table_lookup(dev->params, PCMK_STONITH_HOST_CHECK);
+
+ if (check_type == NULL) {
+
+ if (g_hash_table_lookup(dev->params, PCMK_STONITH_HOST_LIST)) {
+ check_type = "static-list";
+ } else if (g_hash_table_lookup(dev->params, PCMK_STONITH_HOST_MAP)) {
+ check_type = "static-list";
+ } else if (pcmk_is_set(dev->flags, st_device_supports_list)) {
+ check_type = "dynamic-list";
+ } else if (pcmk_is_set(dev->flags, st_device_supports_status)) {
+ check_type = "status";
+ } else {
+ check_type = "none";
+ }
+ }
+
+ return check_type;
+}
+
static stonith_device_t *
build_device_from_xml(xmlNode * msg)
{
@@ -931,6 +956,12 @@ build_device_from_xml(xmlNode * msg)
value = g_hash_table_lookup(device->params, PCMK_STONITH_HOST_MAP);
device->aliases = build_port_aliases(value, &(device->targets));
+ value = target_list_type(device);
+ if (!pcmk__str_eq(value, "static-list", pcmk__str_casei) && device->targets) {
+ /* Other than "static-list", dev-> targets is unnecessary. */
+ g_list_free_full(device->targets, free);
+ device->targets = NULL;
+ }
device->agent_metadata = get_agent_metadata(device->agent);
if (device->agent_metadata) {
read_action_metadata(device);
@@ -971,31 +1002,6 @@ build_device_from_xml(xmlNode * msg)
return device;
}
-static const char *
-target_list_type(stonith_device_t * dev)
-{
- const char *check_type = NULL;
-
- check_type = g_hash_table_lookup(dev->params, PCMK_STONITH_HOST_CHECK);
-
- if (check_type == NULL) {
-
- if (g_hash_table_lookup(dev->params, PCMK_STONITH_HOST_LIST)) {
- check_type = "static-list";
- } else if (g_hash_table_lookup(dev->params, PCMK_STONITH_HOST_MAP)) {
- check_type = "static-list";
- } else if (pcmk_is_set(dev->flags, st_device_supports_list)) {
- check_type = "dynamic-list";
- } else if (pcmk_is_set(dev->flags, st_device_supports_status)) {
- check_type = "status";
- } else {
- check_type = "none";
- }
- }
-
- return check_type;
-}
-
static void
schedule_internal_command(const char *origin,
stonith_device_t * device,
@@ -1099,11 +1105,14 @@ dynamic_list_search_cb(GPid pid, int rc, const char *output, gpointer user_data)
/* If we successfully got the targets earlier, don't disable. */
if (rc != 0 && !dev->targets) {
- crm_notice("Disabling port list queries for %s: %s "
- CRM_XS " rc=%d", dev->id, output, rc);
- /* Fall back to status */
- g_hash_table_replace(dev->params,
+ if (g_hash_table_lookup(dev->params, PCMK_STONITH_HOST_CHECK) == NULL) {
+ /*
+ If the operation fails if the user does not explicitly specify "dynamic-list", it will fall back to "status".
+ */
+ crm_notice("Disabling port list queries for %s (%d): %s", dev->id, rc, output);
+ g_hash_table_replace(dev->params,
strdup(PCMK_STONITH_HOST_CHECK), strdup("status"));
+ }
} else if (!rc) {
crm_info("Refreshing port list for %s", dev->id);
g_list_free_full(dev->targets, free);
--
1.8.3.1

View File

@ -1,229 +0,0 @@
From 5bcab230ad4c647ca78b18bd4a66e30a4bb4417f Mon Sep 17 00:00:00 2001
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
Date: Wed, 16 Jun 2021 11:19:03 +0200
Subject: [PATCH 1/2] Feature: crm_resource: report not supported for --force-*
w/systemd, upstart, nagios and bundled resources
---
tools/crm_resource.c | 21 ++++----------
tools/crm_resource_runtime.c | 67 +++++++++++++++++++++++++++++---------------
2 files changed, 51 insertions(+), 37 deletions(-)
diff --git a/tools/crm_resource.c b/tools/crm_resource.c
index 4abdd03..fa7902c 100644
--- a/tools/crm_resource.c
+++ b/tools/crm_resource.c
@@ -660,21 +660,12 @@ attr_set_type_cb(const gchar *option_name, const gchar *optarg, gpointer data, G
gboolean
class_cb(const gchar *option_name, const gchar *optarg, gpointer data, GError **error) {
- if (!(pcmk_get_ra_caps(optarg) & pcmk_ra_cap_params)) {
- if (!args->quiet) {
- g_set_error(error, G_OPTION_ERROR, CRM_EX_INVALID_PARAM,
- "Standard %s does not support parameters\n", optarg);
- }
- return FALSE;
-
- } else {
- if (options.v_class != NULL) {
- free(options.v_class);
- }
-
- options.v_class = strdup(optarg);
+ if (options.v_class != NULL) {
+ free(options.v_class);
}
+ options.v_class = strdup(optarg);
+
options.cmdline_config = TRUE;
options.require_resource = FALSE;
return TRUE;
@@ -1422,7 +1413,7 @@ validate_cmdline_config(void)
} else if (options.rsc_cmd != cmd_execute_agent) {
g_set_error(&error, PCMK__EXITC_ERROR, CRM_EX_USAGE,
"--class, --agent, and --provider can only be used with "
- "--validate");
+ "--validate and --force-*");
// Not all of --class, --agent, and --provider need to be given. Not all
// classes support the concept of a provider. Check that what we were given
@@ -1841,7 +1832,7 @@ main(int argc, char **argv)
if (options.cmdline_config) {
exit_code = cli_resource_execute_from_params(out, NULL,
options.v_class, options.v_provider, options.v_agent,
- "validate-all", options.cmdline_params,
+ options.operation, options.cmdline_params,
options.override_params, options.timeout_ms,
args->verbosity, options.force, options.check_level);
} else {
diff --git a/tools/crm_resource_runtime.c b/tools/crm_resource_runtime.c
index fe42e60..59e6df5 100644
--- a/tools/crm_resource_runtime.c
+++ b/tools/crm_resource_runtime.c
@@ -1674,24 +1674,59 @@ wait_till_stable(pcmk__output_t *out, int timeout_ms, cib_t * cib)
return rc;
}
+static const char *
+get_action(const char *rsc_action) {
+ const char *action = NULL;
+
+ if (pcmk__str_eq(rsc_action, "validate", pcmk__str_casei)) {
+ action = "validate-all";
+
+ } else if (pcmk__str_eq(rsc_action, "force-check", pcmk__str_casei)) {
+ action = "monitor";
+
+ } else if (pcmk__strcase_any_of(rsc_action, "force-start", "force-stop",
+ "force-demote", "force-promote", NULL)) {
+ action = rsc_action+6;
+ } else {
+ action = rsc_action;
+ }
+
+ return action;
+}
+
crm_exit_t
cli_resource_execute_from_params(pcmk__output_t *out, const char *rsc_name,
const char *rsc_class, const char *rsc_prov,
- const char *rsc_type, const char *action,
+ const char *rsc_type, const char *rsc_action,
GHashTable *params, GHashTable *override_hash,
int timeout_ms, int resource_verbose, gboolean force,
int check_level)
{
+ const char *action = NULL;
GHashTable *params_copy = NULL;
crm_exit_t exit_code = CRM_EX_OK;
svc_action_t *op = NULL;
if (pcmk__str_eq(rsc_class, PCMK_RESOURCE_CLASS_STONITH, pcmk__str_casei)) {
out->err(out, "Sorry, the %s option doesn't support %s resources yet",
- action, rsc_class);
+ rsc_action, rsc_class);
+ crm_exit(CRM_EX_UNIMPLEMENT_FEATURE);
+ } else if (pcmk__strcase_any_of(rsc_class, PCMK_RESOURCE_CLASS_SYSTEMD,
+ PCMK_RESOURCE_CLASS_UPSTART, PCMK_RESOURCE_CLASS_NAGIOS, NULL)) {
+ out->err(out, "Sorry, the %s option doesn't support %s resources",
+ rsc_action, rsc_class);
+ crm_exit(CRM_EX_UNIMPLEMENT_FEATURE);
+ } else if (pcmk__str_eq(rsc_class, PCMK_RESOURCE_CLASS_SERVICE,
+ pcmk__str_casei) && !pcmk__str_eq(
+ resources_find_service_class(rsc_name), PCMK_RESOURCE_CLASS_LSB,
+ pcmk__str_casei)) {
+ out->err(out, "Sorry, the %s option doesn't support %s resources",
+ rsc_action, resources_find_service_class(rsc_name));
crm_exit(CRM_EX_UNIMPLEMENT_FEATURE);
}
+ action = get_action(rsc_action);
+
/* If no timeout was provided, grab the default. */
if (timeout_ms == 0) {
timeout_ms = crm_get_msec(CRM_DEFAULT_OP_TIMEOUT_S);
@@ -1766,7 +1801,7 @@ cli_resource_execute_from_params(pcmk__output_t *out, const char *rsc_name,
exit_code = op->rc;
out->message(out, "resource-agent-action", resource_verbose, rsc_class,
- rsc_prov, rsc_type, rsc_name, action, override_hash, op->rc,
+ rsc_prov, rsc_type, rsc_name, rsc_action, override_hash, op->rc,
op->status, op->stdout_data, op->stderr_data);
} else {
exit_code = op->rc == 0 ? CRM_EX_ERROR : op->rc;
@@ -1790,27 +1825,15 @@ cli_resource_execute(pe_resource_t *rsc, const char *requested_name,
const char *rtype = NULL;
const char *rprov = NULL;
const char *rclass = NULL;
- const char *action = NULL;
GHashTable *params = NULL;
- if (pcmk__str_eq(rsc_action, "validate", pcmk__str_casei)) {
- action = "validate-all";
-
- } else if (pcmk__str_eq(rsc_action, "force-check", pcmk__str_casei)) {
- action = "monitor";
-
- } else if (pcmk__str_eq(rsc_action, "force-stop", pcmk__str_casei)) {
- action = rsc_action+6;
-
- } else if (pcmk__strcase_any_of(rsc_action, "force-start", "force-demote",
+ if (pcmk__strcase_any_of(rsc_action, "force-start", "force-demote",
"force-promote", NULL)) {
- action = rsc_action+6;
-
if(pe_rsc_is_clone(rsc)) {
GList *nodes = cli_resource_search(rsc, requested_name, data_set);
if(nodes != NULL && force == FALSE) {
out->err(out, "It is not safe to %s %s here: the cluster claims it is already active",
- action, rsc->id);
+ rsc_action, rsc->id);
out->err(out, "Try setting target-role=Stopped first or specifying "
"the force option");
return CRM_EX_UNSAFE;
@@ -1818,9 +1841,6 @@ cli_resource_execute(pe_resource_t *rsc, const char *requested_name,
g_list_free_full(nodes, free);
}
-
- } else {
- action = rsc_action;
}
if(pe_rsc_is_clone(rsc)) {
@@ -1831,6 +1851,9 @@ cli_resource_execute(pe_resource_t *rsc, const char *requested_name,
if(rsc->variant == pe_group) {
out->err(out, "Sorry, the %s option doesn't support group resources", rsc_action);
return CRM_EX_UNIMPLEMENT_FEATURE;
+ } else if (rsc->variant == pe_container || pe_rsc_is_bundled(rsc)) {
+ out->err(out, "Sorry, the %s option doesn't support bundled resources", rsc_action);
+ return CRM_EX_UNIMPLEMENT_FEATURE;
}
rclass = crm_element_value(rsc->xml, XML_AGENT_ATTR_CLASS);
@@ -1841,12 +1864,12 @@ cli_resource_execute(pe_resource_t *rsc, const char *requested_name,
data_set);
if (timeout_ms == 0) {
- timeout_ms = pe_get_configured_timeout(rsc, action, data_set);
+ timeout_ms = pe_get_configured_timeout(rsc, get_action(rsc_action), data_set);
}
rid = pe_rsc_is_anon_clone(rsc->parent)? requested_name : rsc->id;
- exit_code = cli_resource_execute_from_params(out, rid, rclass, rprov, rtype, action,
+ exit_code = cli_resource_execute_from_params(out, rid, rclass, rprov, rtype, rsc_action,
params, override_hash, timeout_ms,
resource_verbose, force, check_level);
return exit_code;
--
1.8.3.1
From 289cd231186755d99c1262eb9f968dc852409588 Mon Sep 17 00:00:00 2001
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
Date: Fri, 16 Jul 2021 13:20:55 +0200
Subject: [PATCH 2/2] Refactor: crm_resource: remove duplicate Overriding
message that's handled elsewhere
---
tools/crm_resource_runtime.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/tools/crm_resource_runtime.c b/tools/crm_resource_runtime.c
index 59e6df5..ce037c5 100644
--- a/tools/crm_resource_runtime.c
+++ b/tools/crm_resource_runtime.c
@@ -1791,8 +1791,6 @@ cli_resource_execute_from_params(pcmk__output_t *out, const char *rsc_name,
g_hash_table_iter_init(&iter, override_hash);
while (g_hash_table_iter_next(&iter, (gpointer *) & name, (gpointer *) & value)) {
- out->info(out, "Overriding the cluster configuration for '%s' with '%s' = '%s'",
- rsc_name, name, value);
g_hash_table_replace(op->params, strdup(name), strdup(value));
}
}
--
1.8.3.1

View File

@ -1,715 +0,0 @@
From b0347f7b8e609420a7055d5fe537cc40ac0d1bb2 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Fri, 16 Jul 2021 11:08:05 -0500
Subject: [PATCH 1/3] Fix: scheduler: don't schedule probes of unmanaged
resources on pending nodes
Previously, custom_action() would set an action's optional or runnable flag in
the same, exclusive if-else sequence. This means that if an action should be
optional *and* runnable, only one would be set. In particular, this meant that
if a resource is unmanaged *and* its allocated node is pending, any probe would
be set to optional, but not unrunnable, and the controller could wrongly
attempt the probe before the join completed.
Now, optional is checked separately.
---
lib/pengine/utils.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/lib/pengine/utils.c b/lib/pengine/utils.c
index 5ef742e..965824b 100644
--- a/lib/pengine/utils.c
+++ b/lib/pengine/utils.c
@@ -541,6 +541,20 @@ custom_action(pe_resource_t * rsc, char *key, const char *task,
FALSE, data_set);
}
+ // Make the action optional if its resource is unmanaged
+ if (!pcmk_is_set(action->flags, pe_action_pseudo)
+ && (action->node != NULL)
+ && !pcmk_is_set(action->rsc->flags, pe_rsc_managed)
+ && (g_hash_table_lookup(action->meta,
+ XML_LRM_ATTR_INTERVAL_MS) == NULL)) {
+ pe_rsc_debug(rsc, "%s on %s is optional (%s is unmanaged)",
+ action->uuid, action->node->details->uname,
+ action->rsc->id);
+ pe__set_action_flags(action, pe_action_optional);
+ // We shouldn't clear runnable here because ... something
+ }
+
+ // Make the action runnable or unrunnable as appropriate
if (pcmk_is_set(action->flags, pe_action_pseudo)) {
/* leave untouched */
@@ -549,14 +563,6 @@ custom_action(pe_resource_t * rsc, char *key, const char *task,
action->uuid);
pe__clear_action_flags(action, pe_action_runnable);
- } else if (!pcmk_is_set(rsc->flags, pe_rsc_managed)
- && g_hash_table_lookup(action->meta,
- XML_LRM_ATTR_INTERVAL_MS) == NULL) {
- pe_rsc_debug(rsc, "%s on %s is optional (%s is unmanaged)",
- action->uuid, action->node->details->uname, rsc->id);
- pe__set_action_flags(action, pe_action_optional);
- //pe__clear_action_flags(action, pe_action_runnable);
-
} else if (!pcmk_is_set(action->flags, pe_action_dc)
&& !(action->node->details->online)
&& (!pe__is_guest_node(action->node)
--
1.8.3.1
From 520303b90eb707f5b7a9afa9b106e4a38b90f0f9 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Wed, 14 Jul 2021 17:18:44 -0500
Subject: [PATCH 2/3] Test: scheduler: update existing tests for probe
scheduling change
This is an improvement. Looking at bundle-probe-order-2 for example,
the bundle's first instance has this status to start:
* Replica[0]
* galera (ocf::heartbeat:galera): Stopped (unmanaged)
* galera-bundle-docker-0 (ocf::heartbeat:docker): Started centos2 (unmanaged)
* galera-bundle-0 (ocf::pacemaker:remote): Started centos2 (unmanaged)
After the changes, we now schedule recurring monitors for
galera-bundle-docker-0 and galera-bundle-0 on centos2, and a probe of galera:0
on galera-bundle-0, all of which are possible.
---
cts/scheduler/dot/bundle-probe-order-2.dot | 3 ++
cts/scheduler/dot/bundle-probe-order-3.dot | 1 +
cts/scheduler/exp/bundle-probe-order-2.exp | 33 ++++++++++++++++++++--
cts/scheduler/exp/bundle-probe-order-3.exp | 21 ++++++++++----
cts/scheduler/summary/bundle-probe-order-2.summary | 3 ++
cts/scheduler/summary/bundle-probe-order-3.summary | 1 +
6 files changed, 53 insertions(+), 9 deletions(-)
diff --git a/cts/scheduler/dot/bundle-probe-order-2.dot b/cts/scheduler/dot/bundle-probe-order-2.dot
index 0cce3fd..7706195 100644
--- a/cts/scheduler/dot/bundle-probe-order-2.dot
+++ b/cts/scheduler/dot/bundle-probe-order-2.dot
@@ -1,6 +1,9 @@
digraph "g" {
+"galera-bundle-0_monitor_30000 centos2" [ style=bold color="green" fontcolor="black"]
+"galera-bundle-docker-0_monitor_60000 centos2" [ style=bold color="green" fontcolor="black"]
"galera-bundle-docker-1_monitor_0 centos2" [ style=bold color="green" fontcolor="black"]
"galera-bundle-docker-2_monitor_0 centos1" [ style=bold color="green" fontcolor="black"]
"galera-bundle-docker-2_monitor_0 centos2" [ style=bold color="green" fontcolor="black"]
"galera-bundle-docker-2_monitor_0 centos3" [ style=bold color="green" fontcolor="black"]
+"galera:0_monitor_0 galera-bundle-0" [ style=bold color="green" fontcolor="black"]
}
diff --git a/cts/scheduler/dot/bundle-probe-order-3.dot b/cts/scheduler/dot/bundle-probe-order-3.dot
index a4b109f..53a384b 100644
--- a/cts/scheduler/dot/bundle-probe-order-3.dot
+++ b/cts/scheduler/dot/bundle-probe-order-3.dot
@@ -2,6 +2,7 @@
"galera-bundle-0_monitor_0 centos1" [ style=bold color="green" fontcolor="black"]
"galera-bundle-0_monitor_0 centos2" [ style=bold color="green" fontcolor="black"]
"galera-bundle-0_monitor_0 centos3" [ style=bold color="green" fontcolor="black"]
+"galera-bundle-docker-0_monitor_60000 centos2" [ style=bold color="green" fontcolor="black"]
"galera-bundle-docker-1_monitor_0 centos2" [ style=bold color="green" fontcolor="black"]
"galera-bundle-docker-2_monitor_0 centos1" [ style=bold color="green" fontcolor="black"]
"galera-bundle-docker-2_monitor_0 centos2" [ style=bold color="green" fontcolor="black"]
diff --git a/cts/scheduler/exp/bundle-probe-order-2.exp b/cts/scheduler/exp/bundle-probe-order-2.exp
index d6174e7..5b28050 100644
--- a/cts/scheduler/exp/bundle-probe-order-2.exp
+++ b/cts/scheduler/exp/bundle-probe-order-2.exp
@@ -1,6 +1,33 @@
<transition_graph cluster-delay="60s" stonith-timeout="60s" failed-stop-offset="INFINITY" failed-start-offset="INFINITY" transition_id="0">
<synapse id="0">
<action_set>
+ <rsc_op id="14" operation="monitor" operation_key="galera:0_monitor_0" on_node="galera-bundle-0" on_node_uuid="galera-bundle-0" router_node="centos2">
+ <primitive id="galera" long-id="galera:0" class="ocf" provider="heartbeat" type="galera"/>
+ <attributes CRM_meta_clone="0" CRM_meta_clone_max="3" CRM_meta_clone_node_max="1" CRM_meta_container_attribute_target="host" CRM_meta_globally_unique="false" CRM_meta_master_max="3" CRM_meta_master_node_max="1" CRM_meta_notify="false" CRM_meta_on_node="galera-bundle-0" CRM_meta_on_node_uuid="galera-bundle-0" CRM_meta_op_target_rc="7" CRM_meta_physical_host="centos2" CRM_meta_promoted_max="3" CRM_meta_promoted_node_max="1" CRM_meta_timeout="30000" cluster_host_map="centos1:centos1;centos2:centos2;centos3:centos3" enable_creation="true" wsrep_cluster_address="gcomm://centos1,centos2,centos3"/>
+ </rsc_op>
+ </action_set>
+ <inputs/>
+ </synapse>
+ <synapse id="1">
+ <action_set>
+ <rsc_op id="16" operation="monitor" operation_key="galera-bundle-docker-0_monitor_60000" on_node="centos2" on_node_uuid="2">
+ <primitive id="galera-bundle-docker-0" class="ocf" provider="heartbeat" type="docker"/>
+ <attributes CRM_meta_interval="60000" CRM_meta_name="monitor" CRM_meta_on_node="centos2" CRM_meta_on_node_uuid="2" CRM_meta_timeout="20000" allow_pull="true" force_kill="false" image="docker.io/tripleoupstream/centos-binary-mariadb:latest" monitor_cmd="/bin/true" mount_points="/var/log/pacemaker/bundles/galera-bundle-0" reuse="false" run_cmd="/usr/sbin/pacemaker_remoted" run_opts=" --restart=no -e PCMK_stderr=1 --net=host -e PCMK_remote_port=3123 -v /foo:/etc/libqb/force-filesystem-sockets:ro -v /etc/my.cnf.d/galera.cnf:/etc/my.cnf.d/galera.cnf:ro -v /var/lib/mysql:/var/lib/mysql:rw -v /etc/pacemaker/authkey:/etc/pacemaker/authkey -v /var/log/pacemaker/bundles/galera-bundle-0:/var/log --user=root --log-driver=journald "/>
+ </rsc_op>
+ </action_set>
+ <inputs/>
+ </synapse>
+ <synapse id="2">
+ <action_set>
+ <rsc_op id="18" operation="monitor" operation_key="galera-bundle-0_monitor_30000" on_node="centos2" on_node_uuid="2">
+ <primitive id="galera-bundle-0" class="ocf" provider="pacemaker" type="remote"/>
+ <attributes CRM_meta_container="galera-bundle-docker-0" CRM_meta_interval="30000" CRM_meta_name="monitor" CRM_meta_on_node="centos2" CRM_meta_on_node_uuid="2" CRM_meta_timeout="30000" addr="centos2" port="3123"/>
+ </rsc_op>
+ </action_set>
+ <inputs/>
+ </synapse>
+ <synapse id="3">
+ <action_set>
<rsc_op id="7" operation="monitor" operation_key="galera-bundle-docker-1_monitor_0" on_node="centos2" on_node_uuid="2">
<primitive id="galera-bundle-docker-1" class="ocf" provider="heartbeat" type="docker"/>
<attributes CRM_meta_on_node="centos2" CRM_meta_on_node_uuid="2" CRM_meta_op_target_rc="7" CRM_meta_timeout="20000" allow_pull="true" force_kill="false" image="docker.io/tripleoupstream/centos-binary-mariadb:latest" monitor_cmd="/bin/true" mount_points="/var/log/pacemaker/bundles/galera-bundle-1" reuse="false" run_cmd="/usr/sbin/pacemaker_remoted" run_opts=" --restart=no -e PCMK_stderr=1 --net=host -e PCMK_remote_port=3123 -v /foo:/etc/libqb/force-filesystem-sockets:ro -v /etc/my.cnf.d/galera.cnf:/etc/my.cnf.d/galera.cnf:ro -v /var/lib/mysql:/var/lib/mysql:rw -v /etc/pacemaker/authkey:/etc/pacemaker/authkey -v /var/log/pacemaker/bundles/galera-bundle-1:/var/log --user=root --log-driver=journald "/>
@@ -8,7 +35,7 @@
</action_set>
<inputs/>
</synapse>
- <synapse id="1">
+ <synapse id="4">
<action_set>
<rsc_op id="12" operation="monitor" operation_key="galera-bundle-docker-2_monitor_0" on_node="centos3" on_node_uuid="3">
<primitive id="galera-bundle-docker-2" class="ocf" provider="heartbeat" type="docker"/>
@@ -17,7 +44,7 @@
</action_set>
<inputs/>
</synapse>
- <synapse id="2">
+ <synapse id="5">
<action_set>
<rsc_op id="9" operation="monitor" operation_key="galera-bundle-docker-2_monitor_0" on_node="centos2" on_node_uuid="2">
<primitive id="galera-bundle-docker-2" class="ocf" provider="heartbeat" type="docker"/>
@@ -26,7 +53,7 @@
</action_set>
<inputs/>
</synapse>
- <synapse id="3">
+ <synapse id="6">
<action_set>
<rsc_op id="5" operation="monitor" operation_key="galera-bundle-docker-2_monitor_0" on_node="centos1" on_node_uuid="1">
<primitive id="galera-bundle-docker-2" class="ocf" provider="heartbeat" type="docker"/>
diff --git a/cts/scheduler/exp/bundle-probe-order-3.exp b/cts/scheduler/exp/bundle-probe-order-3.exp
index e1f60e7..69140a4 100644
--- a/cts/scheduler/exp/bundle-probe-order-3.exp
+++ b/cts/scheduler/exp/bundle-probe-order-3.exp
@@ -1,6 +1,15 @@
<transition_graph cluster-delay="60s" stonith-timeout="60s" failed-stop-offset="INFINITY" failed-start-offset="INFINITY" transition_id="0">
<synapse id="0">
<action_set>
+ <rsc_op id="16" operation="monitor" operation_key="galera-bundle-docker-0_monitor_60000" on_node="centos2" on_node_uuid="2">
+ <primitive id="galera-bundle-docker-0" class="ocf" provider="heartbeat" type="docker"/>
+ <attributes CRM_meta_interval="60000" CRM_meta_name="monitor" CRM_meta_on_node="centos2" CRM_meta_on_node_uuid="2" CRM_meta_timeout="20000" allow_pull="true" force_kill="false" image="docker.io/tripleoupstream/centos-binary-mariadb:latest" monitor_cmd="/bin/true" mount_points="/var/log/pacemaker/bundles/galera-bundle-0" reuse="false" run_cmd="/usr/sbin/pacemaker_remoted" run_opts=" --restart=no -e PCMK_stderr=1 --net=host -e PCMK_remote_port=3123 -v /foo:/etc/libqb/force-filesystem-sockets:ro -v /etc/my.cnf.d/galera.cnf:/etc/my.cnf.d/galera.cnf:ro -v /var/lib/mysql:/var/lib/mysql:rw -v /etc/pacemaker/authkey:/etc/pacemaker/authkey -v /var/log/pacemaker/bundles/galera-bundle-0:/var/log --user=root --log-driver=journald "/>
+ </rsc_op>
+ </action_set>
+ <inputs/>
+ </synapse>
+ <synapse id="1">
+ <action_set>
<rsc_op id="11" operation="monitor" operation_key="galera-bundle-0_monitor_0" on_node="centos3" on_node_uuid="3">
<primitive id="galera-bundle-0" class="ocf" provider="pacemaker" type="remote"/>
<attributes CRM_meta_container="galera-bundle-docker-0" CRM_meta_on_node="centos3" CRM_meta_on_node_uuid="3" CRM_meta_op_target_rc="7" CRM_meta_timeout="30000" addr="centos2" port="3123"/>
@@ -8,7 +17,7 @@
</action_set>
<inputs/>
</synapse>
- <synapse id="1">
+ <synapse id="2">
<action_set>
<rsc_op id="6" operation="monitor" operation_key="galera-bundle-0_monitor_0" on_node="centos2" on_node_uuid="2">
<primitive id="galera-bundle-0" class="ocf" provider="pacemaker" type="remote"/>
@@ -17,7 +26,7 @@
</action_set>
<inputs/>
</synapse>
- <synapse id="2">
+ <synapse id="3">
<action_set>
<rsc_op id="3" operation="monitor" operation_key="galera-bundle-0_monitor_0" on_node="centos1" on_node_uuid="1">
<primitive id="galera-bundle-0" class="ocf" provider="pacemaker" type="remote"/>
@@ -26,7 +35,7 @@
</action_set>
<inputs/>
</synapse>
- <synapse id="3">
+ <synapse id="4">
<action_set>
<rsc_op id="7" operation="monitor" operation_key="galera-bundle-docker-1_monitor_0" on_node="centos2" on_node_uuid="2">
<primitive id="galera-bundle-docker-1" class="ocf" provider="heartbeat" type="docker"/>
@@ -35,7 +44,7 @@
</action_set>
<inputs/>
</synapse>
- <synapse id="4">
+ <synapse id="5">
<action_set>
<rsc_op id="13" operation="monitor" operation_key="galera-bundle-docker-2_monitor_0" on_node="centos3" on_node_uuid="3">
<primitive id="galera-bundle-docker-2" class="ocf" provider="heartbeat" type="docker"/>
@@ -44,7 +53,7 @@
</action_set>
<inputs/>
</synapse>
- <synapse id="5">
+ <synapse id="6">
<action_set>
<rsc_op id="9" operation="monitor" operation_key="galera-bundle-docker-2_monitor_0" on_node="centos2" on_node_uuid="2">
<primitive id="galera-bundle-docker-2" class="ocf" provider="heartbeat" type="docker"/>
@@ -53,7 +62,7 @@
</action_set>
<inputs/>
</synapse>
- <synapse id="6">
+ <synapse id="7">
<action_set>
<rsc_op id="4" operation="monitor" operation_key="galera-bundle-docker-2_monitor_0" on_node="centos1" on_node_uuid="1">
<primitive id="galera-bundle-docker-2" class="ocf" provider="heartbeat" type="docker"/>
diff --git a/cts/scheduler/summary/bundle-probe-order-2.summary b/cts/scheduler/summary/bundle-probe-order-2.summary
index 681d607..024c472 100644
--- a/cts/scheduler/summary/bundle-probe-order-2.summary
+++ b/cts/scheduler/summary/bundle-probe-order-2.summary
@@ -13,6 +13,9 @@ Current cluster status:
Transition Summary:
Executing Cluster Transition:
+ * Resource action: galera:0 monitor on galera-bundle-0
+ * Resource action: galera-bundle-docker-0 monitor=60000 on centos2
+ * Resource action: galera-bundle-0 monitor=30000 on centos2
* Resource action: galera-bundle-docker-1 monitor on centos2
* Resource action: galera-bundle-docker-2 monitor on centos3
* Resource action: galera-bundle-docker-2 monitor on centos2
diff --git a/cts/scheduler/summary/bundle-probe-order-3.summary b/cts/scheduler/summary/bundle-probe-order-3.summary
index f089618..331bd87 100644
--- a/cts/scheduler/summary/bundle-probe-order-3.summary
+++ b/cts/scheduler/summary/bundle-probe-order-3.summary
@@ -12,6 +12,7 @@ Current cluster status:
Transition Summary:
Executing Cluster Transition:
+ * Resource action: galera-bundle-docker-0 monitor=60000 on centos2
* Resource action: galera-bundle-0 monitor on centos3
* Resource action: galera-bundle-0 monitor on centos2
* Resource action: galera-bundle-0 monitor on centos1
--
1.8.3.1
From cb9c294a7ef22916866e0e42e51e88c2b1a61c2e Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Wed, 14 Jul 2021 17:23:11 -0500
Subject: [PATCH 3/3] Test: scheduler: add test for probe of unmanaged resource
on pending node
No probes should be scheduled in this case
---
cts/cts-scheduler.in | 1 +
cts/scheduler/dot/probe-pending-node.dot | 2 +
cts/scheduler/exp/probe-pending-node.exp | 1 +
cts/scheduler/scores/probe-pending-node.scores | 61 ++++++
cts/scheduler/summary/probe-pending-node.summary | 55 +++++
cts/scheduler/xml/probe-pending-node.xml | 247 +++++++++++++++++++++++
6 files changed, 367 insertions(+)
create mode 100644 cts/scheduler/dot/probe-pending-node.dot
create mode 100644 cts/scheduler/exp/probe-pending-node.exp
create mode 100644 cts/scheduler/scores/probe-pending-node.scores
create mode 100644 cts/scheduler/summary/probe-pending-node.summary
create mode 100644 cts/scheduler/xml/probe-pending-node.xml
diff --git a/cts/cts-scheduler.in b/cts/cts-scheduler.in
index fc9790b..7ba2415 100644
--- a/cts/cts-scheduler.in
+++ b/cts/cts-scheduler.in
@@ -110,6 +110,7 @@ TESTS = [
[ "probe-2", "Correctly re-probe cloned groups" ],
[ "probe-3", "Probe (pending node)" ],
[ "probe-4", "Probe (pending node + stopped resource)" ],
+ [ "probe-pending-node", "Probe (pending node + unmanaged resource)" ],
[ "standby", "Standby" ],
[ "comments", "Comments" ],
],
diff --git a/cts/scheduler/dot/probe-pending-node.dot b/cts/scheduler/dot/probe-pending-node.dot
new file mode 100644
index 0000000..d8f1c9f
--- /dev/null
+++ b/cts/scheduler/dot/probe-pending-node.dot
@@ -0,0 +1,2 @@
+ digraph "g" {
+}
diff --git a/cts/scheduler/exp/probe-pending-node.exp b/cts/scheduler/exp/probe-pending-node.exp
new file mode 100644
index 0000000..56e315f
--- /dev/null
+++ b/cts/scheduler/exp/probe-pending-node.exp
@@ -0,0 +1 @@
+<transition_graph cluster-delay="60s" stonith-timeout="60s" failed-stop-offset="INFINITY" failed-start-offset="INFINITY" transition_id="0"/>
diff --git a/cts/scheduler/scores/probe-pending-node.scores b/cts/scheduler/scores/probe-pending-node.scores
new file mode 100644
index 0000000..020a1a0
--- /dev/null
+++ b/cts/scheduler/scores/probe-pending-node.scores
@@ -0,0 +1,61 @@
+
+pcmk__clone_allocate: fs_UC5_SAPMNT-clone allocation score on gcdoubwap01: 0
+pcmk__clone_allocate: fs_UC5_SAPMNT-clone allocation score on gcdoubwap02: 0
+pcmk__clone_allocate: fs_UC5_SAPMNT:0 allocation score on gcdoubwap01: 0
+pcmk__clone_allocate: fs_UC5_SAPMNT:0 allocation score on gcdoubwap02: 0
+pcmk__clone_allocate: fs_UC5_SAPMNT:1 allocation score on gcdoubwap01: 0
+pcmk__clone_allocate: fs_UC5_SAPMNT:1 allocation score on gcdoubwap02: 0
+pcmk__clone_allocate: fs_UC5_SYS-clone allocation score on gcdoubwap01: 0
+pcmk__clone_allocate: fs_UC5_SYS-clone allocation score on gcdoubwap02: 0
+pcmk__clone_allocate: fs_UC5_SYS:0 allocation score on gcdoubwap01: 0
+pcmk__clone_allocate: fs_UC5_SYS:0 allocation score on gcdoubwap02: 0
+pcmk__clone_allocate: fs_UC5_SYS:1 allocation score on gcdoubwap01: 0
+pcmk__clone_allocate: fs_UC5_SYS:1 allocation score on gcdoubwap02: 0
+pcmk__group_allocate: fs_UC5_ascs allocation score on gcdoubwap01: 0
+pcmk__group_allocate: fs_UC5_ascs allocation score on gcdoubwap02: 0
+pcmk__group_allocate: fs_UC5_ers allocation score on gcdoubwap01: 0
+pcmk__group_allocate: fs_UC5_ers allocation score on gcdoubwap02: 0
+pcmk__group_allocate: grp_UC5_ascs allocation score on gcdoubwap01: 0
+pcmk__group_allocate: grp_UC5_ascs allocation score on gcdoubwap02: 0
+pcmk__group_allocate: grp_UC5_ers allocation score on gcdoubwap01: 0
+pcmk__group_allocate: grp_UC5_ers allocation score on gcdoubwap02: 0
+pcmk__group_allocate: rsc_sap_UC5_ASCS11 allocation score on gcdoubwap01: 0
+pcmk__group_allocate: rsc_sap_UC5_ASCS11 allocation score on gcdoubwap02: 0
+pcmk__group_allocate: rsc_sap_UC5_ERS12 allocation score on gcdoubwap01: 0
+pcmk__group_allocate: rsc_sap_UC5_ERS12 allocation score on gcdoubwap02: 0
+pcmk__group_allocate: rsc_vip_gcp_ascs allocation score on gcdoubwap01: INFINITY
+pcmk__group_allocate: rsc_vip_gcp_ascs allocation score on gcdoubwap02: 0
+pcmk__group_allocate: rsc_vip_gcp_ers allocation score on gcdoubwap01: 0
+pcmk__group_allocate: rsc_vip_gcp_ers allocation score on gcdoubwap02: 0
+pcmk__group_allocate: rsc_vip_init_ers allocation score on gcdoubwap01: 0
+pcmk__group_allocate: rsc_vip_init_ers allocation score on gcdoubwap02: 0
+pcmk__group_allocate: rsc_vip_int_ascs allocation score on gcdoubwap01: 0
+pcmk__group_allocate: rsc_vip_int_ascs allocation score on gcdoubwap02: 0
+pcmk__native_allocate: fs_UC5_SAPMNT:0 allocation score on gcdoubwap01: 0
+pcmk__native_allocate: fs_UC5_SAPMNT:0 allocation score on gcdoubwap02: -INFINITY
+pcmk__native_allocate: fs_UC5_SAPMNT:1 allocation score on gcdoubwap01: 0
+pcmk__native_allocate: fs_UC5_SAPMNT:1 allocation score on gcdoubwap02: -INFINITY
+pcmk__native_allocate: fs_UC5_SYS:0 allocation score on gcdoubwap01: 0
+pcmk__native_allocate: fs_UC5_SYS:0 allocation score on gcdoubwap02: -INFINITY
+pcmk__native_allocate: fs_UC5_SYS:1 allocation score on gcdoubwap01: 0
+pcmk__native_allocate: fs_UC5_SYS:1 allocation score on gcdoubwap02: -INFINITY
+pcmk__native_allocate: fs_UC5_ascs allocation score on gcdoubwap01: 0
+pcmk__native_allocate: fs_UC5_ascs allocation score on gcdoubwap02: -INFINITY
+pcmk__native_allocate: fs_UC5_ers allocation score on gcdoubwap01: -INFINITY
+pcmk__native_allocate: fs_UC5_ers allocation score on gcdoubwap02: -INFINITY
+pcmk__native_allocate: rsc_sap_UC5_ASCS11 allocation score on gcdoubwap01: -INFINITY
+pcmk__native_allocate: rsc_sap_UC5_ASCS11 allocation score on gcdoubwap02: -INFINITY
+pcmk__native_allocate: rsc_sap_UC5_ERS12 allocation score on gcdoubwap01: -INFINITY
+pcmk__native_allocate: rsc_sap_UC5_ERS12 allocation score on gcdoubwap02: -INFINITY
+pcmk__native_allocate: rsc_vip_gcp_ascs allocation score on gcdoubwap01: -INFINITY
+pcmk__native_allocate: rsc_vip_gcp_ascs allocation score on gcdoubwap02: -INFINITY
+pcmk__native_allocate: rsc_vip_gcp_ers allocation score on gcdoubwap01: -INFINITY
+pcmk__native_allocate: rsc_vip_gcp_ers allocation score on gcdoubwap02: -INFINITY
+pcmk__native_allocate: rsc_vip_init_ers allocation score on gcdoubwap01: 0
+pcmk__native_allocate: rsc_vip_init_ers allocation score on gcdoubwap02: -INFINITY
+pcmk__native_allocate: rsc_vip_int_ascs allocation score on gcdoubwap01: INFINITY
+pcmk__native_allocate: rsc_vip_int_ascs allocation score on gcdoubwap02: -INFINITY
+pcmk__native_allocate: stonith_gcdoubwap01 allocation score on gcdoubwap01: -INFINITY
+pcmk__native_allocate: stonith_gcdoubwap01 allocation score on gcdoubwap02: 0
+pcmk__native_allocate: stonith_gcdoubwap02 allocation score on gcdoubwap01: 0
+pcmk__native_allocate: stonith_gcdoubwap02 allocation score on gcdoubwap02: -INFINITY
diff --git a/cts/scheduler/summary/probe-pending-node.summary b/cts/scheduler/summary/probe-pending-node.summary
new file mode 100644
index 0000000..208186b
--- /dev/null
+++ b/cts/scheduler/summary/probe-pending-node.summary
@@ -0,0 +1,55 @@
+Using the original execution date of: 2021-06-11 13:55:24Z
+
+ *** Resource management is DISABLED ***
+ The cluster will not attempt to start, stop or recover services
+
+Current cluster status:
+ * Node List:
+ * Node gcdoubwap02: pending
+ * Online: [ gcdoubwap01 ]
+
+ * Full List of Resources:
+ * stonith_gcdoubwap01 (stonith:fence_gce): Stopped (unmanaged)
+ * stonith_gcdoubwap02 (stonith:fence_gce): Stopped (unmanaged)
+ * Clone Set: fs_UC5_SAPMNT-clone [fs_UC5_SAPMNT] (unmanaged):
+ * Stopped: [ gcdoubwap01 gcdoubwap02 ]
+ * Clone Set: fs_UC5_SYS-clone [fs_UC5_SYS] (unmanaged):
+ * Stopped: [ gcdoubwap01 gcdoubwap02 ]
+ * Resource Group: grp_UC5_ascs (unmanaged):
+ * rsc_vip_int_ascs (ocf:heartbeat:IPaddr2): Stopped (unmanaged)
+ * rsc_vip_gcp_ascs (ocf:heartbeat:gcp-vpc-move-vip): Started gcdoubwap01 (unmanaged)
+ * fs_UC5_ascs (ocf:heartbeat:Filesystem): Stopped (unmanaged)
+ * rsc_sap_UC5_ASCS11 (ocf:heartbeat:SAPInstance): Stopped (unmanaged)
+ * Resource Group: grp_UC5_ers (unmanaged):
+ * rsc_vip_init_ers (ocf:heartbeat:IPaddr2): Stopped (unmanaged)
+ * rsc_vip_gcp_ers (ocf:heartbeat:gcp-vpc-move-vip): Stopped (unmanaged)
+ * fs_UC5_ers (ocf:heartbeat:Filesystem): Stopped (unmanaged)
+ * rsc_sap_UC5_ERS12 (ocf:heartbeat:SAPInstance): Stopped (unmanaged)
+
+Transition Summary:
+
+Executing Cluster Transition:
+Using the original execution date of: 2021-06-11 13:55:24Z
+
+Revised Cluster Status:
+ * Node List:
+ * Node gcdoubwap02: pending
+ * Online: [ gcdoubwap01 ]
+
+ * Full List of Resources:
+ * stonith_gcdoubwap01 (stonith:fence_gce): Stopped (unmanaged)
+ * stonith_gcdoubwap02 (stonith:fence_gce): Stopped (unmanaged)
+ * Clone Set: fs_UC5_SAPMNT-clone [fs_UC5_SAPMNT] (unmanaged):
+ * Stopped: [ gcdoubwap01 gcdoubwap02 ]
+ * Clone Set: fs_UC5_SYS-clone [fs_UC5_SYS] (unmanaged):
+ * Stopped: [ gcdoubwap01 gcdoubwap02 ]
+ * Resource Group: grp_UC5_ascs (unmanaged):
+ * rsc_vip_int_ascs (ocf:heartbeat:IPaddr2): Stopped (unmanaged)
+ * rsc_vip_gcp_ascs (ocf:heartbeat:gcp-vpc-move-vip): Started gcdoubwap01 (unmanaged)
+ * fs_UC5_ascs (ocf:heartbeat:Filesystem): Stopped (unmanaged)
+ * rsc_sap_UC5_ASCS11 (ocf:heartbeat:SAPInstance): Stopped (unmanaged)
+ * Resource Group: grp_UC5_ers (unmanaged):
+ * rsc_vip_init_ers (ocf:heartbeat:IPaddr2): Stopped (unmanaged)
+ * rsc_vip_gcp_ers (ocf:heartbeat:gcp-vpc-move-vip): Stopped (unmanaged)
+ * fs_UC5_ers (ocf:heartbeat:Filesystem): Stopped (unmanaged)
+ * rsc_sap_UC5_ERS12 (ocf:heartbeat:SAPInstance): Stopped (unmanaged)
diff --git a/cts/scheduler/xml/probe-pending-node.xml b/cts/scheduler/xml/probe-pending-node.xml
new file mode 100644
index 0000000..9f55c92
--- /dev/null
+++ b/cts/scheduler/xml/probe-pending-node.xml
@@ -0,0 +1,247 @@
+<cib crm_feature_set="3.0.14" validate-with="pacemaker-2.10" epoch="395" num_updates="30" admin_epoch="0" cib-last-written="Thu Jun 10 18:01:13 2021" update-origin="gcdoubwap01" update-client="cibadmin" update-user="root" have-quorum="1" dc-uuid="1" execution-date="1623419724">
+ <configuration>
+ <crm_config>
+ <cluster_property_set id="cib-bootstrap-options">
+ <nvpair id="cib-bootstrap-options-have-watchdog" name="have-watchdog" value="false"/>
+ <nvpair id="cib-bootstrap-options-dc-version" name="dc-version" value="1.1.19-8.el7_6.5-c3c624ea3d"/>
+ <nvpair id="cib-bootstrap-options-cluster-infrastructure" name="cluster-infrastructure" value="corosync"/>
+ <nvpair id="cib-bootstrap-options-cluster-name" name="cluster-name" value="ascscluster"/>
+ <nvpair id="cib-bootstrap-options-maintenance-mode" name="maintenance-mode" value="true"/>
+ <nvpair id="cib-bootstrap-options-last-lrm-refresh" name="last-lrm-refresh" value="1622815036"/>
+ </cluster_property_set>
+ </crm_config>
+ <nodes>
+ <node id="1" uname="gcdoubwap01"/>
+ <node id="2" uname="gcdoubwap02"/>
+ </nodes>
+ <resources>
+ <primitive class="stonith" id="stonith_gcdoubwap01" type="fence_gce">
+ <instance_attributes id="stonith_gcdoubwap01-instance_attributes">
+ <nvpair id="stonith_gcdoubwap01-instance_attributes-project" name="project" value="pj-uat-do-nane1-01"/>
+ <nvpair id="stonith_gcdoubwap01-instance_attributes-zone" name="zone" value="northamerica-northeast1-b"/>
+ </instance_attributes>
+ <operations>
+ <op id="stonith_gcdoubwap01-monitor-interval-60s" interval="60s" name="monitor"/>
+ </operations>
+ </primitive>
+ <primitive class="stonith" id="stonith_gcdoubwap02" type="fence_gce">
+ <instance_attributes id="stonith_gcdoubwap02-instance_attributes">
+ <nvpair id="stonith_gcdoubwap02-instance_attributes-project" name="project" value="pj-uat-do-nane1-01"/>
+ <nvpair id="stonith_gcdoubwap02-instance_attributes-zone" name="zone" value="northamerica-northeast1-c"/>
+ </instance_attributes>
+ <operations>
+ <op id="stonith_gcdoubwap02-monitor-interval-60s" interval="60s" name="monitor"/>
+ </operations>
+ </primitive>
+ <clone id="fs_UC5_SAPMNT-clone">
+ <primitive class="ocf" id="fs_UC5_SAPMNT" provider="heartbeat" type="Filesystem">
+ <instance_attributes id="fs_UC5_SAPMNT-instance_attributes">
+ <nvpair id="fs_UC5_SAPMNT-instance_attributes-device" name="device" value="uatdoelfs.igmfinancial.net:UC5_sapmnt/root"/>
+ <nvpair id="fs_UC5_SAPMNT-instance_attributes-directory" name="directory" value="/sapmnt/UC5"/>
+ <nvpair id="fs_UC5_SAPMNT-instance_attributes-fstype" name="fstype" value="nfs"/>
+ </instance_attributes>
+ <operations>
+ <op id="fs_UC5_SAPMNT-monitor-interval-20s" interval="20s" name="monitor" timeout="40s"/>
+ <op id="fs_UC5_SAPMNT-notify-interval-0s" interval="0s" name="notify" timeout="60s"/>
+ <op id="fs_UC5_SAPMNT-start-interval-0s" interval="0s" name="start" timeout="60s"/>
+ <op id="fs_UC5_SAPMNT-stop-interval-0s" interval="0s" name="stop" timeout="60s"/>
+ </operations>
+ </primitive>
+ <meta_attributes id="fs_UC5_SAPMNT-clone-meta_attributes">
+ <nvpair id="fs_UC5_SAPMNT-clone-meta_attributes-interleave" name="interleave" value="true"/>
+ </meta_attributes>
+ </clone>
+ <clone id="fs_UC5_SYS-clone">
+ <primitive class="ocf" id="fs_UC5_SYS" provider="heartbeat" type="Filesystem">
+ <instance_attributes id="fs_UC5_SYS-instance_attributes">
+ <nvpair id="fs_UC5_SYS-instance_attributes-device" name="device" value="uatdoelfs.igmfinancial.net:UC5_SYS/root"/>
+ <nvpair id="fs_UC5_SYS-instance_attributes-directory" name="directory" value="/usr/sap/UC5/SYS"/>
+ <nvpair id="fs_UC5_SYS-instance_attributes-fstype" name="fstype" value="nfs"/>
+ </instance_attributes>
+ <operations>
+ <op id="fs_UC5_SYS-monitor-interval-20s" interval="20s" name="monitor" timeout="40s"/>
+ <op id="fs_UC5_SYS-notify-interval-0s" interval="0s" name="notify" timeout="60s"/>
+ <op id="fs_UC5_SYS-start-interval-0s" interval="0s" name="start" timeout="60s"/>
+ <op id="fs_UC5_SYS-stop-interval-0s" interval="0s" name="stop" timeout="60s"/>
+ </operations>
+ </primitive>
+ <meta_attributes id="fs_UC5_SYS-clone-meta_attributes">
+ <nvpair id="fs_UC5_SYS-clone-meta_attributes-interleave" name="interleave" value="true"/>
+ </meta_attributes>
+ </clone>
+ <group id="grp_UC5_ascs">
+ <primitive class="ocf" id="rsc_vip_int_ascs" provider="heartbeat" type="IPaddr2">
+ <instance_attributes id="rsc_vip_int_ascs-instance_attributes">
+ <nvpair id="rsc_vip_int_ascs-instance_attributes-cidr_netmask" name="cidr_netmask" value="32"/>
+ <nvpair id="rsc_vip_int_ascs-instance_attributes-ip" name="ip" value="10.4.130.38"/>
+ <nvpair id="rsc_vip_int_ascs-instance_attributes-nic" name="nic" value="eth0"/>
+ </instance_attributes>
+ <operations>
+ <op id="rsc_vip_int_ascs-monitor-interval-10s" interval="10s" name="monitor" timeout="20s"/>
+ <op id="rsc_vip_int_ascs-start-interval-0s" interval="0s" name="start" timeout="20s"/>
+ <op id="rsc_vip_int_ascs-stop-interval-0s" interval="0s" name="stop" timeout="20s"/>
+ </operations>
+ </primitive>
+ <primitive class="ocf" id="rsc_vip_gcp_ascs" provider="heartbeat" type="gcp-vpc-move-vip">
+ <instance_attributes id="rsc_vip_gcp_ascs-instance_attributes">
+ <nvpair id="rsc_vip_gcp_ascs-instance_attributes-alias_ip" name="alias_ip" value="10.4.130.38/32"/>
+ <nvpair id="rsc_vip_gcp_ascs-instance_attributes-hostlist" name="hostlist" value="gcdoubwap01 gcdoubwap02"/>
+ </instance_attributes>
+ <operations>
+ <op id="rsc_vip_gcp_ascs-monitor-interval-60s" interval="60s" name="monitor" on-fail="ignore"/>
+ <op id="rsc_vip_gcp_ascs-start-interval-0s" interval="0s" name="start" timeout="300s"/>
+ <op id="rsc_vip_gcp_ascs-stop-interval-0s" interval="0s" name="stop" timeout="15s"/>
+ </operations>
+ </primitive>
+ <primitive class="ocf" id="fs_UC5_ascs" provider="heartbeat" type="Filesystem">
+ <instance_attributes id="fs_UC5_ascs-instance_attributes">
+ <nvpair id="fs_UC5_ascs-instance_attributes-device" name="device" value="uatdoelfs.igmfinancial.net:UC5_ASCS/root"/>
+ <nvpair id="fs_UC5_ascs-instance_attributes-directory" name="directory" value="/usr/sap/UC5/ASCS11"/>
+ <nvpair id="fs_UC5_ascs-instance_attributes-force_unmount" name="force_unmount" value="safe"/>
+ <nvpair id="fs_UC5_ascs-instance_attributes-fstype" name="fstype" value="nfs"/>
+ </instance_attributes>
+ <operations>
+ <op id="fs_UC5_ascs-monitor-interval-200" interval="200" name="monitor" timeout="40"/>
+ <op id="fs_UC5_ascs-notify-interval-0s" interval="0s" name="notify" timeout="60s"/>
+ <op id="fs_UC5_ascs-start-interval-0" interval="0" name="start" timeout="60"/>
+ <op id="fs_UC5_ascs-stop-interval-0" interval="0" name="stop" timeout="120"/>
+ </operations>
+ </primitive>
+ <primitive class="ocf" id="rsc_sap_UC5_ASCS11" provider="heartbeat" type="SAPInstance">
+ <instance_attributes id="rsc_sap_UC5_ASCS11-instance_attributes">
+ <nvpair id="rsc_sap_UC5_ASCS11-instance_attributes-AUTOMATIC_RECOVER" name="AUTOMATIC_RECOVER" value="false"/>
+ <nvpair id="rsc_sap_UC5_ASCS11-instance_attributes-InstanceName" name="InstanceName" value="UC5_ASCS11_uatdobwscs"/>
+ <nvpair id="rsc_sap_UC5_ASCS11-instance_attributes-START_PROFILE" name="START_PROFILE" value="/sapmnt/UC5/profile/UC5_ASCS11_uatdobwscs"/>
+ </instance_attributes>
+ <meta_attributes id="rsc_sap_UC5_ASCS11-meta_attributes">
+ <nvpair id="rsc_sap_UC5_ASCS11-meta_attributes-failure-timeout" name="failure-timeout" value="60"/>
+ <nvpair id="rsc_sap_UC5_ASCS11-meta_attributes-migration-threshold" name="migration-threshold" value="1"/>
+ <nvpair id="rsc_sap_UC5_ASCS11-meta_attributes-resource-stickiness" name="resource-stickiness" value="5000"/>
+ </meta_attributes>
+ <operations>
+ <op id="rsc_sap_UC5_ASCS11-demote-interval-0s" interval="0s" name="demote" timeout="320s"/>
+ <op id="rsc_sap_UC5_ASCS11-methods-interval-0s" interval="0s" name="methods" timeout="5s"/>
+ <op id="rsc_sap_UC5_ASCS11-monitor-interval-20" interval="20" name="monitor" on-fail="restart" timeout="60"/>
+ <op id="rsc_sap_UC5_ASCS11-promote-interval-0s" interval="0s" name="promote" timeout="320s"/>
+ <op id="rsc_sap_UC5_ASCS11-start-interval-0" interval="0" name="start" timeout="600"/>
+ <op id="rsc_sap_UC5_ASCS11-stop-interval-0" interval="0" name="stop" timeout="600"/>
+ </operations>
+ </primitive>
+ </group>
+ <group id="grp_UC5_ers">
+ <primitive class="ocf" id="rsc_vip_init_ers" provider="heartbeat" type="IPaddr2">
+ <instance_attributes id="rsc_vip_init_ers-instance_attributes">
+ <nvpair id="rsc_vip_init_ers-instance_attributes-cidr_netmask" name="cidr_netmask" value="32"/>
+ <nvpair id="rsc_vip_init_ers-instance_attributes-ip" name="ip" value="10.4.130.39"/>
+ <nvpair id="rsc_vip_init_ers-instance_attributes-nic" name="nic" value="eth0"/>
+ </instance_attributes>
+ <operations>
+ <op id="rsc_vip_init_ers-monitor-interval-10s" interval="10s" name="monitor" timeout="20s"/>
+ <op id="rsc_vip_init_ers-start-interval-0s" interval="0s" name="start" timeout="20s"/>
+ <op id="rsc_vip_init_ers-stop-interval-0s" interval="0s" name="stop" timeout="20s"/>
+ </operations>
+ </primitive>
+ <primitive class="ocf" id="rsc_vip_gcp_ers" provider="heartbeat" type="gcp-vpc-move-vip">
+ <instance_attributes id="rsc_vip_gcp_ers-instance_attributes">
+ <nvpair id="rsc_vip_gcp_ers-instance_attributes-alias_ip" name="alias_ip" value="10.4.130.39/32"/>
+ <nvpair id="rsc_vip_gcp_ers-instance_attributes-hostlist" name="hostlist" value="gcdoubwap01 gcdoubwap02"/>
+ </instance_attributes>
+ <operations>
+ <op id="rsc_vip_gcp_ers-monitor-interval-60s" interval="60s" name="monitor" on-fail="ignore"/>
+ <op id="rsc_vip_gcp_ers-start-interval-0s" interval="0s" name="start" timeout="300s"/>
+ <op id="rsc_vip_gcp_ers-stop-interval-0s" interval="0s" name="stop" timeout="180s"/>
+ </operations>
+ </primitive>
+ <primitive class="ocf" id="fs_UC5_ers" provider="heartbeat" type="Filesystem">
+ <instance_attributes id="fs_UC5_ers-instance_attributes">
+ <nvpair id="fs_UC5_ers-instance_attributes-device" name="device" value="uatdoelfs.igmfinancial.net:UC5_ERS/root"/>
+ <nvpair id="fs_UC5_ers-instance_attributes-directory" name="directory" value="/usr/sap/UC5/ERS12"/>
+ <nvpair id="fs_UC5_ers-instance_attributes-force_unmount" name="force_unmount" value="safe"/>
+ <nvpair id="fs_UC5_ers-instance_attributes-fstype" name="fstype" value="nfs"/>
+ </instance_attributes>
+ <operations>
+ <op id="fs_UC5_ers-monitor-interval-200" interval="200" name="monitor" timeout="40"/>
+ <op id="fs_UC5_ers-notify-interval-0s" interval="0s" name="notify" timeout="60s"/>
+ <op id="fs_UC5_ers-start-interval-0" interval="0" name="start" timeout="60"/>
+ <op id="fs_UC5_ers-stop-interval-0" interval="0" name="stop" timeout="120"/>
+ </operations>
+ </primitive>
+ <primitive class="ocf" id="rsc_sap_UC5_ERS12" provider="heartbeat" type="SAPInstance">
+ <instance_attributes id="rsc_sap_UC5_ERS12-instance_attributes">
+ <nvpair id="rsc_sap_UC5_ERS12-instance_attributes-AUTOMATIC_RECOVER" name="AUTOMATIC_RECOVER" value="false"/>
+ <nvpair id="rsc_sap_UC5_ERS12-instance_attributes-IS_ERS" name="IS_ERS" value="true"/>
+ <nvpair id="rsc_sap_UC5_ERS12-instance_attributes-InstanceName" name="InstanceName" value="UC5_ERS12_uatdobwers"/>
+ <nvpair id="rsc_sap_UC5_ERS12-instance_attributes-START_PROFILE" name="START_PROFILE" value="/sapmnt/UC5/profile/UC5_ERS12_uatdobwers"/>
+ </instance_attributes>
+ <operations>
+ <op id="rsc_sap_UC5_ERS12-demote-interval-0s" interval="0s" name="demote" timeout="320s"/>
+ <op id="rsc_sap_UC5_ERS12-methods-interval-0s" interval="0s" name="methods" timeout="5s"/>
+ <op id="rsc_sap_UC5_ERS12-monitor-interval-20" interval="20" name="monitor" on-fail="restart" timeout="60"/>
+ <op id="rsc_sap_UC5_ERS12-promote-interval-0s" interval="0s" name="promote" timeout="320s"/>
+ <op id="rsc_sap_UC5_ERS12-start-interval-0" interval="0" name="start" timeout="600"/>
+ <op id="rsc_sap_UC5_ERS12-stop-interval-0" interval="0" name="stop" timeout="600"/>
+ </operations>
+ </primitive>
+ </group>
+ </resources>
+ <constraints>
+ <rsc_colocation id="colocation-grp_UC5_ers-grp_UC5_ascs--5000" rsc="grp_UC5_ers" score="-5000" with-rsc="grp_UC5_ascs"/>
+ <rsc_order first="grp_UC5_ascs" first-action="start" id="order-grp_UC5_ascs-grp_UC5_ers-mandatory" symmetrical="false" then="grp_UC5_ers" then-action="stop"/>
+ <rsc_location id="location-rsc_sap_UC5_ASCS11" rsc="rsc_sap_UC5_ASCS11">
+ <rule id="location-rsc_sap_UC5_ASCS11-rule" score="2000">
+ <expression attribute="runs_ERS_UC5" id="location-rsc_sap_UC5_ASCS11-rule-expr" operation="eq" value="1"/>
+ </rule>
+ </rsc_location>
+ <rsc_location id="location-stonith_gcdoubwap01-gcdoubwap02" node="gcdoubwap01" rsc="stonith_gcdoubwap01" score="-INFINITY"/>
+ <rsc_location id="location-stonith_gcdoubwap02-gcdoubwap01" node="gcdoubwap02" rsc="stonith_gcdoubwap02" score="-INFINITY"/>
+ <rsc_order first="fs_UC5_SAPMNT-clone" first-action="start" id="order-fs_UC5_SAPMNT-clone-grp_UC5_ascs-mandatory" then="grp_UC5_ascs" then-action="start"/>
+ <rsc_order first="fs_UC5_SAPMNT-clone" first-action="start" id="order-fs_UC5_SAPMNT-clone-grp_UC5_ers-mandatory" then="grp_UC5_ers" then-action="start"/>
+ </constraints>
+ </configuration>
+ <status>
+ <node_state id="1" uname="gcdoubwap01" in_ccm="true" crmd="online" crm-debug-origin="post_cache_update" join="member" expected="member">
+ <lrm id="1">
+ <lrm_resources>
+ <lrm_resource id="stonith_gcdoubwap01" type="fence_gce" class="stonith">
+ <lrm_rsc_op id="stonith_gcdoubwap01_last_0" operation_key="stonith_gcdoubwap01_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.14" transition-key="1:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" transition-magic="0:7;1:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" exit-reason="" on_node="gcdoubwap01" call-id="5" rc-code="7" op-status="0" interval="0" last-run="1623419700" last-rc-change="1623419700" exec-time="27" queue-time="0" op-digest="e6935031dfde569ad30fb442953d3d91"/>
+ </lrm_resource>
+ <lrm_resource id="stonith_gcdoubwap02" type="fence_gce" class="stonith">
+ <lrm_rsc_op id="stonith_gcdoubwap02_last_0" operation_key="stonith_gcdoubwap02_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.14" transition-key="2:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" transition-magic="0:7;2:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" exit-reason="" on_node="gcdoubwap01" call-id="9" rc-code="7" op-status="0" interval="0" last-run="1623419700" last-rc-change="1623419700" exec-time="0" queue-time="0" op-digest="064645c51d6d3a802eb6928f6116222c"/>
+ </lrm_resource>
+ <lrm_resource id="fs_UC5_SAPMNT" type="Filesystem" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="fs_UC5_SAPMNT_last_0" operation_key="fs_UC5_SAPMNT_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.14" transition-key="3:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" transition-magic="0:7;3:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" exit-reason="" on_node="gcdoubwap01" call-id="14" rc-code="7" op-status="0" interval="0" last-run="1623419700" last-rc-change="1623419700" exec-time="126" queue-time="1" op-digest="02c74f325691f1af3c3dd9c2ab702b01"/>
+ </lrm_resource>
+ <lrm_resource id="fs_UC5_SYS" type="Filesystem" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="fs_UC5_SYS_last_0" operation_key="fs_UC5_SYS_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.14" transition-key="4:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" transition-magic="0:7;4:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" exit-reason="" on_node="gcdoubwap01" call-id="19" rc-code="7" op-status="0" interval="0" last-run="1623419700" last-rc-change="1623419700" exec-time="130" queue-time="0" op-digest="f1f67b01fc16ed22d8fa1fe030d9c06b"/>
+ </lrm_resource>
+ <lrm_resource id="rsc_vip_int_ascs" type="IPaddr2" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="rsc_vip_int_ascs_last_0" operation_key="rsc_vip_int_ascs_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.14" transition-key="5:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" transition-magic="0:7;5:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" exit-reason="" on_node="gcdoubwap01" call-id="23" rc-code="7" op-status="0" interval="0" last-run="1623419700" last-rc-change="1623419700" exec-time="105" queue-time="0" op-digest="da0b35400002727d7281b8f7051fe400"/>
+ </lrm_resource>
+ <lrm_resource id="rsc_vip_gcp_ascs" type="gcp-vpc-move-vip" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="rsc_vip_gcp_ascs_last_0" operation_key="rsc_vip_gcp_ascs_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.14" transition-key="6:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" transition-magic="0:0;6:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" exit-reason="" on_node="gcdoubwap01" call-id="27" rc-code="0" op-status="0" interval="0" last-run="1623419705" last-rc-change="1623419705" exec-time="1842" queue-time="0" op-digest="face88a40d76658d0caa541eefc02ca8"/>
+ <lrm_rsc_op id="rsc_vip_gcp_ascs_last_failure_0" operation_key="rsc_vip_gcp_ascs_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.14" transition-key="6:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" transition-magic="0:0;6:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" exit-reason="" on_node="gcdoubwap01" call-id="27" rc-code="0" op-status="0" interval="0" last-run="1623419705" last-rc-change="1623419705" exec-time="1842" queue-time="0" op-digest="face88a40d76658d0caa541eefc02ca8"/>
+ </lrm_resource>
+ <lrm_resource id="fs_UC5_ascs" type="Filesystem" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="fs_UC5_ascs_last_0" operation_key="fs_UC5_ascs_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.14" transition-key="7:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" transition-magic="0:7;7:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" exit-reason="" on_node="gcdoubwap01" call-id="31" rc-code="7" op-status="0" interval="0" last-run="1623419705" last-rc-change="1623419705" exec-time="241" queue-time="0" op-digest="acac63abd6c034d7dad4aae73e2ca95d"/>
+ </lrm_resource>
+ <lrm_resource id="rsc_sap_UC5_ASCS11" type="SAPInstance" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="rsc_sap_UC5_ASCS11_last_0" operation_key="rsc_sap_UC5_ASCS11_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.14" transition-key="8:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" transition-magic="0:7;8:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" exit-reason="" on_node="gcdoubwap01" call-id="35" rc-code="7" op-status="0" interval="0" last-run="1623419705" last-rc-change="1623419705" exec-time="969" queue-time="0" op-digest="08c114a33aa3c16b3204ff09cb983107" op-force-restart=" ERS_START_PROFILE ERS_InstanceName START_PROFILE InstanceName " op-restart-digest="315a463141e0ef59afedf7a62a8d6362"/>
+ </lrm_resource>
+ <lrm_resource id="rsc_vip_init_ers" type="IPaddr2" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="rsc_vip_init_ers_last_0" operation_key="rsc_vip_init_ers_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.14" transition-key="9:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" transition-magic="0:7;9:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" exit-reason="" on_node="gcdoubwap01" call-id="39" rc-code="7" op-status="0" interval="0" last-run="1623419705" last-rc-change="1623419705" exec-time="1033" queue-time="0" op-digest="7b29d7af6a7baa6015d1eeac471a9b42"/>
+ </lrm_resource>
+ <lrm_resource id="rsc_vip_gcp_ers" type="gcp-vpc-move-vip" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="rsc_vip_gcp_ers_last_0" operation_key="rsc_vip_gcp_ers_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.14" transition-key="10:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" transition-magic="0:7;10:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" exit-reason="" on_node="gcdoubwap01" call-id="43" rc-code="7" op-status="0" interval="0" last-run="1623419705" last-rc-change="1623419705" exec-time="1702" queue-time="0" op-digest="10365a97fe5a5864a3679c314bf65bfd"/>
+ </lrm_resource>
+ <lrm_resource id="fs_UC5_ers" type="Filesystem" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="fs_UC5_ers_last_0" operation_key="fs_UC5_ers_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.14" transition-key="11:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" transition-magic="0:7;11:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" exit-reason="" on_node="gcdoubwap01" call-id="47" rc-code="7" op-status="0" interval="0" last-run="1623419706" last-rc-change="1623419706" exec-time="709" queue-time="0" op-digest="61e45529b2da32c1e53055238a00ca99"/>
+ </lrm_resource>
+ <lrm_resource id="rsc_sap_UC5_ERS12" type="SAPInstance" class="ocf" provider="heartbeat">
+ <lrm_rsc_op id="rsc_sap_UC5_ERS12_last_0" operation_key="rsc_sap_UC5_ERS12_monitor_0" operation="monitor" crm-debug-origin="do_update_resource" crm_feature_set="3.0.14" transition-key="12:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" transition-magic="0:7;12:0:7:5e41afa8-15bd-443a-88fb-ec276232a804" exit-reason="" on_node="gcdoubwap01" call-id="51" rc-code="7" op-status="0" interval="0" last-run="1623419706" last-rc-change="1623419706" exec-time="914" queue-time="1" op-digest="b550e70bd4203af88473e4d914b11f87" op-force-restart=" ERS_START_PROFILE ERS_InstanceName START_PROFILE InstanceName " op-restart-digest="2fb6ec6eb77e25302c8dc0dad84dc46f"/>
+ </lrm_resource>
+ </lrm_resources>
+ </lrm>
+ </node_state>
+ <node_state id="2" uname="gcdoubwap02" crmd="offline" crm-debug-origin="post_cache_update" in_ccm="true"/>
+ </status>
+</cib>
--
1.8.3.1

View File

@ -1,150 +0,0 @@
From ea5510dd979bb6d375324cda26925d9e7c4362f5 Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Mon, 19 Jul 2021 10:04:16 -0400
Subject: [PATCH 1/2] Low: tools: The --get-value option does not require an
arg.
Regression in 2.1.0 introduced by 15f5c2901.
---
tools/crm_attribute.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/crm_attribute.c b/tools/crm_attribute.c
index 2cc8d26..8a5b4e4 100644
--- a/tools/crm_attribute.c
+++ b/tools/crm_attribute.c
@@ -242,7 +242,7 @@ static GOptionEntry deprecated_entries[] = {
NULL, NULL
},
- { "get-value", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_CALLBACK, value_cb,
+ { "get-value", 0, G_OPTION_FLAG_HIDDEN|G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, value_cb,
NULL, NULL
},
--
1.8.3.1
From ef054d943afe8e60017f6adc4e25f88a59ac91a4 Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Mon, 19 Jul 2021 11:37:04 -0400
Subject: [PATCH 2/2] Low: libcrmcommon: Allow negative numbers as cmdline
options.
The bug here is that negative numbers (for instance, negative scores)
are not supported as command line arguments. Because we break up a
string that starts with a single dash into multiple arguments, "-1000"
becomes "-1", "-0", "-0", and "-0".
Because we don't have enough information about what is happening on the
command line, the best we can do here is recognize something as a
negative number and pass it on. Any errors will have to be detected at
a later step.
Also note that we only recognize negative numbers if they start with
1-9. Starting with 0 will be recognized as some sort of string.
Regression in 2.1.0 caused by a long-standing bug in
pcmk__cmdline_preproc_test.
---
lib/common/cmdline.c | 29 ++++++++++++++++++++++
.../tests/cmdline/pcmk__cmdline_preproc_test.c | 24 +++++++++++++++++-
2 files changed, 52 insertions(+), 1 deletion(-)
diff --git a/lib/common/cmdline.c b/lib/common/cmdline.c
index 7c95d02..9c1b810 100644
--- a/lib/common/cmdline.c
+++ b/lib/common/cmdline.c
@@ -9,6 +9,7 @@
#include <crm_internal.h>
+#include <ctype.h>
#include <glib.h>
#include <crm/crm.h>
@@ -189,6 +190,34 @@ pcmk__cmdline_preproc(char **argv, const char *special) {
/* Skip over leading dash */
char *ch = argv[i]+1;
+ /* This looks like the start of a number, which means it is a negative
+ * number. It's probably the argument to the preceeding option, but
+ * we can't know that here. Copy it over and let whatever handles
+ * arguments next figure it out.
+ */
+ if (*ch != '\0' && *ch >= '1' && *ch <= '9') {
+ bool is_numeric = true;
+
+ while (*ch != '\0') {
+ if (!isdigit(*ch)) {
+ is_numeric = false;
+ break;
+ }
+
+ ch++;
+ }
+
+ if (is_numeric) {
+ g_ptr_array_add(arr, g_strdup_printf("%s", argv[i]));
+ continue;
+ } else {
+ /* This argument wasn't entirely numeric. Reset ch to the
+ * beginning so we can process it one character at a time.
+ */
+ ch = argv[i]+1;
+ }
+ }
+
while (*ch != '\0') {
/* This is a special short argument that takes an option. getopt
* allows values to be interspersed with a list of arguments, but
diff --git a/lib/common/tests/cmdline/pcmk__cmdline_preproc_test.c b/lib/common/tests/cmdline/pcmk__cmdline_preproc_test.c
index b8506c6..9a752ef 100644
--- a/lib/common/tests/cmdline/pcmk__cmdline_preproc_test.c
+++ b/lib/common/tests/cmdline/pcmk__cmdline_preproc_test.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2020 the Pacemaker project contributors
+ * Copyright 2020-2021 the Pacemaker project contributors
*
* The version control history for this file may have further details.
*
@@ -86,6 +86,26 @@ long_arg(void) {
g_strfreev(processed);
}
+static void
+negative_score(void) {
+ const char *argv[] = { "-v", "-1000", NULL };
+ const gchar *expected[] = { "-v", "-1000", NULL };
+
+ gchar **processed = pcmk__cmdline_preproc((char **) argv, "v");
+ LISTS_EQ(processed, expected);
+ g_strfreev(processed);
+}
+
+static void
+negative_score_2(void) {
+ const char *argv[] = { "-1i3", NULL };
+ const gchar *expected[] = { "-1", "-i", "-3", NULL };
+
+ gchar **processed = pcmk__cmdline_preproc((char **) argv, NULL);
+ LISTS_EQ(processed, expected);
+ g_strfreev(processed);
+}
+
int
main(int argc, char **argv)
{
@@ -98,5 +118,7 @@ main(int argc, char **argv)
g_test_add_func("/common/cmdline/preproc/special_args", special_args);
g_test_add_func("/common/cmdline/preproc/special_arg_at_end", special_arg_at_end);
g_test_add_func("/common/cmdline/preproc/long_arg", long_arg);
+ g_test_add_func("/common/cmdline/preproc/negative_score", negative_score);
+ g_test_add_func("/common/cmdline/preproc/negative_score_2", negative_score_2);
return g_test_run();
}
--
1.8.3.1

View File

@ -1,221 +0,0 @@
From 2eee93e8f9ea2daa81769bc69843d63ced1a7112 Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Tue, 20 Jul 2021 16:39:07 -0400
Subject: [PATCH 1/2] Low: tools: Audit command line options.
This just goes through and makes sure the command line options that take
arguments are in the special parameter to pcmk__cmdline_preproc, and
that options that do not take arguments are not.
---
tools/crm_attribute.c | 2 +-
tools/crm_error.c | 2 +-
tools/crm_resource.c | 2 +-
tools/crm_rule.c | 2 +-
tools/crm_simulate.c | 2 +-
tools/crmadmin.c | 2 +-
tools/stonith_admin.c | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/tools/crm_attribute.c b/tools/crm_attribute.c
index 8a5b4e4..6bd4e2a 100644
--- a/tools/crm_attribute.c
+++ b/tools/crm_attribute.c
@@ -312,7 +312,7 @@ main(int argc, char **argv)
GOptionGroup *output_group = NULL;
pcmk__common_args_t *args = pcmk__new_common_args(SUMMARY);
- gchar **processed_args = pcmk__cmdline_preproc(argv, "DGNPdilnpstv");
+ gchar **processed_args = pcmk__cmdline_preproc(argv, "NPUdilnpstv");
GOptionContext *context = build_arg_context(args, &output_group);
if (!g_option_context_parse_strv(context, &processed_args, &error)) {
diff --git a/tools/crm_error.c b/tools/crm_error.c
index b4328ce..923f393 100644
--- a/tools/crm_error.c
+++ b/tools/crm_error.c
@@ -79,7 +79,7 @@ main(int argc, char **argv)
GOptionGroup *output_group = NULL;
pcmk__common_args_t *args = pcmk__new_common_args(SUMMARY);
- gchar **processed_args = pcmk__cmdline_preproc(argv, "lrnX");
+ gchar **processed_args = pcmk__cmdline_preproc(argv, NULL);
GOptionContext *context = build_arg_context(args, &output_group);
if (!g_option_context_parse_strv(context, &processed_args, &error)) {
diff --git a/tools/crm_resource.c b/tools/crm_resource.c
index fa7902c..d8e140f 100644
--- a/tools/crm_resource.c
+++ b/tools/crm_resource.c
@@ -1530,7 +1530,7 @@ main(int argc, char **argv)
*/
args = pcmk__new_common_args(SUMMARY);
- processed_args = pcmk__cmdline_preproc(argv, "GINSTdginpstuv");
+ processed_args = pcmk__cmdline_preproc(argv, "GHINSTdginpstuvx");
context = build_arg_context(args, &output_group);
pcmk__register_formats(output_group, formats);
diff --git a/tools/crm_rule.c b/tools/crm_rule.c
index 8b19bcd..30c5155 100644
--- a/tools/crm_rule.c
+++ b/tools/crm_rule.c
@@ -239,7 +239,7 @@ main(int argc, char **argv)
pcmk__common_args_t *args = pcmk__new_common_args(SUMMARY);
GOptionContext *context = build_arg_context(args);
- gchar **processed_args = pcmk__cmdline_preproc(argv, "nopNO");
+ gchar **processed_args = pcmk__cmdline_preproc(argv, "drX");
if (!g_option_context_parse_strv(context, &processed_args, &error)) {
exit_code = CRM_EX_USAGE;
diff --git a/tools/crm_simulate.c b/tools/crm_simulate.c
index 0406bff..c83b1b1 100644
--- a/tools/crm_simulate.c
+++ b/tools/crm_simulate.c
@@ -865,7 +865,7 @@ main(int argc, char **argv)
GOptionGroup *output_group = NULL;
pcmk__common_args_t *args = pcmk__new_common_args(SUMMARY);
- gchar **processed_args = pcmk__cmdline_preproc(argv, "bdefgiqrtuwxDFGINO");
+ gchar **processed_args = pcmk__cmdline_preproc(argv, "bdefgiqrtuwxDFGINOP");
GOptionContext *context = build_arg_context(args, &output_group);
/* This must come before g_option_context_parse_strv. */
diff --git a/tools/crmadmin.c b/tools/crmadmin.c
index 5cbde1b..b98f282 100644
--- a/tools/crmadmin.c
+++ b/tools/crmadmin.c
@@ -188,7 +188,7 @@ main(int argc, char **argv)
GOptionGroup *output_group = NULL;
pcmk__common_args_t *args = pcmk__new_common_args(SUMMARY);
- gchar **processed_args = pcmk__cmdline_preproc(argv, "itBDEHKNPS");
+ gchar **processed_args = pcmk__cmdline_preproc(argv, "itKNS");
GOptionContext *context = build_arg_context(args, &output_group);
pcmk__register_formats(output_group, formats);
diff --git a/tools/stonith_admin.c b/tools/stonith_admin.c
index 6773cea..2d48326 100644
--- a/tools/stonith_admin.c
+++ b/tools/stonith_admin.c
@@ -349,7 +349,7 @@ main(int argc, char **argv)
GOptionGroup *output_group = NULL;
pcmk__common_args_t *args = pcmk__new_common_args(SUMMARY);
- gchar **processed_args = pcmk__cmdline_preproc(argv, "adehilorstvBCDFHQRTU");
+ gchar **processed_args = pcmk__cmdline_preproc(argv, "adehilorstvyBCDFHQRTU");
GOptionContext *context = build_arg_context(args, &output_group);
pcmk__register_formats(output_group, formats);
--
1.8.3.1
From 8301678ad1162450814d2fea5288aefe47a67a74 Mon Sep 17 00:00:00 2001
From: Chris Lumens <clumens@redhat.com>
Date: Tue, 20 Jul 2021 16:40:58 -0400
Subject: [PATCH 2/2] Low: libcrmcommon: Also allow string arguments that start
with a dash.
There's various places where an option to a command line argument could
itself be a valid command line argument. For instance:
crm_attribute -n crm_mon_options -v "-1i3"
The previous patching to pcmk__cmdline_preproc did not take this into
account. With this patch, options that are last in a string (or by
themselves) and take an argument will have the next command line option
grabbed and copied straight through without processing.
Regression in 2.1.0 caused by a long-standing bug in pcmk__cmdline_preproc.
---
lib/common/cmdline.c | 8 ++++++
.../tests/cmdline/pcmk__cmdline_preproc_test.c | 33 ++++++++++++++++++++++
2 files changed, 41 insertions(+)
diff --git a/lib/common/cmdline.c b/lib/common/cmdline.c
index 9c1b810..1ca6147 100644
--- a/lib/common/cmdline.c
+++ b/lib/common/cmdline.c
@@ -146,6 +146,7 @@ gchar **
pcmk__cmdline_preproc(char **argv, const char *special) {
GPtrArray *arr = NULL;
bool saw_dash_dash = false;
+ bool copy_option = false;
if (argv == NULL) {
return NULL;
@@ -175,6 +176,12 @@ pcmk__cmdline_preproc(char **argv, const char *special) {
continue;
}
+ if (copy_option == true) {
+ g_ptr_array_add(arr, g_strdup(argv[i]));
+ copy_option = false;
+ continue;
+ }
+
/* This is just a dash by itself. That could indicate stdin/stdout, or
* it could be user error. Copy it over and let glib figure it out.
*/
@@ -239,6 +246,7 @@ pcmk__cmdline_preproc(char **argv, const char *special) {
*/
} else {
g_ptr_array_add(arr, g_strdup_printf("-%c", *ch));
+ copy_option = true;
ch++;
}
diff --git a/lib/common/tests/cmdline/pcmk__cmdline_preproc_test.c b/lib/common/tests/cmdline/pcmk__cmdline_preproc_test.c
index 9a752ef..edc5640 100644
--- a/lib/common/tests/cmdline/pcmk__cmdline_preproc_test.c
+++ b/lib/common/tests/cmdline/pcmk__cmdline_preproc_test.c
@@ -106,6 +106,36 @@ negative_score_2(void) {
g_strfreev(processed);
}
+static void
+string_arg_with_dash(void) {
+ const char *argv[] = { "-n", "crm_mon_options", "-v", "--opt1 --opt2", NULL };
+ const gchar *expected[] = { "-n", "crm_mon_options", "-v", "--opt1 --opt2", NULL };
+
+ gchar **processed = pcmk__cmdline_preproc((char **) argv, "v");
+ LISTS_EQ(processed, expected);
+ g_strfreev(processed);
+}
+
+static void
+string_arg_with_dash_2(void) {
+ const char *argv[] = { "-n", "crm_mon_options", "-v", "-1i3", NULL };
+ const gchar *expected[] = { "-n", "crm_mon_options", "-v", "-1i3", NULL };
+
+ gchar **processed = pcmk__cmdline_preproc((char **) argv, "v");
+ LISTS_EQ(processed, expected);
+ g_strfreev(processed);
+}
+
+static void
+string_arg_with_dash_3(void) {
+ const char *argv[] = { "-abc", "-1i3", NULL };
+ const gchar *expected[] = { "-a", "-b", "-c", "-1i3", NULL };
+
+ gchar **processed = pcmk__cmdline_preproc((char **) argv, "c");
+ LISTS_EQ(processed, expected);
+ g_strfreev(processed);
+}
+
int
main(int argc, char **argv)
{
@@ -120,5 +150,8 @@ main(int argc, char **argv)
g_test_add_func("/common/cmdline/preproc/long_arg", long_arg);
g_test_add_func("/common/cmdline/preproc/negative_score", negative_score);
g_test_add_func("/common/cmdline/preproc/negative_score_2", negative_score_2);
+ g_test_add_func("/common/cmdline/preproc/string_arg_with_dash", string_arg_with_dash);
+ g_test_add_func("/common/cmdline/preproc/string_arg_with_dash_2", string_arg_with_dash_2);
+ g_test_add_func("/common/cmdline/preproc/string_arg_with_dash_3", string_arg_with_dash_3);
return g_test_run();
}
--
1.8.3.1

View File

@ -1,241 +0,0 @@
From bee54eba4d9c28d3a7907a3e13a5deeee6bc0916 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Tue, 27 Jul 2021 11:01:04 -0500
Subject: [PATCH 1/2] Low: tools: avoid (insignificant) memory leaks
detected by valgrind
---
lib/pacemaker/pcmk_cluster_queries.c | 2 ++
tools/crm_diff.c | 2 +-
tools/crm_resource.c | 33 ++++++++++++++++++++-------------
tools/crm_resource_ban.c | 2 +-
4 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/lib/pacemaker/pcmk_cluster_queries.c b/lib/pacemaker/pcmk_cluster_queries.c
index c68cf9d..46e5538 100644
--- a/lib/pacemaker/pcmk_cluster_queries.c
+++ b/lib/pacemaker/pcmk_cluster_queries.c
@@ -440,6 +440,7 @@ pcmk__list_nodes(pcmk__output_t *out, char *node_types, gboolean BASH_EXPORT)
}
rc = the_cib->cmds->signon(the_cib, crm_system_name, cib_command);
if (rc != pcmk_ok) {
+ cib_delete(the_cib);
return pcmk_legacy2rc(rc);
}
@@ -488,6 +489,7 @@ pcmk__list_nodes(pcmk__output_t *out, char *node_types, gboolean BASH_EXPORT)
free_xml(xml_node);
}
the_cib->cmds->signoff(the_cib);
+ cib_delete(the_cib);
return pcmk_legacy2rc(rc);
}
diff --git a/tools/crm_diff.c b/tools/crm_diff.c
index b37f0ea..9890c10 100644
--- a/tools/crm_diff.c
+++ b/tools/crm_diff.c
@@ -383,5 +383,5 @@ done:
free_xml(object_2);
pcmk__output_and_clear_error(error, NULL);
- return exit_code;
+ crm_exit(exit_code);
}
diff --git a/tools/crm_resource.c b/tools/crm_resource.c
index d8e140f..8ca90cb 100644
--- a/tools/crm_resource.c
+++ b/tools/crm_resource.c
@@ -1081,6 +1081,8 @@ clear_constraints(pcmk__output_t *out, xmlNodePtr *cib_xml_copy)
g_set_error(&error, PCMK__RC_ERROR, rc,
"Could not get modified CIB: %s\n", pcmk_strerror(rc));
g_list_free(before);
+ free_xml(*cib_xml_copy);
+ *cib_xml_copy = NULL;
return rc;
}
@@ -1232,29 +1234,34 @@ populate_working_set(xmlNodePtr *cib_xml_copy)
if (options.xml_file != NULL) {
*cib_xml_copy = filename2xml(options.xml_file);
+ if (*cib_xml_copy == NULL) {
+ rc = pcmk_rc_cib_corrupt;
+ }
} else {
rc = cib_conn->cmds->query(cib_conn, NULL, cib_xml_copy, cib_scope_local | cib_sync_call);
rc = pcmk_legacy2rc(rc);
}
- if(rc != pcmk_rc_ok) {
- return rc;
+ if (rc == pcmk_rc_ok) {
+ data_set = pe_new_working_set();
+ if (data_set == NULL) {
+ rc = ENOMEM;
+ } else {
+ pe__set_working_set_flags(data_set,
+ pe_flag_no_counts|pe_flag_no_compat);
+ data_set->priv = out;
+ rc = update_working_set_xml(data_set, cib_xml_copy);
+ }
}
- /* Populate the working set instance */
- data_set = pe_new_working_set();
- if (data_set == NULL) {
- rc = ENOMEM;
+ if (rc != pcmk_rc_ok) {
+ free_xml(*cib_xml_copy);
+ *cib_xml_copy = NULL;
return rc;
}
- pe__set_working_set_flags(data_set, pe_flag_no_counts|pe_flag_no_compat);
- data_set->priv = out;
- rc = update_working_set_xml(data_set, cib_xml_copy);
- if (rc == pcmk_rc_ok) {
- cluster_status(data_set);
- }
- return rc;
+ cluster_status(data_set);
+ return pcmk_rc_ok;
}
static int
diff --git a/tools/crm_resource_ban.c b/tools/crm_resource_ban.c
index a297d49..2c4f48d 100644
--- a/tools/crm_resource_ban.c
+++ b/tools/crm_resource_ban.c
@@ -292,7 +292,7 @@ resource_clear_node_in_location(const char *rsc_id, const char *host, cib_t * ci
rc = pcmk_legacy2rc(rc);
}
- free(fragment);
+ free_xml(fragment);
return rc;
}
--
1.8.3.1
From a30ff4a87f291a0c9e03c4efb9c9046d2ac594f1 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Tue, 27 Jul 2021 11:26:59 -0500
Subject: [PATCH 2/2] Fix: tools: avoid memory leaks in crm_mon
could be significant in an interactive session
regressions introduced in 2.0.4 and 2.0.5
---
lib/pengine/bundle.c | 3 ++-
lib/pengine/clone.c | 5 ++---
lib/pengine/pe_output.c | 3 +++
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/lib/pengine/bundle.c b/lib/pengine/bundle.c
index 6ba786a..7e1d428 100644
--- a/lib/pengine/bundle.c
+++ b/lib/pengine/bundle.c
@@ -1497,7 +1497,7 @@ pe__bundle_xml(pcmk__output_t *out, va_list args)
for (GList *gIter = bundle_data->replicas; gIter != NULL;
gIter = gIter->next) {
pe__bundle_replica_t *replica = gIter->data;
- char *id = pcmk__itoa(replica->offset);
+ char *id = NULL;
gboolean print_ip, print_child, print_ctnr, print_remote;
CRM_ASSERT(replica);
@@ -1531,6 +1531,7 @@ pe__bundle_xml(pcmk__output_t *out, va_list args)
CRM_ASSERT(rc == pcmk_rc_ok);
}
+ id = pcmk__itoa(replica->offset);
rc = pe__name_and_nvpairs_xml(out, true, "replica", 1, "id", id);
free(id);
CRM_ASSERT(rc == pcmk_rc_ok);
diff --git a/lib/pengine/clone.c b/lib/pengine/clone.c
index 6323692..ab91fd1 100644
--- a/lib/pengine/clone.c
+++ b/lib/pengine/clone.c
@@ -807,10 +807,10 @@ pe__clone_html(pcmk__output_t *out, va_list args)
pcmk__add_word(&list_text, &list_text_len, host->details->uname);
active_instances++;
}
+ g_list_free(promoted_list);
if (list_text != NULL) {
out->list_item(out, NULL, PROMOTED_INSTANCES ": [ %s ]", list_text);
- g_list_free(promoted_list);
free(list_text);
list_text = NULL;
list_text_len = 0;
@@ -828,6 +828,7 @@ pe__clone_html(pcmk__output_t *out, va_list args)
pcmk__add_word(&list_text, &list_text_len, host->details->uname);
active_instances++;
}
+ g_list_free(started_list);
if (list_text != NULL) {
if (pcmk_is_set(rsc->flags, pe_rsc_promotable)) {
@@ -847,7 +848,6 @@ pe__clone_html(pcmk__output_t *out, va_list args)
out->list_item(out, NULL, "Started: [ %s ]", list_text);
}
- g_list_free(started_list);
free(list_text);
list_text = NULL;
list_text_len = 0;
@@ -1048,10 +1048,10 @@ pe__clone_text(pcmk__output_t *out, va_list args)
pcmk__add_word(&list_text, &list_text_len, host->details->uname);
active_instances++;
}
+ g_list_free(promoted_list);
if (list_text != NULL) {
out->list_item(out, PROMOTED_INSTANCES, "[ %s ]", list_text);
- g_list_free(promoted_list);
free(list_text);
list_text = NULL;
list_text_len = 0;
@@ -1069,6 +1069,7 @@ pe__clone_text(pcmk__output_t *out, va_list args)
pcmk__add_word(&list_text, &list_text_len, host->details->uname);
active_instances++;
}
+ g_list_free(started_list);
if (list_text != NULL) {
if (pcmk_is_set(rsc->flags, pe_rsc_promotable)) {
@@ -1084,7 +1085,6 @@ pe__clone_text(pcmk__output_t *out, va_list args)
out->list_item(out, "Started", "[ %s ]", list_text);
}
- g_list_free(started_list);
free(list_text);
list_text = NULL;
}
diff --git a/lib/pengine/pe_output.c b/lib/pengine/pe_output.c
index b8997c4..20bd1a9 100644
--- a/lib/pengine/pe_output.c
+++ b/lib/pengine/pe_output.c
@@ -1410,6 +1410,8 @@ node_text(pcmk__output_t *out, va_list args) {
out->end_list(out);
out->end_list(out);
+
+ g_list_free(rscs);
}
} else {
@@ -1739,6 +1741,7 @@ node_attribute_list(pcmk__output_t *out, va_list args) {
}
if (!pcmk__str_in_list(only_node, node->details->uname)) {
+ g_list_free(attr_list);
continue;
}
--
1.8.3.1

View File

@ -1,465 +0,0 @@
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

File diff suppressed because it is too large Load Diff

View File

@ -1,59 +0,0 @@
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

@ -1,58 +0,0 @@
From 61eb9c240004d1dbd0b5973e2fecda3686bb4c53 Mon Sep 17 00:00:00 2001
From: Klaus Wenninger <klaus.wenninger@aon.at>
Date: Tue, 10 Aug 2021 09:06:55 +0200
Subject: [PATCH 1/2] Build: rpm: package fence_watchdog in base-package
---
rpm/pacemaker.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rpm/pacemaker.spec.in b/rpm/pacemaker.spec.in
index f58357a77..0c569b9ca 100644
--- a/rpm/pacemaker.spec.in
+++ b/rpm/pacemaker.spec.in
@@ -734,6 +734,7 @@ exit 0
%{_sbindir}/crm_attribute
%{_sbindir}/crm_master
%{_sbindir}/fence_legacy
+%{_sbindir}/fence_watchdog
%doc %{_mandir}/man7/pacemaker-controld.*
%doc %{_mandir}/man7/pacemaker-schedulerd.*
@@ -797,7 +798,6 @@ exit 0
%{_sbindir}/crm_simulate
%{_sbindir}/crm_report
%{_sbindir}/crm_ticket
-%{_sbindir}/fence_watchdog
%{_sbindir}/stonith_admin
# "dirname" is owned by -schemas, which is a prerequisite
%{_datadir}/pacemaker/report.collector
--
2.27.0
From 88e75d5b98df197fa731e7642434951a24a67095 Mon Sep 17 00:00:00 2001
From: Klaus Wenninger <klaus.wenninger@aon.at>
Date: Tue, 10 Aug 2021 09:10:23 +0200
Subject: [PATCH 2/2] Fix: fence_watchdog: fix version output needed for
help2man
---
daemons/fenced/fence_watchdog.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/daemons/fenced/fence_watchdog.in b/daemons/fenced/fence_watchdog.in
index c83304f1d..700065e0e 100755
--- a/daemons/fenced/fence_watchdog.in
+++ b/daemons/fenced/fence_watchdog.in
@@ -12,6 +12,7 @@ import sys
import atexit
import getopt
+AGENT_VERSION = "1.0.0"
SHORT_DESC = "Dummy watchdog fence agent"
LONG_DESC = """fence_watchdog just provides
meta-data - actual fencing is done by the pacemaker internal watchdog agent."""
--
2.27.0

View File

@ -1,122 +0,0 @@
From ee7eba6a7a05bdf0a12d60ebabb334d8ee021101 Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Mon, 9 Aug 2021 14:48:57 -0500
Subject: [PATCH] Fix: controller: ensure lost node's transient attributes are
cleared without DC
Previously, peer_update_callback() cleared a lost node's transient attributes
if either the local node is DC, or there is no DC.
However, that left the possibility of the DC being lost at the same time as
another node -- the local node would still have fsa_our_dc set while processing
the leave notifications, so no node would clear the attributes for the non-DC
node.
Now, the controller has its own CPG configuration change callback, which sets a
global boolean before calling the usual one, so that peer_update_callback() can
know when the DC has been lost.
---
daemons/controld/controld_callbacks.c | 4 +-
daemons/controld/controld_corosync.c | 57 ++++++++++++++++++++++++++-
2 files changed, 59 insertions(+), 2 deletions(-)
diff --git a/daemons/controld/controld_callbacks.c b/daemons/controld/controld_callbacks.c
index af24856ae..e564b3dcd 100644
--- a/daemons/controld/controld_callbacks.c
+++ b/daemons/controld/controld_callbacks.c
@@ -99,6 +99,8 @@ node_alive(const crm_node_t *node)
#define state_text(state) ((state)? (const char *)(state) : "in unknown state")
+bool controld_dc_left = false;
+
void
peer_update_callback(enum crm_status_type type, crm_node_t * node, const void *data)
{
@@ -217,7 +219,7 @@ peer_update_callback(enum crm_status_type type, crm_node_t * node, const void *d
cib_scope_local);
}
- } else if (AM_I_DC || (fsa_our_dc == NULL)) {
+ } else if (AM_I_DC || controld_dc_left || (fsa_our_dc == NULL)) {
/* This only needs to be done once, so normally the DC should do
* it. However if there is no DC, every node must do it, since
* there is no other way to ensure some one node does it.
diff --git a/daemons/controld/controld_corosync.c b/daemons/controld/controld_corosync.c
index db99630fb..c5ab6580a 100644
--- a/daemons/controld/controld_corosync.c
+++ b/daemons/controld/controld_corosync.c
@@ -87,6 +87,61 @@ crmd_cs_destroy(gpointer user_data)
}
}
+extern bool controld_dc_left;
+
+/*!
+ * \brief Handle a Corosync notification of a CPG configuration change
+ *
+ * \param[in] handle CPG connection
+ * \param[in] cpg_name CPG group name
+ * \param[in] member_list List of current CPG members
+ * \param[in] member_list_entries Number of entries in \p member_list
+ * \param[in] left_list List of CPG members that left
+ * \param[in] left_list_entries Number of entries in \p left_list
+ * \param[in] joined_list List of CPG members that joined
+ * \param[in] joined_list_entries Number of entries in \p joined_list
+ */
+static void
+cpg_membership_callback(cpg_handle_t handle, const struct cpg_name *cpg_name,
+ const struct cpg_address *member_list,
+ size_t member_list_entries,
+ const struct cpg_address *left_list,
+ size_t left_list_entries,
+ const struct cpg_address *joined_list,
+ size_t joined_list_entries)
+{
+ /* When nodes leave CPG, the DC clears their transient node attributes.
+ *
+ * However if there is no DC, or the DC is among the nodes that left, each
+ * remaining node needs to do the clearing, to ensure it gets done.
+ * Otherwise, the attributes would persist when the nodes rejoin, which
+ * could have serious consequences for unfencing, agents that use attributes
+ * for internal logic, etc.
+ *
+ * Here, we set a global boolean if the DC is among the nodes that left, for
+ * use by the peer callback.
+ */
+ if (fsa_our_dc != NULL) {
+ crm_node_t *peer = pcmk__search_cluster_node_cache(0, fsa_our_dc);
+
+ if (peer != NULL) {
+ for (int i = 0; i < left_list_entries; ++i) {
+ if (left_list[i].nodeid == peer->id) {
+ controld_dc_left = true;
+ break;
+ }
+ }
+ }
+ }
+
+ // Process the change normally, which will call the peer callback as needed
+ pcmk_cpg_membership(handle, cpg_name, member_list, member_list_entries,
+ left_list, left_list_entries,
+ joined_list, joined_list_entries);
+
+ controld_dc_left = false;
+}
+
extern gboolean crm_connect_corosync(crm_cluster_t * cluster);
gboolean
@@ -95,7 +150,7 @@ crm_connect_corosync(crm_cluster_t * cluster)
if (is_corosync_cluster()) {
crm_set_status_callback(&peer_update_callback);
cluster->cpg.cpg_deliver_fn = crmd_cs_dispatch;
- cluster->cpg.cpg_confchg_fn = pcmk_cpg_membership;
+ cluster->cpg.cpg_confchg_fn = cpg_membership_callback;
cluster->destroy = crmd_cs_destroy;
if (crm_cluster_connect(cluster)) {
--
2.27.0

View File

@ -1,114 +0,0 @@
From b4e426a016a4d7c9ade39e60a83644fc537bce26 Mon Sep 17 00:00:00 2001
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
Date: Wed, 11 Aug 2021 12:10:32 +0200
Subject: [PATCH 1/2] Fix: crm_resource: translate LSB rc to exit code and fix
resources_find_service_class() call
---
tools/crm_resource_runtime.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/tools/crm_resource_runtime.c b/tools/crm_resource_runtime.c
index ce037c514..e9d8aa687 100644
--- a/tools/crm_resource_runtime.c
+++ b/tools/crm_resource_runtime.c
@@ -1718,10 +1718,10 @@ cli_resource_execute_from_params(pcmk__output_t *out, const char *rsc_name,
crm_exit(CRM_EX_UNIMPLEMENT_FEATURE);
} else if (pcmk__str_eq(rsc_class, PCMK_RESOURCE_CLASS_SERVICE,
pcmk__str_casei) && !pcmk__str_eq(
- resources_find_service_class(rsc_name), PCMK_RESOURCE_CLASS_LSB,
+ resources_find_service_class(rsc_type), PCMK_RESOURCE_CLASS_LSB,
pcmk__str_casei)) {
out->err(out, "Sorry, the %s option doesn't support %s resources",
- rsc_action, resources_find_service_class(rsc_name));
+ rsc_action, resources_find_service_class(rsc_type));
crm_exit(CRM_EX_UNIMPLEMENT_FEATURE);
}
@@ -1798,9 +1798,17 @@ cli_resource_execute_from_params(pcmk__output_t *out, const char *rsc_name,
if (services_action_sync(op)) {
exit_code = op->rc;
+ /* Lookup exit code based on rc for LSB resources */
+ if (( pcmk__str_eq(rsc_class, PCMK_RESOURCE_CLASS_LSB, pcmk__str_casei) ||
+ (pcmk__str_eq(rsc_class, PCMK_RESOURCE_CLASS_SERVICE, pcmk__str_casei) &&
+ pcmk__str_eq(resources_find_service_class(rsc_type), PCMK_RESOURCE_CLASS_LSB, pcmk__str_casei)) ) &&
+ pcmk__str_eq(rsc_action, "force-check", pcmk__str_casei)) {
+ exit_code = services_get_ocf_exitcode(action, exit_code);
+ }
+
out->message(out, "resource-agent-action", resource_verbose, rsc_class,
- rsc_prov, rsc_type, rsc_name, rsc_action, override_hash, op->rc,
- op->status, op->stdout_data, op->stderr_data);
+ rsc_prov, rsc_type, rsc_name, rsc_action, override_hash,
+ exit_code, op->status, op->stdout_data, op->stderr_data);
} else {
exit_code = op->rc == 0 ? CRM_EX_ERROR : op->rc;
}
--
2.27.0
From 9a6beb74adfb4710fb3a4e588bef79a562c101f3 Mon Sep 17 00:00:00 2001
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
Date: Thu, 12 Aug 2021 18:54:30 +0200
Subject: [PATCH 2/2] Refactor: crm_resource: simplify rsc_class logic by
getting actual class early if it's of class "service"
---
tools/crm_resource_runtime.c | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/tools/crm_resource_runtime.c b/tools/crm_resource_runtime.c
index e9d8aa687..13b78b6b9 100644
--- a/tools/crm_resource_runtime.c
+++ b/tools/crm_resource_runtime.c
@@ -1702,26 +1702,23 @@ cli_resource_execute_from_params(pcmk__output_t *out, const char *rsc_name,
int timeout_ms, int resource_verbose, gboolean force,
int check_level)
{
+ const char *class = NULL;
const char *action = NULL;
GHashTable *params_copy = NULL;
crm_exit_t exit_code = CRM_EX_OK;
svc_action_t *op = NULL;
- if (pcmk__str_eq(rsc_class, PCMK_RESOURCE_CLASS_STONITH, pcmk__str_casei)) {
+ class = !pcmk__str_eq(rsc_class, PCMK_RESOURCE_CLASS_SERVICE, pcmk__str_casei) ?
+ rsc_class : resources_find_service_class(rsc_type);
+
+ if (pcmk__str_eq(class, PCMK_RESOURCE_CLASS_STONITH, pcmk__str_casei)) {
out->err(out, "Sorry, the %s option doesn't support %s resources yet",
- rsc_action, rsc_class);
+ rsc_action, class);
crm_exit(CRM_EX_UNIMPLEMENT_FEATURE);
- } else if (pcmk__strcase_any_of(rsc_class, PCMK_RESOURCE_CLASS_SYSTEMD,
+ } else if (pcmk__strcase_any_of(class, PCMK_RESOURCE_CLASS_SYSTEMD,
PCMK_RESOURCE_CLASS_UPSTART, PCMK_RESOURCE_CLASS_NAGIOS, NULL)) {
out->err(out, "Sorry, the %s option doesn't support %s resources",
- rsc_action, rsc_class);
- crm_exit(CRM_EX_UNIMPLEMENT_FEATURE);
- } else if (pcmk__str_eq(rsc_class, PCMK_RESOURCE_CLASS_SERVICE,
- pcmk__str_casei) && !pcmk__str_eq(
- resources_find_service_class(rsc_type), PCMK_RESOURCE_CLASS_LSB,
- pcmk__str_casei)) {
- out->err(out, "Sorry, the %s option doesn't support %s resources",
- rsc_action, resources_find_service_class(rsc_type));
+ rsc_action, class);
crm_exit(CRM_EX_UNIMPLEMENT_FEATURE);
}
@@ -1799,9 +1796,7 @@ cli_resource_execute_from_params(pcmk__output_t *out, const char *rsc_name,
exit_code = op->rc;
/* Lookup exit code based on rc for LSB resources */
- if (( pcmk__str_eq(rsc_class, PCMK_RESOURCE_CLASS_LSB, pcmk__str_casei) ||
- (pcmk__str_eq(rsc_class, PCMK_RESOURCE_CLASS_SERVICE, pcmk__str_casei) &&
- pcmk__str_eq(resources_find_service_class(rsc_type), PCMK_RESOURCE_CLASS_LSB, pcmk__str_casei)) ) &&
+ if (pcmk__str_eq(class, PCMK_RESOURCE_CLASS_LSB, pcmk__str_casei) &&
pcmk__str_eq(rsc_action, "force-check", pcmk__str_casei)) {
exit_code = services_get_ocf_exitcode(action, exit_code);
}
--
2.27.0

View File

@ -1,25 +0,0 @@
From 46dd1118cae948649e000b2159e8e92623520ad9 Mon Sep 17 00:00:00 2001
From: Klaus Wenninger <klaus.wenninger@aon.at>
Date: Thu, 19 Aug 2021 09:28:54 +0200
Subject: [PATCH] Fix: fence_watchdog: fix malformed xml in metadata
---
daemons/fenced/fence_watchdog.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemons/fenced/fence_watchdog.in b/daemons/fenced/fence_watchdog.in
index 700065e0e..eefa7395e 100755
--- a/daemons/fenced/fence_watchdog.in
+++ b/daemons/fenced/fence_watchdog.in
@@ -124,7 +124,7 @@ def metadata(avail_opt, options):
for option, dummy in sorted_options(avail_opt):
if "shortdesc" in ALL_OPT[option]:
print(' <parameter name="' + option +
- 'required="' + ALL_OPT[option]["required"] + '">')
+ '" required="' + ALL_OPT[option]["required"] + '">')
default = ""
default_name_arg = "-" + ALL_OPT[option]["getopt"][:-1]
--
2.27.0

View File

@ -36,18 +36,14 @@
## can be incremented to build packages reliably considered "newer"
## than previously built packages with the same pcmkversion)
%global pcmkversion 2.1.0
%global specversion 8
%global specversion 3
## Upstream commit (full commit ID, abbreviated commit ID, or tag) to build
%global commit 7c3f660707a495a1331716ad32cd3ac9d9f8ff58
## 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.
%if (0%{?fedora} >= 26) || (0%{?rhel} >= 9)
%global commit_abbrev 9
%else
%global commit_abbrev 7
%endif
## Nagios source control identifiers
%global nagios_name nagios-agents-metadata
@ -150,6 +146,14 @@
%define gnutls_priorities %{?pcmk_gnutls_priorities}%{!?pcmk_gnutls_priorities:@SYSTEM}
%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
%global supports_recommends 1
%endif
@ -270,19 +274,6 @@ Patch4: 004-check-level.patch
Patch5: 005-crm_resource.patch
Patch6: 006-crm_simulate.patch
Patch7: 007-unfencing-loop.patch
Patch8: 008-dynamic-list-fencing.patch
Patch9: 009-crm_resource-messages.patch
Patch10: 010-probe-pending.patch
Patch11: 011-crm_attribute-regression.patch
Patch12: 012-string-arguments.patch
Patch13: 013-leaks.patch
Patch14: 014-str-list.patch
Patch15: 015-sbd.patch
Patch16: 016-cts.patch
Patch17: 017-watchdog-fixes.patch
Patch18: 018-controller.patch
Patch19: 019-crm_resource.patch
Patch20: 020-fence_watchdog.patch
# downstream-only commits
#Patch1xx: 1xx-xxxx.patch
@ -313,34 +304,18 @@ Requires: libqb >= 0.17.0
BuildRequires: libqb-devel >= 0.17.0
# Required basic build tools
BuildRequires: autoconf
BuildRequires: automake
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
BuildRequires: coreutils findutils grep sed
BuildRequires: autoconf automake gcc make pkgconfig
BuildRequires: libtool %{?pkgname_libtool_devel}
# Required for core functionality
BuildRequires: pkgconfig(glib-2.0) >= 2.42
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: libuuid-devel
BuildRequires: libxml2-devel libxslt-devel libuuid-devel
BuildRequires: %{pkgname_bzip2_devel}
# Enables optional functionality
BuildRequires: pkgconfig(dbus-1)
BuildRequires: %{pkgname_docbook_xsl}
BuildRequires: %{pkgname_gnutls_devel}
BuildRequires: help2man
BuildRequires: ncurses-devel
BuildRequires: pam-devel
BuildRequires: ncurses-devel %{pkgname_docbook_xsl}
BuildRequires: help2man %{pkgname_gnutls_devel} pam-devel pkgconfig(dbus-1)
%if %{systemd_native}
BuildRequires: pkgconfig(systemd)
@ -357,9 +332,7 @@ BuildRequires: %{pkgname_glue_libs}-devel
%endif
%if %{with doc}
BuildRequires: asciidoc
BuildRequires: inkscape
BuildRequires: %{python_name}-sphinx
BuildRequires: asciidoc inkscape %{python_name}-sphinx
%endif
Provides: pcmk-cluster-manager = %{version}-%{release}
@ -389,9 +362,12 @@ Available rpmbuild rebuild options:
License: GPLv2+ and LGPLv2+
Summary: Command line tools for controlling Pacemaker clusters
Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release}
%if 0%{?supports_recommends}
#Recommends: pcmk-cluster-manager = %{version}-%{release}
# For crm_report
Requires: tar
Requires: bzip2
%endif
Requires: perl-TimeDate
Requires: %{pkgname_procps}
Requires: psmisc
@ -466,16 +442,11 @@ License: GPLv2+ and LGPLv2+
Summary: Pacemaker development package
Requires: %{pkgname_pcmk_libs}%{?_isa} = %{version}-%{release}
Requires: %{name}-cluster-libs%{?_isa} = %{version}-%{release}
Requires: %{pkgname_bzip2_devel}%{?_isa}
Requires: corosync-devel >= 2.0.0
Requires: glib2-devel%{?_isa}
Requires: %{?pkgname_libtool_devel_arch} libuuid-devel%{?_isa}
Requires: libxml2-devel%{?_isa} libxslt-devel%{?_isa}
Requires: %{pkgname_bzip2_devel}%{?_isa} 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}
Requires: corosync-devel >= 2.0.0
%description -n %{pkgname_pcmk_libs}-devel
Pacemaker is an advanced, scalable High-Availability cluster resource
@ -499,6 +470,7 @@ BuildArch: noarch
%if 0%{?fedora} > 22 || 0%{?rhel} > 7
Requires: %{python_name}-systemd
%endif
%endif
%description cts
@ -581,7 +553,6 @@ export LDFLAGS_HARDENED_LIB="%{?_hardening_ldflags}"
%{?concurrent_fencing} \
%{?resource_stickiness} \
%{?compat20} \
--disable-static \
--with-initdir=%{_initrddir} \
--with-runstatedir=%{_rundir} \
--localstatedir=%{_var} \
@ -632,7 +603,8 @@ done
mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/lib/rpm-state/%{name}
%endif
# Don't package libtool archives
# Don't package static libs
find %{buildroot} -name '*.a' -type f -print0 | xargs -0 rm -f
find %{buildroot} -name '*.la' -type f -print0 | xargs -0 rm -f
# Do not package these either
@ -804,7 +776,6 @@ exit 0
%{_sbindir}/crm_attribute
%{_sbindir}/crm_master
%{_sbindir}/fence_watchdog
%doc %{_mandir}/man7/pacemaker-controld.*
%doc %{_mandir}/man7/pacemaker-schedulerd.*
@ -813,7 +784,6 @@ exit 0
%doc %{_mandir}/man7/ocf_pacemaker_remote.*
%doc %{_mandir}/man8/crm_attribute.*
%doc %{_mandir}/man8/crm_master.*
%doc %{_mandir}/man8/fence_watchdog.*
%doc %{_mandir}/man8/pacemakerd.*
%doc %{_datadir}/pacemaker/alerts
@ -888,7 +858,6 @@ exit 0
%doc %{_mandir}/man8/*
%exclude %{_mandir}/man8/crm_attribute.*
%exclude %{_mandir}/man8/crm_master.*
%exclude %{_mandir}/man8/fence_watchdog.*
%exclude %{_mandir}/man8/pacemakerd.*
%exclude %{_mandir}/man8/pacemaker-remoted.*
@ -980,34 +949,6 @@ exit 0
%license %{nagios_name}-%{nagios_hash}/COPYING
%changelog
* Fri Aug 20 2021 Ken Gaillot <kgaillot@redhat.com> - 2.1.0-8
- Fix XML issue in fence_watchdog meta-data
- Resolves: rhbz1443666
* Thu Aug 12 2021 Ken Gaillot <kgaillot@redhat.com> - 2.1.0-7
- Fix minor issue with crm_resource error message change
- Resolves: rhbz1447918
* Tue Aug 10 2021 Ken Gaillot <kgaillot@redhat.com> - 2.1.0-6
- Fix watchdog agent version information
- Ensure transient attributes are cleared when multiple nodes are lost
- Resolves: rhbz1443666
- Resolves: rhbz1986998
* 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
- Show better error messages in crm_resource with invalid resource types
- Avoid selecting wrong device when dynamic-list fencing is used with host map
- Do not schedule probes of unmanaged resources on pending nodes
- Fix regressions in crm_attribute and crm_master argument handling
- Resolves: rhbz1447918
- Resolves: rhbz1978010
- Resolves: rhbz1982453
- Resolves: rhbz1984120
* Tue Jun 22 2021 Ken Gaillot <kgaillot@redhat.com> - 2.1.0-3
- crm_resource now supports XML output from resource agent actions
- Correct output for crm_simulate --show-failcounts