|
 |
9ccf84 |
From a81ca9625e8d1ccd7f79fbe464b9f4221e8671f2 Mon Sep 17 00:00:00 2001
|
|
 |
9ccf84 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
 |
9ccf84 |
Date: Thu, 9 May 2019 20:26:08 -0500
|
|
 |
9ccf84 |
Subject: [PATCH 1/6] Refactor: libpe_status: functionize unfencing digest code
|
|
 |
9ccf84 |
more
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
... for readability, reusability, and avoiding unnecessary function calls or
|
|
 |
9ccf84 |
memory allocation.
|
|
 |
9ccf84 |
---
|
|
 |
9ccf84 |
lib/pengine/utils.c | 159 ++++++++++++++++++++++++++++++++++++++--------------
|
|
 |
9ccf84 |
1 file changed, 118 insertions(+), 41 deletions(-)
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
diff --git a/lib/pengine/utils.c b/lib/pengine/utils.c
|
|
 |
9ccf84 |
index d09b0d8..b6a31d1 100644
|
|
 |
9ccf84 |
--- a/lib/pengine/utils.c
|
|
 |
9ccf84 |
+++ b/lib/pengine/utils.c
|
|
 |
9ccf84 |
@@ -2091,57 +2091,134 @@ rsc_action_digest_cmp(resource_t * rsc, xmlNode * xml_op, node_t * node,
|
|
 |
9ccf84 |
return data;
|
|
 |
9ccf84 |
}
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
+/*!
|
|
 |
9ccf84 |
+ * \internal
|
|
 |
9ccf84 |
+ * \brief Create an unfencing summary for use in special node attribute
|
|
 |
9ccf84 |
+ *
|
|
 |
9ccf84 |
+ * Create a string combining a fence device's resource ID, agent type, and
|
|
 |
9ccf84 |
+ * parameter digest (whether for all parameters or just non-private parameters).
|
|
 |
9ccf84 |
+ * This can be stored in a special node attribute, allowing us to detect changes
|
|
 |
9ccf84 |
+ * in either the agent type or parameters, to know whether unfencing must be
|
|
 |
9ccf84 |
+ * redone or can be safely skipped when the device's history is cleaned.
|
|
 |
9ccf84 |
+ *
|
|
 |
9ccf84 |
+ * \param[in] rsc_id Fence device resource ID
|
|
 |
9ccf84 |
+ * \param[in] agent_type Fence device agent
|
|
 |
9ccf84 |
+ * \param[in] param_digest Fence device parameter digest
|
|
 |
9ccf84 |
+ *
|
|
 |
9ccf84 |
+ * \return Newly allocated string with unfencing digest
|
|
 |
9ccf84 |
+ * \note The caller is responsible for freeing the result.
|
|
 |
9ccf84 |
+ */
|
|
 |
9ccf84 |
+static inline char *
|
|
 |
9ccf84 |
+create_unfencing_summary(const char *rsc_id, const char *agent_type,
|
|
 |
9ccf84 |
+ const char *param_digest)
|
|
 |
9ccf84 |
+{
|
|
 |
9ccf84 |
+ return crm_strdup_printf("%s:%s:%s", rsc_id, agent_type, param_digest);
|
|
 |
9ccf84 |
+}
|
|
 |
9ccf84 |
+
|
|
 |
9ccf84 |
+/*!
|
|
 |
9ccf84 |
+ * \internal
|
|
 |
9ccf84 |
+ * \brief Check whether a node can skip unfencing
|
|
 |
9ccf84 |
+ *
|
|
 |
9ccf84 |
+ * Check whether a fence device's current definition matches a node's
|
|
 |
9ccf84 |
+ * stored summary of when it was last unfenced by the device.
|
|
 |
9ccf84 |
+ *
|
|
 |
9ccf84 |
+ * \param[in] rsc_id Fence device's resource ID
|
|
 |
9ccf84 |
+ * \param[in] agent Fence device's agent type
|
|
 |
9ccf84 |
+ * \param[in] digest_calc Fence device's current parameter digest
|
|
 |
9ccf84 |
+ * \param[in] node_summary Value of node's special unfencing node attribute
|
|
 |
9ccf84 |
+ * (a comma-separated list of unfencing summaries for
|
|
 |
9ccf84 |
+ * all devices that have unfenced this node)
|
|
 |
9ccf84 |
+ *
|
|
 |
9ccf84 |
+ * \return TRUE if digest matches, FALSE otherwise
|
|
 |
9ccf84 |
+ */
|
|
 |
9ccf84 |
+static bool
|
|
 |
9ccf84 |
+unfencing_digest_matches(const char *rsc_id, const char *agent,
|
|
 |
9ccf84 |
+ const char *digest_calc, const char *node_summary)
|
|
 |
9ccf84 |
+{
|
|
 |
9ccf84 |
+ bool matches = FALSE;
|
|
 |
9ccf84 |
+
|
|
 |
9ccf84 |
+ if (rsc_id && agent && digest_calc && node_summary) {
|
|
 |
9ccf84 |
+ char *search_secure = create_unfencing_summary(rsc_id, agent,
|
|
 |
9ccf84 |
+ digest_calc);
|
|
 |
9ccf84 |
+
|
|
 |
9ccf84 |
+ /* The digest was calculated including the device ID and agent,
|
|
 |
9ccf84 |
+ * so there is no risk of collision using strstr().
|
|
 |
9ccf84 |
+ */
|
|
 |
9ccf84 |
+ matches = (strstr(node_summary, search_secure) != NULL);
|
|
 |
9ccf84 |
+ crm_trace("Calculated unfencing digest '%s' %sfound in '%s'",
|
|
 |
9ccf84 |
+ search_secure, matches? "" : "not ", node_summary);
|
|
 |
9ccf84 |
+ free(search_secure);
|
|
 |
9ccf84 |
+ }
|
|
 |
9ccf84 |
+ return matches;
|
|
 |
9ccf84 |
+}
|
|
 |
9ccf84 |
+
|
|
 |
9ccf84 |
+/* Magic string to use as action name for digest cache entries used for
|
|
 |
9ccf84 |
+ * unfencing checks. This is not a real action name (i.e. "on"), so
|
|
 |
9ccf84 |
+ * check_action_definition() won't confuse these entries with real actions.
|
|
 |
9ccf84 |
+ */
|
|
 |
9ccf84 |
#define STONITH_DIGEST_TASK "stonith-on"
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
+/*!
|
|
 |
9ccf84 |
+ * \internal
|
|
 |
9ccf84 |
+ * \brief Calculate fence device digests and digest comparison result
|
|
 |
9ccf84 |
+ *
|
|
 |
9ccf84 |
+ * \param[in] rsc Fence device resource
|
|
 |
9ccf84 |
+ * \param[in] agent Fence device's agent type
|
|
 |
9ccf84 |
+ * \param[in] node Node with digest cache to use
|
|
 |
9ccf84 |
+ * \param[in] data_set Cluster working set
|
|
 |
9ccf84 |
+ *
|
|
 |
9ccf84 |
+ * \return Node's digest cache entry
|
|
 |
9ccf84 |
+ */
|
|
 |
9ccf84 |
static op_digest_cache_t *
|
|
 |
9ccf84 |
-fencing_action_digest_cmp(resource_t * rsc, node_t * node, pe_working_set_t * data_set)
|
|
 |
9ccf84 |
+fencing_action_digest_cmp(pe_resource_t *rsc, const char *agent,
|
|
 |
9ccf84 |
+ pe_node_t *node, pe_working_set_t *data_set)
|
|
 |
9ccf84 |
{
|
|
 |
9ccf84 |
- char *key = generate_op_key(rsc->id, STONITH_DIGEST_TASK, 0);
|
|
 |
9ccf84 |
- op_digest_cache_t *data = rsc_action_digest(rsc, STONITH_DIGEST_TASK, key, node, NULL, data_set);
|
|
 |
9ccf84 |
+ const char *node_summary = NULL;
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
- const char *digest_all = pe_node_attribute_raw(node, CRM_ATTR_DIGESTS_ALL);
|
|
 |
9ccf84 |
- const char *digest_secure = pe_node_attribute_raw(node, CRM_ATTR_DIGESTS_SECURE);
|
|
 |
9ccf84 |
+ // Calculate device's current parameter digests
|
|
 |
9ccf84 |
+ char *key = generate_op_key(rsc->id, STONITH_DIGEST_TASK, 0);
|
|
 |
9ccf84 |
+ op_digest_cache_t *data = rsc_action_digest(rsc, STONITH_DIGEST_TASK, key,
|
|
 |
9ccf84 |
+ node, NULL, data_set);
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
- /* No 'reloads' for fencing device changes
|
|
 |
9ccf84 |
- *
|
|
 |
9ccf84 |
- * We use the resource id + agent + digest so that we can detect
|
|
 |
9ccf84 |
- * changes to the agent and/or the parameters used
|
|
 |
9ccf84 |
- */
|
|
 |
9ccf84 |
- char *search_all = crm_strdup_printf("%s:%s:%s", rsc->id, (const char*)g_hash_table_lookup(rsc->meta, XML_ATTR_TYPE), data->digest_all_calc);
|
|
 |
9ccf84 |
- char *search_secure = crm_strdup_printf("%s:%s:%s", rsc->id, (const char*)g_hash_table_lookup(rsc->meta, XML_ATTR_TYPE), data->digest_secure_calc);
|
|
 |
9ccf84 |
+ free(key);
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
- data->rc = RSC_DIGEST_ALL;
|
|
 |
9ccf84 |
- if (digest_all == NULL) {
|
|
 |
9ccf84 |
- /* it is unknown what the previous op digest was */
|
|
 |
9ccf84 |
+ // Check whether node has special unfencing summary node attribute
|
|
 |
9ccf84 |
+ node_summary = pe_node_attribute_raw(node, CRM_ATTR_DIGESTS_ALL);
|
|
 |
9ccf84 |
+ if (node_summary == NULL) {
|
|
 |
9ccf84 |
data->rc = RSC_DIGEST_UNKNOWN;
|
|
 |
9ccf84 |
+ return data;
|
|
 |
9ccf84 |
+ }
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
- } else if (strstr(digest_all, search_all)) {
|
|
 |
9ccf84 |
+ // Check whether full parameter digest matches
|
|
 |
9ccf84 |
+ if (unfencing_digest_matches(rsc->id, agent, data->digest_all_calc,
|
|
 |
9ccf84 |
+ node_summary)) {
|
|
 |
9ccf84 |
data->rc = RSC_DIGEST_MATCH;
|
|
 |
9ccf84 |
+ return data;
|
|
 |
9ccf84 |
+ }
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
- } else if(digest_secure && data->digest_secure_calc) {
|
|
 |
9ccf84 |
- if(strstr(digest_secure, search_secure)) {
|
|
 |
9ccf84 |
- if (is_set(data_set->flags, pe_flag_stdout)) {
|
|
 |
9ccf84 |
- printf("Only 'private' parameters to %s for unfencing %s changed\n",
|
|
 |
9ccf84 |
- rsc->id, node->details->uname);
|
|
 |
9ccf84 |
- }
|
|
 |
9ccf84 |
- data->rc = RSC_DIGEST_MATCH;
|
|
 |
9ccf84 |
+ // Check whether secure parameter digest matches
|
|
 |
9ccf84 |
+ node_summary = pe_node_attribute_raw(node, CRM_ATTR_DIGESTS_SECURE);
|
|
 |
9ccf84 |
+ if (unfencing_digest_matches(rsc->id, agent, data->digest_secure_calc,
|
|
 |
9ccf84 |
+ node_summary)) {
|
|
 |
9ccf84 |
+ data->rc = RSC_DIGEST_MATCH;
|
|
 |
9ccf84 |
+ if (is_set(data_set->flags, pe_flag_stdout)) {
|
|
 |
9ccf84 |
+ printf("Only 'private' parameters to %s for unfencing %s changed\n",
|
|
 |
9ccf84 |
+ rsc->id, node->details->uname);
|
|
 |
9ccf84 |
}
|
|
 |
9ccf84 |
+ return data;
|
|
 |
9ccf84 |
}
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
- if (is_set(data_set->flags, pe_flag_sanitized)
|
|
 |
9ccf84 |
- && is_set(data_set->flags, pe_flag_stdout)
|
|
 |
9ccf84 |
- && (data->rc == RSC_DIGEST_ALL)
|
|
 |
9ccf84 |
+ // Parameters don't match
|
|
 |
9ccf84 |
+ data->rc = RSC_DIGEST_ALL;
|
|
 |
9ccf84 |
+ if (is_set(data_set->flags, (pe_flag_sanitized|pe_flag_stdout))
|
|
 |
9ccf84 |
&& data->digest_secure_calc) {
|
|
 |
9ccf84 |
- printf("Parameters to %s for unfencing %s changed, try '%s:%s:%s'\n",
|
|
 |
9ccf84 |
- rsc->id, node->details->uname, rsc->id,
|
|
 |
9ccf84 |
- (const char *) g_hash_table_lookup(rsc->meta, XML_ATTR_TYPE),
|
|
 |
9ccf84 |
- data->digest_secure_calc);
|
|
 |
9ccf84 |
- }
|
|
 |
9ccf84 |
-
|
|
 |
9ccf84 |
- free(key);
|
|
 |
9ccf84 |
- free(search_all);
|
|
 |
9ccf84 |
- free(search_secure);
|
|
 |
9ccf84 |
+ char *digest = create_unfencing_summary(rsc->id, agent,
|
|
 |
9ccf84 |
+ data->digest_secure_calc);
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
+ printf("Parameters to %s for unfencing %s changed, try '%s'\n",
|
|
 |
9ccf84 |
+ rsc->id, node->details->uname, digest);
|
|
 |
9ccf84 |
+ free(digest);
|
|
 |
9ccf84 |
+ }
|
|
 |
9ccf84 |
return data;
|
|
 |
9ccf84 |
}
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
@@ -2228,9 +2305,6 @@ pe_fence_op(node_t * node, const char *op, bool optional, const char *reason, pe
|
|
 |
9ccf84 |
*
|
|
 |
9ccf84 |
* We may do this for all nodes in the future, but for now
|
|
 |
9ccf84 |
* the check_action_definition() based stuff works fine.
|
|
 |
9ccf84 |
- *
|
|
 |
9ccf84 |
- * Use "stonith-on" to avoid creating cache entries for
|
|
 |
9ccf84 |
- * operations check_action_definition() would look for.
|
|
 |
9ccf84 |
*/
|
|
 |
9ccf84 |
long max = 1024;
|
|
 |
9ccf84 |
long digests_all_offset = 0;
|
|
 |
9ccf84 |
@@ -2242,8 +2316,11 @@ pe_fence_op(node_t * node, const char *op, bool optional, const char *reason, pe
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
for (GListPtr gIter = matches; gIter != NULL; gIter = gIter->next) {
|
|
 |
9ccf84 |
resource_t *match = gIter->data;
|
|
 |
9ccf84 |
- op_digest_cache_t *data = fencing_action_digest_cmp(match, node, data_set);
|
|
 |
9ccf84 |
+ const char *agent = g_hash_table_lookup(match->meta,
|
|
 |
9ccf84 |
+ XML_ATTR_TYPE);
|
|
 |
9ccf84 |
+ op_digest_cache_t *data = NULL;
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
+ data = fencing_action_digest_cmp(match, agent, node, data_set);
|
|
 |
9ccf84 |
if(data->rc == RSC_DIGEST_ALL) {
|
|
 |
9ccf84 |
optional = FALSE;
|
|
 |
9ccf84 |
crm_notice("Unfencing %s (remote): because the definition of %s changed", node->details->uname, match->id);
|
|
 |
9ccf84 |
@@ -2254,11 +2331,11 @@ pe_fence_op(node_t * node, const char *op, bool optional, const char *reason, pe
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
digests_all_offset += snprintf(
|
|
 |
9ccf84 |
digests_all+digests_all_offset, max-digests_all_offset,
|
|
 |
9ccf84 |
- "%s:%s:%s,", match->id, (const char*)g_hash_table_lookup(match->meta, XML_ATTR_TYPE), data->digest_all_calc);
|
|
 |
9ccf84 |
+ "%s:%s:%s,", match->id, agent, data->digest_all_calc);
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
digests_secure_offset += snprintf(
|
|
 |
9ccf84 |
digests_secure+digests_secure_offset, max-digests_secure_offset,
|
|
 |
9ccf84 |
- "%s:%s:%s,", match->id, (const char*)g_hash_table_lookup(match->meta, XML_ATTR_TYPE), data->digest_secure_calc);
|
|
 |
9ccf84 |
+ "%s:%s:%s,", match->id, agent, data->digest_secure_calc);
|
|
 |
9ccf84 |
}
|
|
 |
9ccf84 |
g_hash_table_insert(stonith_op->meta,
|
|
 |
9ccf84 |
strdup(XML_OP_ATTR_DIGESTS_ALL),
|
|
 |
9ccf84 |
--
|
|
 |
9ccf84 |
1.8.3.1
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
From be34a73f9cfb6abdb3e2799593cb0358c01c2521 Mon Sep 17 00:00:00 2001
|
|
 |
9ccf84 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
 |
9ccf84 |
Date: Fri, 10 May 2019 11:57:31 -0500
|
|
 |
9ccf84 |
Subject: [PATCH 2/6] Fix: libpe_status: calculate secure digests for unfencing
|
|
 |
9ccf84 |
ops
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
The calculation of digests for detection of when unfencing is needed reused
|
|
 |
9ccf84 |
rsc_action_digest(). However that would only add secure digests when the
|
|
 |
9ccf84 |
pe_flag_sanitized flag was set, which is only set by crm_simulate, so secure
|
|
 |
9ccf84 |
digests would never be added in normal cluster operation. This led to
|
|
 |
9ccf84 |
node attributes like name="#digests-secure"
|
|
 |
9ccf84 |
value="stonith-fence_compute-fence-nova:fence_compute:(null),".
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
Now, rsc_action_digest() takes a new argument to select whether secure digests
|
|
 |
9ccf84 |
are added, which is always set to TRUE when calculating unfencing digests.
|
|
 |
9ccf84 |
---
|
|
 |
9ccf84 |
lib/pengine/utils.c | 27 ++++++++++++++++++++++-----
|
|
 |
9ccf84 |
1 file changed, 22 insertions(+), 5 deletions(-)
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
diff --git a/lib/pengine/utils.c b/lib/pengine/utils.c
|
|
 |
9ccf84 |
index b6a31d1..f52f1c7 100644
|
|
 |
9ccf84 |
--- a/lib/pengine/utils.c
|
|
 |
9ccf84 |
+++ b/lib/pengine/utils.c
|
|
 |
9ccf84 |
@@ -1948,9 +1948,24 @@ append_versioned_params(xmlNode *versioned_params, const char *ra_version, xmlNo
|
|
 |
9ccf84 |
}
|
|
 |
9ccf84 |
#endif
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
+/*!
|
|
 |
9ccf84 |
+ * \internal
|
|
 |
9ccf84 |
+ * \brief Calculate action digests and store in node's digest cache
|
|
 |
9ccf84 |
+ *
|
|
 |
9ccf84 |
+ * \param[in] rsc Resource that action was for
|
|
 |
9ccf84 |
+ * \param[in] task Name of action performed
|
|
 |
9ccf84 |
+ * \param[in] key Action's task key
|
|
 |
9ccf84 |
+ * \param[in] node Node action was performed on
|
|
 |
9ccf84 |
+ * \param[in] xml_op XML of operation in CIB status (if available)
|
|
 |
9ccf84 |
+ * \param[in] calc_secure Whether to calculate secure digest
|
|
 |
9ccf84 |
+ * \param[in] data_set Cluster working set
|
|
 |
9ccf84 |
+ *
|
|
 |
9ccf84 |
+ * \return Pointer to node's digest cache entry
|
|
 |
9ccf84 |
+ */
|
|
 |
9ccf84 |
static op_digest_cache_t *
|
|
 |
9ccf84 |
-rsc_action_digest(resource_t * rsc, const char *task, const char *key,
|
|
 |
9ccf84 |
- node_t * node, xmlNode * xml_op, pe_working_set_t * data_set)
|
|
 |
9ccf84 |
+rsc_action_digest(pe_resource_t *rsc, const char *task, const char *key,
|
|
 |
9ccf84 |
+ pe_node_t *node, xmlNode *xml_op, bool calc_secure,
|
|
 |
9ccf84 |
+ pe_working_set_t *data_set)
|
|
 |
9ccf84 |
{
|
|
 |
9ccf84 |
op_digest_cache_t *data = NULL;
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
@@ -2018,7 +2033,7 @@ rsc_action_digest(resource_t * rsc, const char *task, const char *key,
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
data->digest_all_calc = calculate_operation_digest(data->params_all, op_version);
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
- if (is_set(data_set->flags, pe_flag_sanitized)) {
|
|
 |
9ccf84 |
+ if (calc_secure) {
|
|
 |
9ccf84 |
data->params_secure = copy_xml(data->params_all);
|
|
 |
9ccf84 |
if(secure_list) {
|
|
 |
9ccf84 |
filter_parameters(data->params_secure, secure_list, FALSE);
|
|
 |
9ccf84 |
@@ -2064,7 +2079,9 @@ rsc_action_digest_cmp(resource_t * rsc, xmlNode * xml_op, node_t * node,
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
interval = crm_parse_int(interval_s, "0");
|
|
 |
9ccf84 |
key = generate_op_key(rsc->id, task, interval);
|
|
 |
9ccf84 |
- data = rsc_action_digest(rsc, task, key, node, xml_op, data_set);
|
|
 |
9ccf84 |
+ data = rsc_action_digest(rsc, task, key, node, xml_op,
|
|
 |
9ccf84 |
+ is_set(data_set->flags, pe_flag_sanitized),
|
|
 |
9ccf84 |
+ data_set);
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
data->rc = RSC_DIGEST_MATCH;
|
|
 |
9ccf84 |
if (digest_restart && data->digest_restart_calc && strcmp(data->digest_restart_calc, digest_restart) != 0) {
|
|
 |
9ccf84 |
@@ -2178,7 +2195,7 @@ fencing_action_digest_cmp(pe_resource_t *rsc, const char *agent,
|
|
 |
9ccf84 |
// Calculate device's current parameter digests
|
|
 |
9ccf84 |
char *key = generate_op_key(rsc->id, STONITH_DIGEST_TASK, 0);
|
|
 |
9ccf84 |
op_digest_cache_t *data = rsc_action_digest(rsc, STONITH_DIGEST_TASK, key,
|
|
 |
9ccf84 |
- node, NULL, data_set);
|
|
 |
9ccf84 |
+ node, NULL, TRUE, data_set);
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
free(key);
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
--
|
|
 |
9ccf84 |
1.8.3.1
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
From 8819c2f96f74ab4b4979df5ed04c16dd6bdad5f1 Mon Sep 17 00:00:00 2001
|
|
 |
9ccf84 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
 |
9ccf84 |
Date: Sat, 8 Jun 2019 16:25:04 -0500
|
|
 |
9ccf84 |
Subject: [PATCH 3/6] Refactor: libpe_status: add function for checking
|
|
 |
9ccf84 |
shutdown attribute
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
... to reduce code duplication and allow further reuse
|
|
 |
9ccf84 |
---
|
|
 |
9ccf84 |
include/crm/pengine/internal.h | 2 ++
|
|
 |
9ccf84 |
lib/pengine/unpack.c | 8 ++------
|
|
 |
9ccf84 |
lib/pengine/utils.c | 20 ++++++++++++++++++++
|
|
 |
9ccf84 |
3 files changed, 24 insertions(+), 6 deletions(-)
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
diff --git a/include/crm/pengine/internal.h b/include/crm/pengine/internal.h
|
|
 |
9ccf84 |
index c40b075..c3f9f70 100644
|
|
 |
9ccf84 |
--- a/include/crm/pengine/internal.h
|
|
 |
9ccf84 |
+++ b/include/crm/pengine/internal.h
|
|
 |
9ccf84 |
@@ -362,4 +362,6 @@ void pe__foreach_param_check(pe_working_set_t *data_set,
|
|
 |
9ccf84 |
enum pe_check_parameters,
|
|
 |
9ccf84 |
pe_working_set_t*));
|
|
 |
9ccf84 |
void pe__free_param_checks(pe_working_set_t *data_set);
|
|
 |
9ccf84 |
+
|
|
 |
9ccf84 |
+bool pe__shutdown_requested(pe_node_t *node);
|
|
 |
9ccf84 |
#endif
|
|
 |
9ccf84 |
diff --git a/lib/pengine/unpack.c b/lib/pengine/unpack.c
|
|
 |
9ccf84 |
index 619ccbf..cf725a1 100644
|
|
 |
9ccf84 |
--- a/lib/pengine/unpack.c
|
|
 |
9ccf84 |
+++ b/lib/pengine/unpack.c
|
|
 |
9ccf84 |
@@ -1013,7 +1013,6 @@ unpack_handle_remote_attrs(node_t *this_node, xmlNode *state, pe_working_set_t *
|
|
 |
9ccf84 |
const char *resource_discovery_enabled = NULL;
|
|
 |
9ccf84 |
xmlNode *attrs = NULL;
|
|
 |
9ccf84 |
resource_t *rsc = NULL;
|
|
 |
9ccf84 |
- const char *shutdown = NULL;
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
if (crm_str_eq((const char *)state->name, XML_CIB_TAG_STATE, TRUE) == FALSE) {
|
|
 |
9ccf84 |
return;
|
|
 |
9ccf84 |
@@ -1035,8 +1034,7 @@ unpack_handle_remote_attrs(node_t *this_node, xmlNode *state, pe_working_set_t *
|
|
 |
9ccf84 |
attrs = find_xml_node(state, XML_TAG_TRANSIENT_NODEATTRS, FALSE);
|
|
 |
9ccf84 |
add_node_attrs(attrs, this_node, TRUE, data_set);
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
- shutdown = pe_node_attribute_raw(this_node, XML_CIB_ATTR_SHUTDOWN);
|
|
 |
9ccf84 |
- if (shutdown != NULL && safe_str_neq("0", shutdown)) {
|
|
 |
9ccf84 |
+ if (pe__shutdown_requested(this_node)) {
|
|
 |
9ccf84 |
crm_info("Node %s is shutting down", this_node->details->uname);
|
|
 |
9ccf84 |
this_node->details->shutdown = TRUE;
|
|
 |
9ccf84 |
if (rsc) {
|
|
 |
9ccf84 |
@@ -1512,7 +1510,6 @@ gboolean
|
|
 |
9ccf84 |
determine_online_status(xmlNode * node_state, node_t * this_node, pe_working_set_t * data_set)
|
|
 |
9ccf84 |
{
|
|
 |
9ccf84 |
gboolean online = FALSE;
|
|
 |
9ccf84 |
- const char *shutdown = NULL;
|
|
 |
9ccf84 |
const char *exp_state = crm_element_value(node_state, XML_NODE_EXPECTED);
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
if (this_node == NULL) {
|
|
 |
9ccf84 |
@@ -1522,9 +1519,8 @@ determine_online_status(xmlNode * node_state, node_t * this_node, pe_working_set
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
this_node->details->shutdown = FALSE;
|
|
 |
9ccf84 |
this_node->details->expected_up = FALSE;
|
|
 |
9ccf84 |
- shutdown = pe_node_attribute_raw(this_node, XML_CIB_ATTR_SHUTDOWN);
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
- if (shutdown != NULL && safe_str_neq("0", shutdown)) {
|
|
 |
9ccf84 |
+ if (pe__shutdown_requested(this_node)) {
|
|
 |
9ccf84 |
this_node->details->shutdown = TRUE;
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
} else if (safe_str_eq(exp_state, CRMD_JOINSTATE_MEMBER)) {
|
|
 |
9ccf84 |
diff --git a/lib/pengine/utils.c b/lib/pengine/utils.c
|
|
 |
9ccf84 |
index f52f1c7..8eac2ce 100644
|
|
 |
9ccf84 |
--- a/lib/pengine/utils.c
|
|
 |
9ccf84 |
+++ b/lib/pengine/utils.c
|
|
 |
9ccf84 |
@@ -2522,3 +2522,23 @@ void pe_action_set_reason(pe_action_t *action, const char *reason, bool overwrit
|
|
 |
9ccf84 |
}
|
|
 |
9ccf84 |
}
|
|
 |
9ccf84 |
}
|
|
 |
9ccf84 |
+
|
|
 |
9ccf84 |
+/*!
|
|
 |
9ccf84 |
+ * \internal
|
|
 |
9ccf84 |
+ * \brief Check whether shutdown has been requested for a node
|
|
 |
9ccf84 |
+ *
|
|
 |
9ccf84 |
+ * \param[in] node Node to check
|
|
 |
9ccf84 |
+ *
|
|
 |
9ccf84 |
+ * \return TRUE if node has shutdown attribute set and nonzero, FALSE otherwise
|
|
 |
9ccf84 |
+ * \note This differs from simply using node->details->shutdown in that it can
|
|
 |
9ccf84 |
+ * be used before that has been determined (and in fact to determine it),
|
|
 |
9ccf84 |
+ * and it can also be used to distinguish requested shutdown from implicit
|
|
 |
9ccf84 |
+ * shutdown of remote nodes by virtue of their connection stopping.
|
|
 |
9ccf84 |
+ */
|
|
 |
9ccf84 |
+bool
|
|
 |
9ccf84 |
+pe__shutdown_requested(pe_node_t *node)
|
|
 |
9ccf84 |
+{
|
|
 |
9ccf84 |
+ const char *shutdown = pe_node_attribute_raw(node, XML_CIB_ATTR_SHUTDOWN);
|
|
 |
9ccf84 |
+
|
|
 |
9ccf84 |
+ return shutdown && strcmp(shutdown, "0");
|
|
 |
9ccf84 |
+}
|
|
 |
9ccf84 |
--
|
|
 |
9ccf84 |
1.8.3.1
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
From 938e99f29ed5faaeb4015247e363ddc7e77208a3 Mon Sep 17 00:00:00 2001
|
|
 |
9ccf84 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
 |
9ccf84 |
Date: Wed, 5 Jun 2019 16:37:26 -0500
|
|
 |
9ccf84 |
Subject: [PATCH 4/6] Fix: scheduler: remote state is failed if node is
|
|
 |
9ccf84 |
shutting down with connection failure
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
When determining remote state, if the connection resource is failed and not
|
|
 |
9ccf84 |
being started again, we consider the state to be unknown if the connection has
|
|
 |
9ccf84 |
a reconnect interval, because we won't know whether the connection can be
|
|
 |
9ccf84 |
recovered until the interval expires and we re-attempt connection.
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
However, if the node is shutting down at the time, we won't re-attempt
|
|
 |
9ccf84 |
connection, so consider the state failed in that case. (Note that we check the
|
|
 |
9ccf84 |
actual shutdown node attribute, rather than node->details->shutdown, since that
|
|
 |
9ccf84 |
is set for remote nodes whenever the connection is stopping.)
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
This avoids a situation where actions that cannot succeed can be scheduled on a
|
|
 |
9ccf84 |
remote node that's shutting down.
|
|
 |
9ccf84 |
---
|
|
 |
9ccf84 |
pengine/allocate.c | 3 ++-
|
|
 |
9ccf84 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
diff --git a/pengine/allocate.c b/pengine/allocate.c
|
|
 |
9ccf84 |
index 578db2f..c9877a4 100644
|
|
 |
9ccf84 |
--- a/pengine/allocate.c
|
|
 |
9ccf84 |
+++ b/pengine/allocate.c
|
|
 |
9ccf84 |
@@ -1998,7 +1998,8 @@ get_remote_node_state(pe_node_t *node)
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
if ((remote_rsc->next_role == RSC_ROLE_STOPPED)
|
|
 |
9ccf84 |
&& remote_rsc->remote_reconnect_interval
|
|
 |
9ccf84 |
- && node->details->remote_was_fenced) {
|
|
 |
9ccf84 |
+ && node->details->remote_was_fenced
|
|
 |
9ccf84 |
+ && !pe__shutdown_requested(node)) {
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
/* We won't know whether the connection is recoverable until the
|
|
 |
9ccf84 |
* reconnect interval expires and we reattempt connection.
|
|
 |
9ccf84 |
--
|
|
 |
9ccf84 |
1.8.3.1
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
From c20f8920634f47bbdf699d80dafd50c6a72eac8b Mon Sep 17 00:00:00 2001
|
|
 |
9ccf84 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
 |
9ccf84 |
Date: Wed, 5 Jun 2019 16:43:19 -0500
|
|
 |
9ccf84 |
Subject: [PATCH 5/6] Fix: libpe_status: don't order implied stops relative to
|
|
 |
9ccf84 |
a remote connection
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
Actions behind a remote connection are ordered relative to any start or stop of
|
|
 |
9ccf84 |
the remote connection. However, if the action is a stop implied due to fencing,
|
|
 |
9ccf84 |
it does not require the remote connection, and the ordering should not be done.
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
This avoids a delay in the remote connection recovery if it is failed, e.g.
|
|
 |
9ccf84 |
previously the ordering would look like:
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
fence remote node -> implied stop of resource on remote -> stop connection
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
Now, the connection stop can proceed simultaneously with the remote node
|
|
 |
9ccf84 |
fencing.
|
|
 |
9ccf84 |
---
|
|
 |
9ccf84 |
pengine/allocate.c | 11 +++++------
|
|
 |
9ccf84 |
1 file changed, 5 insertions(+), 6 deletions(-)
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
diff --git a/pengine/allocate.c b/pengine/allocate.c
|
|
 |
9ccf84 |
index c9877a4..c7c68f8 100644
|
|
 |
9ccf84 |
--- a/pengine/allocate.c
|
|
 |
9ccf84 |
+++ b/pengine/allocate.c
|
|
 |
9ccf84 |
@@ -2091,14 +2091,13 @@ apply_remote_ordering(action_t *action, pe_working_set_t *data_set)
|
|
 |
9ccf84 |
pe_order_implies_first, data_set);
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
} else if(state == remote_state_failed) {
|
|
 |
9ccf84 |
- /* We would only be here if the resource is
|
|
 |
9ccf84 |
- * running on the remote node. Since we have no
|
|
 |
9ccf84 |
- * way to stop it, it is necessary to fence the
|
|
 |
9ccf84 |
- * node.
|
|
 |
9ccf84 |
+ /* The resource is active on the node, but since we don't have a
|
|
 |
9ccf84 |
+ * valid connection, the only way to stop the resource is by
|
|
 |
9ccf84 |
+ * fencing the node. There is no need to order the stop relative
|
|
 |
9ccf84 |
+ * to the remote connection, since the stop will become implied
|
|
 |
9ccf84 |
+ * by the fencing.
|
|
 |
9ccf84 |
*/
|
|
 |
9ccf84 |
pe_fence_node(data_set, action->node, "resources are active and the connection is unrecoverable");
|
|
 |
9ccf84 |
- order_action_then_stop(action, remote_rsc,
|
|
 |
9ccf84 |
- pe_order_implies_first, data_set);
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
} else if(remote_rsc->next_role == RSC_ROLE_STOPPED) {
|
|
 |
9ccf84 |
/* State must be remote_state_unknown or remote_state_stopped.
|
|
 |
9ccf84 |
--
|
|
 |
9ccf84 |
1.8.3.1
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
From 26a28ee80b7fc110125eedac377dfa4c0a8e8294 Mon Sep 17 00:00:00 2001
|
|
 |
9ccf84 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
 |
9ccf84 |
Date: Fri, 14 Jun 2019 14:08:47 -0500
|
|
 |
9ccf84 |
Subject: [PATCH 6/6] Test: pengine: update regression tests for remote
|
|
 |
9ccf84 |
connection ordering change
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
---
|
|
 |
9ccf84 |
pengine/test10/remote-connection-unrecoverable.dot | 2 --
|
|
 |
9ccf84 |
pengine/test10/remote-connection-unrecoverable.exp | 6 ------
|
|
 |
9ccf84 |
pengine/test10/remote-connection-unrecoverable.summary | 2 +-
|
|
 |
9ccf84 |
pengine/test10/remote-fence-before-reconnect.dot | 1 -
|
|
 |
9ccf84 |
pengine/test10/remote-fence-before-reconnect.exp | 6 +-----
|
|
 |
9ccf84 |
pengine/test10/remote-fence-before-reconnect.summary | 2 +-
|
|
 |
9ccf84 |
pengine/test10/remote-recover-all.dot | 2 --
|
|
 |
9ccf84 |
pengine/test10/remote-recover-all.exp | 6 ------
|
|
 |
9ccf84 |
pengine/test10/remote-recover-all.summary | 4 ++--
|
|
 |
9ccf84 |
pengine/test10/remote-recover-no-resources.dot | 1 -
|
|
 |
9ccf84 |
pengine/test10/remote-recover-no-resources.exp | 3 ---
|
|
 |
9ccf84 |
pengine/test10/remote-recover-no-resources.summary | 2 +-
|
|
 |
9ccf84 |
pengine/test10/remote-recover-unknown.dot | 1 -
|
|
 |
9ccf84 |
pengine/test10/remote-recover-unknown.exp | 3 ---
|
|
 |
9ccf84 |
pengine/test10/remote-recover-unknown.summary | 2 +-
|
|
 |
9ccf84 |
15 files changed, 7 insertions(+), 36 deletions(-)
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
diff --git a/pengine/test10/remote-connection-unrecoverable.dot b/pengine/test10/remote-connection-unrecoverable.dot
|
|
 |
9ccf84 |
index 0360cd0..b5caca6 100644
|
|
 |
9ccf84 |
--- a/pengine/test10/remote-connection-unrecoverable.dot
|
|
 |
9ccf84 |
+++ b/pengine/test10/remote-connection-unrecoverable.dot
|
|
 |
9ccf84 |
@@ -7,14 +7,12 @@ digraph "g" {
|
|
 |
9ccf84 |
"remote1_stop_0 node1" [ style=bold color="green" fontcolor="orange"]
|
|
 |
9ccf84 |
"rsc1_delete_0 remote1" -> "rsc1_start_0 node2" [ style = dashed]
|
|
 |
9ccf84 |
"rsc1_delete_0 remote1" [ style=dashed color="red" fontcolor="black"]
|
|
 |
9ccf84 |
-"rsc1_monitor_0 node2" -> "remote1_stop_0 node1" [ style = bold]
|
|
 |
9ccf84 |
"rsc1_monitor_0 node2" -> "rsc1_start_0 node2" [ style = bold]
|
|
 |
9ccf84 |
"rsc1_monitor_0 node2" -> "rsc2-master_demote_0" [ style = bold]
|
|
 |
9ccf84 |
"rsc1_monitor_0 node2" [ style=bold color="green" fontcolor="black"]
|
|
 |
9ccf84 |
"rsc1_monitor_10000 node2" [ style=bold color="green" fontcolor="black"]
|
|
 |
9ccf84 |
"rsc1_start_0 node2" -> "rsc1_monitor_10000 node2" [ style = bold]
|
|
 |
9ccf84 |
"rsc1_start_0 node2" [ style=bold color="green" fontcolor="black"]
|
|
 |
9ccf84 |
-"rsc1_stop_0 remote1" -> "remote1_stop_0 node1" [ style = bold]
|
|
 |
9ccf84 |
"rsc1_stop_0 remote1" -> "rsc1_delete_0 remote1" [ style = dashed]
|
|
 |
9ccf84 |
"rsc1_stop_0 remote1" -> "rsc1_start_0 node2" [ style = bold]
|
|
 |
9ccf84 |
"rsc1_stop_0 remote1" -> "rsc2-master_demote_0" [ style = bold]
|
|
 |
9ccf84 |
diff --git a/pengine/test10/remote-connection-unrecoverable.exp b/pengine/test10/remote-connection-unrecoverable.exp
|
|
 |
9ccf84 |
index 73fa7a1..339ad56 100644
|
|
 |
9ccf84 |
--- a/pengine/test10/remote-connection-unrecoverable.exp
|
|
 |
9ccf84 |
+++ b/pengine/test10/remote-connection-unrecoverable.exp
|
|
 |
9ccf84 |
@@ -9,12 +9,6 @@
|
|
 |
9ccf84 |
<trigger>
|
|
 |
9ccf84 |
<crm_event id="1" operation="stonith" operation_key="stonith-node1-reboot" on_node="node1" on_node_uuid="1"/>
|
|
 |
9ccf84 |
</trigger>
|
|
 |
9ccf84 |
- <trigger>
|
|
 |
9ccf84 |
- <pseudo_event id="6" operation="stop" operation_key="rsc1_stop_0"/>
|
|
 |
9ccf84 |
- </trigger>
|
|
 |
9ccf84 |
- <trigger>
|
|
 |
9ccf84 |
- <rsc_op id="8" operation="monitor" operation_key="rsc1_monitor_0" on_node="node2" on_node_uuid="2"/>
|
|
 |
9ccf84 |
- </trigger>
|
|
 |
9ccf84 |
</inputs>
|
|
 |
9ccf84 |
</synapse>
|
|
 |
9ccf84 |
<synapse id="1">
|
|
 |
9ccf84 |
diff --git a/pengine/test10/remote-connection-unrecoverable.summary b/pengine/test10/remote-connection-unrecoverable.summary
|
|
 |
9ccf84 |
index efeb765..18f7dc7 100644
|
|
 |
9ccf84 |
--- a/pengine/test10/remote-connection-unrecoverable.summary
|
|
 |
9ccf84 |
+++ b/pengine/test10/remote-connection-unrecoverable.summary
|
|
 |
9ccf84 |
@@ -24,12 +24,12 @@ Executing cluster transition:
|
|
 |
9ccf84 |
* Resource action: killer stop on node2
|
|
 |
9ccf84 |
* Resource action: rsc1 monitor on node2
|
|
 |
9ccf84 |
* Fencing node1 (reboot)
|
|
 |
9ccf84 |
+ * Pseudo action: remote1_stop_0
|
|
 |
9ccf84 |
* Fencing remote1 (reboot)
|
|
 |
9ccf84 |
* Resource action: killer start on node2
|
|
 |
9ccf84 |
* Resource action: killer monitor=60000 on node2
|
|
 |
9ccf84 |
* Pseudo action: rsc1_stop_0
|
|
 |
9ccf84 |
* Pseudo action: rsc2-master_demote_0
|
|
 |
9ccf84 |
- * Pseudo action: remote1_stop_0
|
|
 |
9ccf84 |
* Resource action: rsc1 start on node2
|
|
 |
9ccf84 |
* Pseudo action: rsc2_demote_0
|
|
 |
9ccf84 |
* Pseudo action: rsc2-master_demoted_0
|
|
 |
9ccf84 |
diff --git a/pengine/test10/remote-fence-before-reconnect.dot b/pengine/test10/remote-fence-before-reconnect.dot
|
|
 |
9ccf84 |
index 4ced43e..5812b7f 100644
|
|
 |
9ccf84 |
--- a/pengine/test10/remote-fence-before-reconnect.dot
|
|
 |
9ccf84 |
+++ b/pengine/test10/remote-fence-before-reconnect.dot
|
|
 |
9ccf84 |
@@ -3,7 +3,6 @@
|
|
 |
9ccf84 |
"fake2_monitor_10000 c7auto1" [ style=bold color="green" fontcolor="black"]
|
|
 |
9ccf84 |
"fake2_start_0 c7auto1" -> "fake2_monitor_10000 c7auto1" [ style = bold]
|
|
 |
9ccf84 |
"fake2_start_0 c7auto1" [ style=bold color="green" fontcolor="black"]
|
|
 |
9ccf84 |
-"fake2_stop_0 c7auto4" -> "c7auto4_stop_0 c7auto1" [ style = bold]
|
|
 |
9ccf84 |
"fake2_stop_0 c7auto4" -> "fake2_start_0 c7auto1" [ style = bold]
|
|
 |
9ccf84 |
"fake2_stop_0 c7auto4" [ style=bold color="green" fontcolor="orange"]
|
|
 |
9ccf84 |
"stonith 'reboot' c7auto4" -> "fake2_start_0 c7auto1" [ style = bold]
|
|
 |
9ccf84 |
diff --git a/pengine/test10/remote-fence-before-reconnect.exp b/pengine/test10/remote-fence-before-reconnect.exp
|
|
 |
9ccf84 |
index f99d9ef..f506f85 100644
|
|
 |
9ccf84 |
--- a/pengine/test10/remote-fence-before-reconnect.exp
|
|
 |
9ccf84 |
+++ b/pengine/test10/remote-fence-before-reconnect.exp
|
|
 |
9ccf84 |
@@ -9,11 +9,7 @@
|
|
 |
9ccf84 |
</downed>
|
|
 |
9ccf84 |
</rsc_op>
|
|
 |
9ccf84 |
</action_set>
|
|
 |
9ccf84 |
- <inputs>
|
|
 |
9ccf84 |
- <trigger>
|
|
 |
9ccf84 |
- <pseudo_event id="13" operation="stop" operation_key="fake2_stop_0"/>
|
|
 |
9ccf84 |
- </trigger>
|
|
 |
9ccf84 |
- </inputs>
|
|
 |
9ccf84 |
+ <inputs/>
|
|
 |
9ccf84 |
</synapse>
|
|
 |
9ccf84 |
<synapse id="1">
|
|
 |
9ccf84 |
<action_set>
|
|
 |
9ccf84 |
diff --git a/pengine/test10/remote-fence-before-reconnect.summary b/pengine/test10/remote-fence-before-reconnect.summary
|
|
 |
9ccf84 |
index f61e18b..03eac20 100644
|
|
 |
9ccf84 |
--- a/pengine/test10/remote-fence-before-reconnect.summary
|
|
 |
9ccf84 |
+++ b/pengine/test10/remote-fence-before-reconnect.summary
|
|
 |
9ccf84 |
@@ -17,9 +17,9 @@ Transition Summary:
|
|
 |
9ccf84 |
* Move fake2 ( c7auto4 -> c7auto1 )
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
Executing cluster transition:
|
|
 |
9ccf84 |
+ * Resource action: c7auto4 stop on c7auto1
|
|
 |
9ccf84 |
* Fencing c7auto4 (reboot)
|
|
 |
9ccf84 |
* Pseudo action: fake2_stop_0
|
|
 |
9ccf84 |
- * Resource action: c7auto4 stop on c7auto1
|
|
 |
9ccf84 |
* Resource action: fake2 start on c7auto1
|
|
 |
9ccf84 |
* Resource action: fake2 monitor=10000 on c7auto1
|
|
 |
9ccf84 |
|
|
 |
9ccf84 |
diff --git a/pengine/test10/remote-recover-all.dot b/pengine/test10/remote-recover-all.dot
|
|
 |
9ccf84 |
index 1f967c5..b48b04e 100644
|
|
 |
9ccf84 |
--- a/pengine/test10/remote-recover-all.dot
|
|
 |
9ccf84 |
+++ b/pengine/test10/remote-recover-all.dot
|
|
 |
9ccf84 |
@@ -19,7 +19,6 @@ digraph "g" {
|
|
 |
9ccf84 |
"galera_demote_0 galera-2" -> "galera_stop_0 galera-2" [ style = bold]
|
|
 |
9ccf84 |
"galera_demote_0 galera-2" [ style=bold color="green" fontcolor="orange"]
|
|
 |
9ccf84 |
"galera_monitor_10000 galera-0" [ style=bold color="green" fontcolor="black"]
|
|
 |
9ccf84 |
-"galera_stop_0 galera-2" -> "galera-2_stop_0 controller-1" [ style = bold]
|
|
 |
9ccf84 |
"galera_stop_0 galera-2" -> "galera-master_stopped_0" [ style = bold]
|
|
 |
9ccf84 |
"galera_stop_0 galera-2" [ style=bold color="green" fontcolor="orange"]
|
|
 |
9ccf84 |
"haproxy-clone_stop_0" -> "haproxy-clone_stopped_0" [ style = bold]
|
|
 |
9ccf84 |
@@ -60,7 +59,6 @@ digraph "g" {
|
|
 |
9ccf84 |
"rabbitmq_post_notify_stonith_0" -> "rabbitmq_post_notify_stonith_0 messaging-0" [ style = bold]
|
|
 |
9ccf84 |
"rabbitmq_post_notify_stonith_0" -> "rabbitmq_post_notify_stonith_0 messaging-2" [ style = bold]
|
|
 |
9ccf84 |
"rabbitmq_post_notify_stonith_0" [ style=bold color="green" fontcolor="orange"]
|
|
 |
9ccf84 |
-"rabbitmq_stop_0 messaging-1" -> "messaging-1_stop_0 controller-1" [ style = bold]
|
|
 |
9ccf84 |
"rabbitmq_stop_0 messaging-1" -> "rabbitmq-clone_stopped_0" [ style = bold]
|
|
 |
9ccf84 |
"rabbitmq_stop_0 messaging-1" [ style=bold color="green" fontcolor="orange"]
|
|
 |
9ccf84 |
"redis-master_confirmed-post_notify_stopped_0" [ style=bold color="green" fontcolor="orange"]
|
|
 |
9ccf84 |
diff --git a/pengine/test10/remote-recover-all.exp b/pengine/test10/remote-recover-all.exp
|
|
 |
9ccf84 |
index 900781c..e61ad6a 100644
|
|
 |
9ccf84 |
--- a/pengine/test10/remote-recover-all.exp
|
|
 |
9ccf84 |
+++ b/pengine/test10/remote-recover-all.exp
|
|
 |
9ccf84 |
@@ -9,9 +9,6 @@
|
|
 |
9ccf84 |
<trigger>
|
|
 |
9ccf84 |
<crm_event id="1" operation="stonith" operation_key="stonith-controller-1-reboot" on_node="controller-1" on_node_uuid="2"/>
|
|
 |
9ccf84 |
</trigger>
|
|
 |
9ccf84 |
- <trigger>
|
|
 |
9ccf84 |
- <pseudo_event id="39" operation="stop" operation_key="rabbitmq_stop_0" internal_operation_key="rabbitmq:2_stop_0"/>
|
|
 |
9ccf84 |
- </trigger>
|
|
 |
9ccf84 |
</inputs>
|
|
 |
9ccf84 |
</synapse>
|
|
 |
9ccf84 |
<synapse id="1">
|
|
 |
9ccf84 |
@@ -64,9 +61,6 @@
|
|
 |
9ccf84 |
<trigger>
|
|
 |
9ccf84 |
<crm_event id="1" operation="stonith" operation_key="stonith-controller-1-reboot" on_node="controller-1" on_node_uuid="2"/>
|
|
 |
9ccf84 |
</trigger>
|
|
 |
9ccf84 |
- <trigger>
|
|
 |
9ccf84 |
- <pseudo_event id="49" operation="stop" operation_key="galera_stop_0" internal_operation_key="galera:1_stop_0"/>
|
|
 |
9ccf84 |
- </trigger>
|
|
 |
9ccf84 |
</inputs>
|
|
 |
9ccf84 |
</synapse>
|
|
 |
9ccf84 |
<synapse id="5" priority="1000000">
|
|
 |
9ccf84 |
diff --git a/pengine/test10/remote-recover-all.summary b/pengine/test10/remote-recover-all.summary
|
|
 |
9ccf84 |
index 865f39a..cfeac3a 100644
|
|
 |
9ccf84 |
--- a/pengine/test10/remote-recover-all.summary
|
|
 |
9ccf84 |
+++ b/pengine/test10/remote-recover-all.summary
|
|
 |
9ccf84 |
@@ -63,6 +63,8 @@ Executing cluster transition:
|
|
 |
9ccf84 |
* Resource action: stonith-fence_ipmilan-525400b4f6bd stop on controller-0
|
|
 |
9ccf84 |
* Pseudo action: stonith-fence_ipmilan-5254005bdbb5_stop_0
|
|
 |
9ccf84 |
* Fencing controller-1 (reboot)
|
|
 |
9ccf84 |
+ * Pseudo action: messaging-1_stop_0
|
|
 |
9ccf84 |
+ * Pseudo action: galera-2_stop_0
|
|
 |
9ccf84 |
* Pseudo action: redis_post_notify_stop_0
|
|
 |
9ccf84 |
* Resource action: redis notify on controller-0
|
|
 |
9ccf84 |
* Resource action: redis notify on controller-2
|
|
 |
9ccf84 |
@@ -94,7 +96,6 @@ Executing cluster transition:
|
|
 |
9ccf84 |
* Resource action: stonith-fence_ipmilan-525400b4f6bd monitor=60000 on controller-0
|
|
 |
9ccf84 |
* Resource action: stonith-fence_ipmilan-5254005bdbb5 start on controller-2
|
|
 |
9ccf84 |
* Resource action: galera-0 monitor=20000 on controller-2
|
|
 |
9ccf84 |
- * Pseudo action: galera-2_stop_0
|
|
 |
9ccf84 |
* Resource action: rabbitmq notify on messaging-2
|
|
 |
9ccf84 |
* Resource action: rabbitmq notify on messaging-0
|
|
 |
9ccf84 |
* Pseudo action: rabbitmq_notified_0
|
|
 |
9ccf84 |
@@ -107,7 +108,6 @@ Executing cluster transition:
|
|
 |
9ccf84 |
* Resource action: ip-172.17.1.17 start on controller-2
|
|
 |
9ccf84 |
* Resource action: ip-172.17.4.11 start on controller-2
|
|
 |
9ccf84 |
* Resource action: stonith-fence_ipmilan-5254005bdbb5 monitor=60000 on controller-2
|
|
 |
9ccf84 |
- * Pseudo action: messaging-1_stop_0
|
|
 |
9ccf84 |
* Pseudo action: redis_notified_0
|
|
 |
9ccf84 |
* Resource action: ip-172.17.1.14 monitor=10000 on controller-2
|
|
 |
9ccf84 |
* Resource action: ip-172.17.1.17 monitor=10000 on controller-2
|
|
 |
9ccf84 |
diff --git a/pengine/test10/remote-recover-no-resources.dot b/pengine/test10/remote-recover-no-resources.dot
|
|
 |
9ccf84 |
index a46c305..a0b1ecc 100644
|
|
 |
9ccf84 |
--- a/pengine/test10/remote-recover-no-resources.dot
|
|
 |
9ccf84 |
+++ b/pengine/test10/remote-recover-no-resources.dot
|
|
 |
9ccf84 |
@@ -45,7 +45,6 @@ digraph "g" {
|
|
 |
9ccf84 |
"rabbitmq_post_notify_stonith_0" -> "rabbitmq_post_notify_stonith_0 messaging-0" [ style = bold]
|
|
 |
9ccf84 |
"rabbitmq_post_notify_stonith_0" -> "rabbitmq_post_notify_stonith_0 messaging-2" [ style = bold]
|
|
 |
9ccf84 |
"rabbitmq_post_notify_stonith_0" [ style=bold color="green" fontcolor="orange"]
|
|
 |
9ccf84 |
-"rabbitmq_stop_0 messaging-1" -> "messaging-1_stop_0 controller-1" [ style = bold]
|
|
 |
9ccf84 |
"rabbitmq_stop_0 messaging-1" -> "rabbitmq-clone_stopped_0" [ style = bold]
|
|
 |
9ccf84 |
"rabbitmq_stop_0 messaging-1" [ style=bold color="green" fontcolor="orange"]
|
|
 |
9ccf84 |
"redis-master_confirmed-post_notify_stopped_0" [ style=bold color="green" fontcolor="orange"]
|
|
 |
9ccf84 |
diff --git a/pengine/test10/remote-recover-no-resources.exp b/pengine/test10/remote-recover-no-resources.exp
|
|
 |
9ccf84 |
index 4d82aa4..27f18b5 100644
|
|
 |
9ccf84 |
--- a/pengine/test10/remote-recover-no-resources.exp
|
|
 |
9ccf84 |
+++ b/pengine/test10/remote-recover-no-resources.exp
|
|
 |
9ccf84 |
@@ -9,9 +9,6 @@
|
|
 |
9ccf84 |
<trigger>
|
|
 |
9ccf84 |
<crm_event id="1" operation="stonith" operation_key="stonith-controller-1-reboot" on_node="controller-1" on_node_uuid="2"/>
|
|
 |
9ccf84 |
</trigger>
|
|
 |
9ccf84 |
- <trigger>
|
|
 |
9ccf84 |
- <pseudo_event id="38" operation="stop" operation_key="rabbitmq_stop_0" internal_operation_key="rabbitmq:2_stop_0"/>
|
|
 |
9ccf84 |
- </trigger>
|
|
 |
9ccf84 |
</inputs>
|
|
 |
9ccf84 |
</synapse>
|
|
 |
9ccf84 |
<synapse id="1">
|
|
 |
9ccf84 |
diff --git a/pengine/test10/remote-recover-no-resources.summary b/pengine/test10/remote-recover-no-resources.summary
|
|
 |
9ccf84 |
index 9527161..c01eb87 100644
|
|
 |
9ccf84 |
--- a/pengine/test10/remote-recover-no-resources.summary
|
|
 |
9ccf84 |
+++ b/pengine/test10/remote-recover-no-resources.summary
|
|
 |
9ccf84 |
@@ -60,6 +60,7 @@ Executing cluster transition:
|
|
 |
9ccf84 |
* Resource action: stonith-fence_ipmilan-525400b4f6bd stop on controller-0
|
|
 |
9ccf84 |
* Pseudo action: stonith-fence_ipmilan-5254005bdbb5_stop_0
|
|
 |
9ccf84 |
* Fencing controller-1 (reboot)
|
|
 |
9ccf84 |
+ * Pseudo action: messaging-1_stop_0
|
|
 |
9ccf84 |
* Pseudo action: galera-2_stop_0
|
|
 |
9ccf84 |
* Pseudo action: redis_post_notify_stop_0
|
|
 |
9ccf84 |
* Resource action: redis notify on controller-0
|
|
 |
9ccf84 |
@@ -92,7 +93,6 @@ Executing cluster transition:
|
|
 |
9ccf84 |
* Pseudo action: ip-172.17.1.17_stop_0
|
|
 |
9ccf84 |
* Pseudo action: ip-172.17.4.11_stop_0
|
|
 |
9ccf84 |
* Resource action: stonith-fence_ipmilan-5254005bdbb5 monitor=60000 on controller-2
|
|
 |
9ccf84 |
- * Pseudo action: messaging-1_stop_0
|
|
 |
9ccf84 |
* Resource action: redis notify on controller-0
|
|
 |
9ccf84 |
* Resource action: redis notify on controller-2
|
|
 |
9ccf84 |
* Pseudo action: redis-master_confirmed-post_notify_stopped_0
|
|
 |
9ccf84 |
diff --git a/pengine/test10/remote-recover-unknown.dot b/pengine/test10/remote-recover-unknown.dot
|
|
 |
9ccf84 |
index a883eb4..1d13e50 100644
|
|
 |
9ccf84 |
--- a/pengine/test10/remote-recover-unknown.dot
|
|
 |
9ccf84 |
+++ b/pengine/test10/remote-recover-unknown.dot
|
|
 |
9ccf84 |
@@ -46,7 +46,6 @@ digraph "g" {
|
|
 |
9ccf84 |
"rabbitmq_post_notify_stonith_0" -> "rabbitmq_post_notify_stonith_0 messaging-0" [ style = bold]
|
|
 |
9ccf84 |
"rabbitmq_post_notify_stonith_0" -> "rabbitmq_post_notify_stonith_0 messaging-2" [ style = bold]
|
|
 |
9ccf84 |
"rabbitmq_post_notify_stonith_0" [ style=bold color="green" fontcolor="orange"]
|
|
 |
9ccf84 |
-"rabbitmq_stop_0 messaging-1" -> "messaging-1_stop_0 controller-1" [ style = bold]
|
|
 |
9ccf84 |
"rabbitmq_stop_0 messaging-1" -> "rabbitmq-clone_stopped_0" [ style = bold]
|
|
 |
9ccf84 |
"rabbitmq_stop_0 messaging-1" [ style=bold color="green" fontcolor="orange"]
|
|
 |
9ccf84 |
"redis-master_confirmed-post_notify_stopped_0" [ style=bold color="green" fontcolor="orange"]
|
|
 |
9ccf84 |
diff --git a/pengine/test10/remote-recover-unknown.exp b/pengine/test10/remote-recover-unknown.exp
|
|
 |
9ccf84 |
index 65677b4..13bd295 100644
|
|
 |
9ccf84 |
--- a/pengine/test10/remote-recover-unknown.exp
|
|
 |
9ccf84 |
+++ b/pengine/test10/remote-recover-unknown.exp
|
|
 |
9ccf84 |
@@ -9,9 +9,6 @@
|
|
 |
9ccf84 |
<trigger>
|
|
 |
9ccf84 |
<crm_event id="1" operation="stonith" operation_key="stonith-controller-1-reboot" on_node="controller-1" on_node_uuid="2"/>
|
|
 |
9ccf84 |
</trigger>
|
|
 |
9ccf84 |
- <trigger>
|
|
 |
9ccf84 |
- <pseudo_event id="39" operation="stop" operation_key="rabbitmq_stop_0" internal_operation_key="rabbitmq:2_stop_0"/>
|
|
 |
9ccf84 |
- </trigger>
|
|
 |
9ccf84 |
</inputs>
|
|
 |
9ccf84 |
</synapse>
|
|
 |
9ccf84 |
<synapse id="1">
|
|
 |
9ccf84 |
diff --git a/pengine/test10/remote-recover-unknown.summary b/pengine/test10/remote-recover-unknown.summary
|
|
 |
9ccf84 |
index 78a60d0..64f37cb 100644
|
|
 |
9ccf84 |
--- a/pengine/test10/remote-recover-unknown.summary
|
|
 |
9ccf84 |
+++ b/pengine/test10/remote-recover-unknown.summary
|
|
 |
9ccf84 |
@@ -61,6 +61,7 @@ Executing cluster transition:
|
|
 |
9ccf84 |
* Resource action: stonith-fence_ipmilan-525400b4f6bd stop on controller-0
|
|
 |
9ccf84 |
* Pseudo action: stonith-fence_ipmilan-5254005bdbb5_stop_0
|
|
 |
9ccf84 |
* Fencing controller-1 (reboot)
|
|
 |
9ccf84 |
+ * Pseudo action: messaging-1_stop_0
|
|
 |
9ccf84 |
* Pseudo action: galera-2_stop_0
|
|
 |
9ccf84 |
* Pseudo action: redis_post_notify_stop_0
|
|
 |
9ccf84 |
* Resource action: redis notify on controller-0
|
|
 |
9ccf84 |
@@ -94,7 +95,6 @@ Executing cluster transition:
|
|
 |
9ccf84 |
* Pseudo action: ip-172.17.1.17_stop_0
|
|
 |
9ccf84 |
* Pseudo action: ip-172.17.4.11_stop_0
|
|
 |
9ccf84 |
* Resource action: stonith-fence_ipmilan-5254005bdbb5 monitor=60000 on controller-2
|
|
 |
9ccf84 |
- * Pseudo action: messaging-1_stop_0
|
|
 |
9ccf84 |
* Resource action: redis notify on controller-0
|
|
 |
9ccf84 |
* Resource action: redis notify on controller-2
|
|
 |
9ccf84 |
* Pseudo action: redis-master_confirmed-post_notify_stopped_0
|
|
 |
9ccf84 |
--
|
|
 |
9ccf84 |
1.8.3.1
|
|
 |
9ccf84 |
|