diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:46:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:46:09 +0000 |
commit | 043aa641ad4373e96fd748deb1e7fab3cb579a07 (patch) | |
tree | f8fde8a97ab5db152043f6c01043672114c0a4df /lib/pengine/pe_notif.c | |
parent | Releasing progress-linux version 2.1.6-5~progress7.99u1. (diff) | |
download | pacemaker-043aa641ad4373e96fd748deb1e7fab3cb579a07.tar.xz pacemaker-043aa641ad4373e96fd748deb1e7fab3cb579a07.zip |
Merging upstream version 2.1.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | lib/pengine/pe_notif.c | 226 |
1 files changed, 119 insertions, 107 deletions
diff --git a/lib/pengine/pe_notif.c b/lib/pengine/pe_notif.c index 7ed490f..0e1e239 100644 --- a/lib/pengine/pe_notif.c +++ b/lib/pengine/pe_notif.c @@ -9,13 +9,15 @@ #include <crm_internal.h> #include <crm/msg_xml.h> + +#include <crm/pengine/internal.h> #include <pacemaker-internal.h> #include "pe_status_private.h" typedef struct notify_entry_s { - const pe_resource_t *rsc; - const pe_node_t *node; + const pcmk_resource_t *rsc; + const pcmk_node_t *node; } notify_entry_t; /*! @@ -105,7 +107,7 @@ dup_notify_entry(const notify_entry_t *entry) * \internal * \brief Given a list of nodes, create strings with node names * - * \param[in] list List of nodes (as pe_node_t *) + * \param[in] list List of nodes (as pcmk_node_t *) * \param[out] all_node_names If not NULL, will be set to space-separated list * of the names of all nodes in \p list * \param[out] host_node_names Same as \p all_node_names, except active @@ -126,7 +128,7 @@ get_node_names(const GList *list, GString **all_node_names, } for (const GList *iter = list; iter != NULL; iter = iter->next) { - const pe_node_t *node = (const pe_node_t *) iter->data; + const pcmk_node_t *node = (const pcmk_node_t *) iter->data; if (node->details->uname == NULL) { continue; @@ -242,7 +244,7 @@ notify_entries_to_strings(GList *list, GString **rsc_names, static void copy_meta_to_notify(gpointer key, gpointer value, gpointer user_data) { - pe_action_t *notify = (pe_action_t *) user_data; + pcmk_action_t *notify = (pcmk_action_t *) user_data; /* Any existing meta-attributes (for example, the action timeout) are for * the notify action itself, so don't override those. @@ -256,7 +258,8 @@ copy_meta_to_notify(gpointer key, gpointer value, gpointer user_data) } static void -add_notify_data_to_action_meta(const notify_data_t *n_data, pe_action_t *action) +add_notify_data_to_action_meta(const notify_data_t *n_data, + pcmk_action_t *action) { for (const GSList *item = n_data->keys; item; item = item->next) { const pcmk_nvpair_t *nvpair = (const pcmk_nvpair_t *) item->data; @@ -271,23 +274,23 @@ add_notify_data_to_action_meta(const notify_data_t *n_data, pe_action_t *action) * * \param[in,out] rsc Clone resource that notification is for * \param[in] action Action to use in notify action key - * \param[in] notif_action RSC_NOTIFY or RSC_NOTIFIED + * \param[in] notif_action PCMK_ACTION_NOTIFY or PCMK_ACTION_NOTIFIED * \param[in] notif_type "pre", "post", "confirmed-pre", "confirmed-post" * * \return Newly created notify pseudo-action */ -static pe_action_t * -new_notify_pseudo_action(pe_resource_t *rsc, const pe_action_t *action, +static pcmk_action_t * +new_notify_pseudo_action(pcmk_resource_t *rsc, const pcmk_action_t *action, const char *notif_action, const char *notif_type) { - pe_action_t *notify = NULL; + pcmk_action_t *notify = NULL; notify = custom_action(rsc, pcmk__notify_key(rsc->id, notif_type, action->task), notif_action, NULL, - pcmk_is_set(action->flags, pe_action_optional), - TRUE, rsc->cluster); - pe__set_action_flags(notify, pe_action_pseudo); + pcmk_is_set(action->flags, pcmk_action_optional), + rsc->cluster); + pe__set_action_flags(notify, pcmk_action_pseudo); add_hash_param(notify->meta, "notify_key_type", notif_type); add_hash_param(notify->meta, "notify_key_operation", action->task); return notify; @@ -305,12 +308,13 @@ new_notify_pseudo_action(pe_resource_t *rsc, const pe_action_t *action, * * \return Newly created notify action */ -static pe_action_t * -new_notify_action(pe_resource_t *rsc, const pe_node_t *node, pe_action_t *op, - pe_action_t *notify_done, const notify_data_t *n_data) +static pcmk_action_t * +new_notify_action(pcmk_resource_t *rsc, const pcmk_node_t *node, + pcmk_action_t *op, pcmk_action_t *notify_done, + const notify_data_t *n_data) { char *key = NULL; - pe_action_t *notify_action = NULL; + pcmk_action_t *notify_action = NULL; const char *value = NULL; const char *task = NULL; const char *skip_reason = NULL; @@ -324,7 +328,7 @@ new_notify_action(pe_resource_t *rsc, const pe_node_t *node, pe_action_t *op, skip_reason = "no parent notification"; } else if (!node->details->online) { skip_reason = "node offline"; - } else if (!pcmk_is_set(op->flags, pe_action_runnable)) { + } else if (!pcmk_is_set(op->flags, pcmk_action_runnable)) { skip_reason = "original action not runnable"; } if (skip_reason != NULL) { @@ -342,16 +346,16 @@ new_notify_action(pe_resource_t *rsc, const pe_node_t *node, pe_action_t *op, // Create the notify action key = pcmk__notify_key(rsc->id, value, task); notify_action = custom_action(rsc, key, op->task, node, - pcmk_is_set(op->flags, pe_action_optional), - TRUE, rsc->cluster); + pcmk_is_set(op->flags, pcmk_action_optional), + rsc->cluster); // Add meta-data to notify action g_hash_table_foreach(op->meta, copy_meta_to_notify, notify_action); add_notify_data_to_action_meta(n_data, notify_action); // Order notify after original action and before parent notification - order_actions(op, notify_action, pe_order_optional); - order_actions(notify_action, notify_done, pe_order_optional); + order_actions(op, notify_action, pcmk__ar_ordered); + order_actions(notify_action, notify_done, pcmk__ar_ordered); return notify_action; } @@ -364,10 +368,10 @@ new_notify_action(pe_resource_t *rsc, const pe_node_t *node, pe_action_t *op, * \param[in,out] n_data Notification values to add to action meta-data */ static void -new_post_notify_action(pe_resource_t *rsc, const pe_node_t *node, +new_post_notify_action(pcmk_resource_t *rsc, const pcmk_node_t *node, notify_data_t *n_data) { - pe_action_t *notify = NULL; + pcmk_action_t *notify = NULL; CRM_ASSERT(n_data != NULL); @@ -383,16 +387,16 @@ new_post_notify_action(pe_resource_t *rsc, const pe_node_t *node, return; } for (GList *iter = rsc->actions; iter != NULL; iter = iter->next) { - pe_action_t *mon = (pe_action_t *) iter->data; + pcmk_action_t *mon = (pcmk_action_t *) iter->data; const char *interval_ms_s = NULL; interval_ms_s = g_hash_table_lookup(mon->meta, XML_LRM_ATTR_INTERVAL_MS); if (pcmk__str_eq(interval_ms_s, "0", pcmk__str_null_matches) - || pcmk__str_eq(mon->task, RSC_CANCEL, pcmk__str_none)) { + || pcmk__str_eq(mon->task, PCMK_ACTION_CANCEL, pcmk__str_none)) { continue; // Not a recurring monitor } - order_actions(n_data->post_done, mon, pe_order_optional); + order_actions(n_data->post_done, mon, pcmk__ar_ordered); } } @@ -428,12 +432,12 @@ new_post_notify_action(pe_resource_t *rsc, const pe_node_t *node, * \return Newly created notification data */ notify_data_t * -pe__action_notif_pseudo_ops(pe_resource_t *rsc, const char *task, - pe_action_t *action, pe_action_t *complete) +pe__action_notif_pseudo_ops(pcmk_resource_t *rsc, const char *task, + pcmk_action_t *action, pcmk_action_t *complete) { notify_data_t *n_data = NULL; - if (!pcmk_is_set(rsc->flags, pe_rsc_notify)) { + if (!pcmk_is_set(rsc->flags, pcmk_rsc_notify)) { return NULL; } @@ -445,60 +449,63 @@ pe__action_notif_pseudo_ops(pe_resource_t *rsc, const char *task, if (action != NULL) { // Need "pre-" pseudo-actions // Create "pre-" notify pseudo-action for clone - n_data->pre = new_notify_pseudo_action(rsc, action, RSC_NOTIFY, "pre"); - pe__set_action_flags(n_data->pre, pe_action_runnable); + n_data->pre = new_notify_pseudo_action(rsc, action, PCMK_ACTION_NOTIFY, + "pre"); + pe__set_action_flags(n_data->pre, pcmk_action_runnable); add_hash_param(n_data->pre->meta, "notify_type", "pre"); add_hash_param(n_data->pre->meta, "notify_operation", n_data->action); // Create "pre-" notifications complete pseudo-action for clone - n_data->pre_done = new_notify_pseudo_action(rsc, action, RSC_NOTIFIED, + n_data->pre_done = new_notify_pseudo_action(rsc, action, + PCMK_ACTION_NOTIFIED, "confirmed-pre"); - pe__set_action_flags(n_data->pre_done, pe_action_runnable); + pe__set_action_flags(n_data->pre_done, pcmk_action_runnable); add_hash_param(n_data->pre_done->meta, "notify_type", "pre"); add_hash_param(n_data->pre_done->meta, "notify_operation", n_data->action); // Order "pre-" -> "pre-" complete -> original action - order_actions(n_data->pre, n_data->pre_done, pe_order_optional); - order_actions(n_data->pre_done, action, pe_order_optional); + order_actions(n_data->pre, n_data->pre_done, pcmk__ar_ordered); + order_actions(n_data->pre_done, action, pcmk__ar_ordered); } if (complete != NULL) { // Need "post-" pseudo-actions // Create "post-" notify pseudo-action for clone - n_data->post = new_notify_pseudo_action(rsc, complete, RSC_NOTIFY, - "post"); + n_data->post = new_notify_pseudo_action(rsc, complete, + PCMK_ACTION_NOTIFY, "post"); n_data->post->priority = INFINITY; - if (pcmk_is_set(complete->flags, pe_action_runnable)) { - pe__set_action_flags(n_data->post, pe_action_runnable); + if (pcmk_is_set(complete->flags, pcmk_action_runnable)) { + pe__set_action_flags(n_data->post, pcmk_action_runnable); } else { - pe__clear_action_flags(n_data->post, pe_action_runnable); + pe__clear_action_flags(n_data->post, pcmk_action_runnable); } add_hash_param(n_data->post->meta, "notify_type", "post"); add_hash_param(n_data->post->meta, "notify_operation", n_data->action); // Create "post-" notifications complete pseudo-action for clone n_data->post_done = new_notify_pseudo_action(rsc, complete, - RSC_NOTIFIED, + PCMK_ACTION_NOTIFIED, "confirmed-post"); n_data->post_done->priority = INFINITY; - if (pcmk_is_set(complete->flags, pe_action_runnable)) { - pe__set_action_flags(n_data->post_done, pe_action_runnable); + if (pcmk_is_set(complete->flags, pcmk_action_runnable)) { + pe__set_action_flags(n_data->post_done, pcmk_action_runnable); } else { - pe__clear_action_flags(n_data->post_done, pe_action_runnable); + pe__clear_action_flags(n_data->post_done, pcmk_action_runnable); } add_hash_param(n_data->post_done->meta, "notify_type", "post"); add_hash_param(n_data->post_done->meta, "notify_operation", n_data->action); // Order original action complete -> "post-" -> "post-" complete - order_actions(complete, n_data->post, pe_order_implies_then); - order_actions(n_data->post, n_data->post_done, pe_order_implies_then); + order_actions(complete, n_data->post, pcmk__ar_first_implies_then); + order_actions(n_data->post, n_data->post_done, + pcmk__ar_first_implies_then); } // If we created both, order "pre-" complete -> "post-" if ((action != NULL) && (complete != NULL)) { - order_actions(n_data->pre_done, n_data->post, pe_order_optional); + order_actions(n_data->pre_done, n_data->post, pcmk__ar_ordered); } return n_data; } @@ -514,7 +521,7 @@ pe__action_notif_pseudo_ops(pe_resource_t *rsc, const char *task, * \note The caller is responsible for freeing the return value. */ static notify_entry_t * -new_notify_entry(const pe_resource_t *rsc, const pe_node_t *node) +new_notify_entry(const pcmk_resource_t *rsc, const pcmk_node_t *node) { notify_entry_t *entry = calloc(1, sizeof(notify_entry_t)); @@ -533,12 +540,12 @@ new_notify_entry(const pe_resource_t *rsc, const pe_node_t *node) * \param[in,out] n_data Notification data for clone */ static void -collect_resource_data(const pe_resource_t *rsc, bool activity, +collect_resource_data(const pcmk_resource_t *rsc, bool activity, notify_data_t *n_data) { const GList *iter = NULL; notify_entry_t *entry = NULL; - const pe_node_t *node = NULL; + const pcmk_node_t *node = NULL; if (n_data == NULL) { return; @@ -551,7 +558,7 @@ collect_resource_data(const pe_resource_t *rsc, bool activity, // If this is a clone, call recursively for each instance if (rsc->children != NULL) { for (iter = rsc->children; iter != NULL; iter = iter->next) { - const pe_resource_t *child = (const pe_resource_t *) iter->data; + const pcmk_resource_t *child = (const pcmk_resource_t *) iter->data; collect_resource_data(child, activity, n_data); } @@ -567,21 +574,21 @@ collect_resource_data(const pe_resource_t *rsc, bool activity, // Add notification indicating the resource state switch (rsc->role) { - case RSC_ROLE_STOPPED: + case pcmk_role_stopped: n_data->inactive = g_list_prepend(n_data->inactive, entry); break; - case RSC_ROLE_STARTED: + case pcmk_role_started: n_data->active = g_list_prepend(n_data->active, entry); break; - case RSC_ROLE_UNPROMOTED: + case pcmk_role_unpromoted: n_data->unpromoted = g_list_prepend(n_data->unpromoted, entry); n_data->active = g_list_prepend(n_data->active, dup_notify_entry(entry)); break; - case RSC_ROLE_PROMOTED: + case pcmk_role_promoted: n_data->promoted = g_list_prepend(n_data->promoted, entry); n_data->active = g_list_prepend(n_data->active, dup_notify_entry(entry)); @@ -601,30 +608,31 @@ collect_resource_data(const pe_resource_t *rsc, bool activity, // Add notification entries for each of the resource's actions for (iter = rsc->actions; iter != NULL; iter = iter->next) { - const pe_action_t *op = (const pe_action_t *) iter->data; + const pcmk_action_t *op = (const pcmk_action_t *) iter->data; - if (!pcmk_is_set(op->flags, pe_action_optional) && (op->node != NULL)) { + if (!pcmk_is_set(op->flags, pcmk_action_optional) + && (op->node != NULL)) { enum action_tasks task = text2task(op->task); - if ((task == stop_rsc) && op->node->details->unclean) { + if ((task == pcmk_action_stop) && op->node->details->unclean) { // Create anyway (additional noise if node can't be fenced) - } else if (!pcmk_is_set(op->flags, pe_action_runnable)) { + } else if (!pcmk_is_set(op->flags, pcmk_action_runnable)) { continue; } entry = new_notify_entry(rsc, op->node); switch (task) { - case start_rsc: + case pcmk_action_start: n_data->start = g_list_prepend(n_data->start, entry); break; - case stop_rsc: + case pcmk_action_stop: n_data->stop = g_list_prepend(n_data->stop, entry); break; - case action_promote: + case pcmk_action_promote: n_data->promote = g_list_prepend(n_data->promote, entry); break; - case action_demote: + case pcmk_action_demote: n_data->demote = g_list_prepend(n_data->demote, entry); break; default: @@ -661,7 +669,7 @@ collect_resource_data(const pe_resource_t *rsc, bool activity, * \param[in,out] n_data Notification data */ static void -add_notif_keys(const pe_resource_t *rsc, notify_data_t *n_data) +add_notif_keys(const pcmk_resource_t *rsc, notify_data_t *n_data) { bool required = false; // Whether to make notify actions required GString *rsc_list = NULL; @@ -673,14 +681,14 @@ add_notif_keys(const pe_resource_t *rsc, notify_data_t *n_data) n_data->stop = notify_entries_to_strings(n_data->stop, &rsc_list, &node_list); if ((strcmp(" ", (const char *) rsc_list->str) != 0) - && pcmk__str_eq(n_data->action, RSC_STOP, pcmk__str_none)) { + && pcmk__str_eq(n_data->action, PCMK_ACTION_STOP, pcmk__str_none)) { required = true; } add_notify_env_free_gs(n_data, "notify_stop_resource", rsc_list); add_notify_env_free_gs(n_data, "notify_stop_uname", node_list); if ((n_data->start != NULL) - && pcmk__str_eq(n_data->action, RSC_START, pcmk__str_none)) { + && pcmk__str_eq(n_data->action, PCMK_ACTION_START, pcmk__str_none)) { required = true; } n_data->start = notify_entries_to_strings(n_data->start, @@ -689,7 +697,7 @@ add_notif_keys(const pe_resource_t *rsc, notify_data_t *n_data) add_notify_env_free_gs(n_data, "notify_start_uname", node_list); if ((n_data->demote != NULL) - && pcmk__str_eq(n_data->action, RSC_DEMOTE, pcmk__str_none)) { + && pcmk__str_eq(n_data->action, PCMK_ACTION_DEMOTE, pcmk__str_none)) { required = true; } n_data->demote = notify_entries_to_strings(n_data->demote, @@ -698,7 +706,7 @@ add_notif_keys(const pe_resource_t *rsc, notify_data_t *n_data) add_notify_env_free_gs(n_data, "notify_demote_uname", node_list); if ((n_data->promote != NULL) - && pcmk__str_eq(n_data->action, RSC_PROMOTE, pcmk__str_none)) { + && pcmk__str_eq(n_data->action, PCMK_ACTION_PROMOTE, pcmk__str_none)) { required = true; } n_data->promote = notify_entries_to_strings(n_data->promote, @@ -755,13 +763,13 @@ add_notif_keys(const pe_resource_t *rsc, notify_data_t *n_data) add_notify_env_free_gs(n_data, "notify_all_uname", node_list); if (required && (n_data->pre != NULL)) { - pe__clear_action_flags(n_data->pre, pe_action_optional); - pe__clear_action_flags(n_data->pre_done, pe_action_optional); + pe__clear_action_flags(n_data->pre, pcmk_action_optional); + pe__clear_action_flags(n_data->pre_done, pcmk_action_optional); } if (required && (n_data->post != NULL)) { - pe__clear_action_flags(n_data->post, pe_action_optional); - pe__clear_action_flags(n_data->post_done, pe_action_optional); + pe__clear_action_flags(n_data->post, pcmk_action_optional); + pe__clear_action_flags(n_data->post_done, pcmk_action_optional); } } @@ -773,14 +781,15 @@ add_notif_keys(const pe_resource_t *rsc, notify_data_t *n_data) * * \return If action is behind a remote connection, connection's start */ -static pe_action_t * -find_remote_start(pe_action_t *action) +static pcmk_action_t * +find_remote_start(pcmk_action_t *action) { if ((action != NULL) && (action->node != NULL)) { - pe_resource_t *remote_rsc = action->node->details->remote_rsc; + pcmk_resource_t *remote_rsc = action->node->details->remote_rsc; if (remote_rsc != NULL) { - return find_first_action(remote_rsc->actions, NULL, RSC_START, + return find_first_action(remote_rsc->actions, NULL, + PCMK_ACTION_START, NULL); } } @@ -795,11 +804,11 @@ find_remote_start(pe_action_t *action) * \param[in,out] n_data Clone notification data for some action */ static void -create_notify_actions(pe_resource_t *rsc, notify_data_t *n_data) +create_notify_actions(pcmk_resource_t *rsc, notify_data_t *n_data) { GList *iter = NULL; - pe_action_t *stop = NULL; - pe_action_t *start = NULL; + pcmk_action_t *stop = NULL; + pcmk_action_t *start = NULL; enum action_tasks task = text2task(n_data->action); // If this is a clone, call recursively for each instance @@ -810,14 +819,15 @@ create_notify_actions(pe_resource_t *rsc, notify_data_t *n_data) // Add notification meta-attributes to original actions for (iter = rsc->actions; iter != NULL; iter = iter->next) { - pe_action_t *op = (pe_action_t *) iter->data; + pcmk_action_t *op = (pcmk_action_t *) iter->data; - if (!pcmk_is_set(op->flags, pe_action_optional) && (op->node != NULL)) { + if (!pcmk_is_set(op->flags, pcmk_action_optional) + && (op->node != NULL)) { switch (text2task(op->task)) { - case start_rsc: - case stop_rsc: - case action_promote: - case action_demote: + case pcmk_action_start: + case pcmk_action_stop: + case pcmk_action_promote: + case pcmk_action_demote: add_notify_data_to_action_meta(n_data, op); break; default: @@ -828,7 +838,7 @@ create_notify_actions(pe_resource_t *rsc, notify_data_t *n_data) // Skip notify action itself if original action was not needed switch (task) { - case start_rsc: + case pcmk_action_start: if (n_data->start == NULL) { pe_rsc_trace(rsc, "No notify action needed for %s %s", rsc->id, n_data->action); @@ -836,7 +846,7 @@ create_notify_actions(pe_resource_t *rsc, notify_data_t *n_data) } break; - case action_promote: + case pcmk_action_promote: if (n_data->promote == NULL) { pe_rsc_trace(rsc, "No notify action needed for %s %s", rsc->id, n_data->action); @@ -844,7 +854,7 @@ create_notify_actions(pe_resource_t *rsc, notify_data_t *n_data) } break; - case action_demote: + case pcmk_action_demote: if (n_data->demote == NULL) { pe_rsc_trace(rsc, "No notify action needed for %s %s", rsc->id, n_data->action); @@ -861,18 +871,19 @@ create_notify_actions(pe_resource_t *rsc, notify_data_t *n_data) rsc->id, n_data->action); // Create notify actions for stop or demote - if ((rsc->role != RSC_ROLE_STOPPED) - && ((task == stop_rsc) || (task == action_demote))) { + if ((rsc->role != pcmk_role_stopped) + && ((task == pcmk_action_stop) || (task == pcmk_action_demote))) { - stop = find_first_action(rsc->actions, NULL, RSC_STOP, NULL); + stop = find_first_action(rsc->actions, NULL, PCMK_ACTION_STOP, NULL); for (iter = rsc->running_on; iter != NULL; iter = iter->next) { - pe_node_t *current_node = (pe_node_t *) iter->data; + pcmk_node_t *current_node = (pcmk_node_t *) iter->data; /* If a stop is a pseudo-action implied by fencing, don't try to * notify the node getting fenced. */ - if ((stop != NULL) && pcmk_is_set(stop->flags, pe_action_pseudo) + if ((stop != NULL) + && pcmk_is_set(stop->flags, pcmk_action_pseudo) && (current_node->details->unclean || current_node->details->remote_requires_reset)) { continue; @@ -881,23 +892,23 @@ create_notify_actions(pe_resource_t *rsc, notify_data_t *n_data) new_notify_action(rsc, current_node, n_data->pre, n_data->pre_done, n_data); - if ((task == action_demote) || (stop == NULL) - || pcmk_is_set(stop->flags, pe_action_optional)) { + if ((task == pcmk_action_demote) || (stop == NULL) + || pcmk_is_set(stop->flags, pcmk_action_optional)) { new_post_notify_action(rsc, current_node, n_data); } } } // Create notify actions for start or promote - if ((rsc->next_role != RSC_ROLE_STOPPED) - && ((task == start_rsc) || (task == action_promote))) { + if ((rsc->next_role != pcmk_role_stopped) + && ((task == pcmk_action_start) || (task == pcmk_action_promote))) { - start = find_first_action(rsc->actions, NULL, RSC_START, NULL); + start = find_first_action(rsc->actions, NULL, PCMK_ACTION_START, NULL); if (start != NULL) { - pe_action_t *remote_start = find_remote_start(start); + pcmk_action_t *remote_start = find_remote_start(start); if ((remote_start != NULL) - && !pcmk_is_set(remote_start->flags, pe_action_runnable)) { + && !pcmk_is_set(remote_start->flags, pcmk_action_runnable)) { /* Start and promote actions for a clone instance behind * a Pacemaker Remote connection happen after the * connection starts. If the connection start is blocked, do @@ -911,8 +922,8 @@ create_notify_actions(pe_resource_t *rsc, notify_data_t *n_data) role2text(rsc->next_role), rsc->id); return; } - if ((task != start_rsc) || (start == NULL) - || pcmk_is_set(start->flags, pe_action_optional)) { + if ((task != pcmk_action_start) || (start == NULL) + || pcmk_is_set(start->flags, pcmk_action_optional)) { new_notify_action(rsc, rsc->allocated_to, n_data->pre, n_data->pre_done, n_data); @@ -929,7 +940,7 @@ create_notify_actions(pe_resource_t *rsc, notify_data_t *n_data) * \param[in,out] n_data Clone notification data for some action */ void -pe__create_action_notifications(pe_resource_t *rsc, notify_data_t *n_data) +pe__create_action_notifications(pcmk_resource_t *rsc, notify_data_t *n_data) { if ((rsc == NULL) || (n_data == NULL)) { return; @@ -978,13 +989,14 @@ pe__free_action_notification_data(notify_data_t *n_data) * \param[in,out] stonith_op Fencing action that implies \p stop */ void -pe__order_notifs_after_fencing(const pe_action_t *stop, pe_resource_t *rsc, - pe_action_t *stonith_op) +pe__order_notifs_after_fencing(const pcmk_action_t *stop, pcmk_resource_t *rsc, + pcmk_action_t *stonith_op) { notify_data_t *n_data; crm_info("Ordering notifications for implied %s after fencing", stop->uuid); - n_data = pe__action_notif_pseudo_ops(rsc, RSC_STOP, NULL, stonith_op); + n_data = pe__action_notif_pseudo_ops(rsc, PCMK_ACTION_STOP, NULL, + stonith_op); if (n_data != NULL) { collect_resource_data(rsc, false, n_data); |