35 && pe_rsc_is_anon_clone(rsc->
parent)
62 for (GList *iter = rsc->
actions; iter != NULL; iter = iter->next) {
78 target->details->id) != NULL)
79 && !rsc_is_known_on(rsc,
target)) {
112 GList *action_list = NULL;
113 bool order_implicit =
false;
134 order_implicit =
true;
137 if (action_list && order_implicit) {
142 for (iter = action_list; iter != NULL; iter = iter->next) {
148 if (order_implicit) {
161 if (!pe_rsc_is_bundled(rsc)) {
168 crm_notice(
"Stop of failed resource %s is implicit %s %s is fenced",
169 rsc->
id, (order_implicit?
"after" :
"because"),
172 crm_info(
"%s is implicit %s %s is fenced",
173 action->uuid, (order_implicit?
"after" :
"because"),
200 crm_info(
"Moving healthy resource %s off %s before fencing",
201 rsc->
id, pe__node_name(node));
208 g_list_free(action_list);
213 for (iter = action_list; iter != NULL; iter = iter->next) {
216 if (!(
action->node->details->online) ||
action->node->details->unclean
221 "Demote of failed resource %s is implicit " 222 "after %s is fenced",
225 pe_rsc_info(rsc,
"%s is implicit after %s is fenced",
235 if (pe_rsc_is_bundled(rsc)) {
238 }
else if (order_implicit) {
245 g_list_free(action_list);
259 for (GList *iter = rsc->
children; iter != NULL; iter = iter->next) {
262 rsc_stonith_ordering(child_rsc, stonith_op);
267 "Skipping fencing constraints for unmanaged resource: %s",
271 order_start_vs_fencing(rsc, stonith_op);
272 order_stop_vs_fencing(rsc, stonith_op);
382 stonith_op =
pe_fence_op(node, fence_action, FALSE,
"guest is unclean",
395 crm_info(
"Implying guest %s is down (action %d) after %s fencing",
396 pe__node_name(node), stonith_op->
id,
397 pe__node_name(stop->
node));
406 crm_info(
"Implying guest %s is down (action %d) " 407 "after container %s is stopped (action %d)",
408 pe__node_name(node), stonith_op->
id,
409 container->
id, stop->
id);
423 crm_info(
"Implying guest %s is down (action %d) " 424 "after connection is stopped (action %d)",
425 pe__node_name(node), stonith_op->
id, stop->
id);
430 crm_info(
"Implying guest %s is down (action %d) ",
431 pe__node_name(node), stonith_op->
id);
472 crm_debug(
"Ordering any stops of %s before %s, and any starts after",
491 NULL, strdup(unfence->
uuid), unfence,
#define CRM_CHECK(expr, failure_action)
Whether resource has clone notifications enabled.
Relation applies only if actions are on same node.
void trigger_unfencing(pcmk_resource_t *rsc, pcmk_node_t *node, const char *reason, pcmk_action_t *dependency, pcmk_scheduler_t *scheduler)
Resource can be recovered after fencing.
#define crm_notice(fmt, args...)
GHashTable * known_on
Nodes where resource has been probed (key is node ID, not name)
'then' is runnable (and migratable) only if 'first' is runnable
pcmk_scheduler_t * cluster
Cluster that resource is part of.
Resource can be recovered immediately.
#define pe_rsc_debug(rsc, fmt, args...)
void pcmk__fence_guest(pcmk_node_t *node)
void pcmk__order_restart_vs_unfence(gpointer data, gpointer user_data)
#define pe__set_action_flags(action, flags_to_set)
const char * pe_node_attribute_raw(const pcmk_node_t *node, const char *name)
G_GNUC_INTERNAL void pcmk__new_ordering(pcmk_resource_t *first_rsc, char *first_task, pcmk_action_t *first_action, pcmk_resource_t *then_rsc, char *then_task, pcmk_action_t *then_action, uint32_t flags, pcmk_scheduler_t *sched)
pcmk_resource_t * uber_parent(pcmk_resource_t *rsc)
GList * children
Resource's child resources, if any.
gboolean order_actions(pcmk_action_t *lh_action, pcmk_action_t *rh_action, uint32_t flags)
Implementation of pcmk_action_t.
pcmk_action_t * pe_fence_op(pcmk_node_t *node, const char *op, bool optional, const char *reason, bool priority_delay, pcmk_scheduler_t *scheduler)
If 'first' is required, 'then' action for instance on same node is.
int id
Counter to identify action.
GList * pe__resource_actions(const pcmk_resource_t *rsc, const pcmk_node_t *node, const char *task, bool require_node)
Find all actions of given type for a resource.
pcmk_scheduler_t * data_set
Cluster that node is part of.
pcmk_resource_t * container
Resource containing this one, if any.
Implementation of pcmk_scheduler_t.
Ordering applies even if 'first' runs on guest node created by 'then'.
GList * resources
Resources in cluster.
pcmk__action_relation_flags
#define CRM_ATTR_UNFENCED
#define PCMK_ACTION_DEMOTE
#define PCMK_ACTION_REBOOT
pcmk_resource_t * parent
Resource's parent resource, if any.
Whether any resource provides or requires unfencing (via CIB resources)
pcmk_node_t * node
Node to execute action on, if any.
Implementation of pcmk_resource_t.
#define crm_debug(fmt, args...)
Actions are ordered (optionally, if no other flags are set)
void pcmk__order_vs_unfence(const pcmk_resource_t *rsc, pcmk_node_t *node, pcmk_action_t *action, enum pcmk__action_relation_flags order)
Whether resource is considered failed.
char * crm_strdup_printf(char const *format,...) G_GNUC_PRINTF(1
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
struct pe_node_shared_s * details
Basic node information.
#define PCMK_ACTION_START
unsigned long long flags
Group of enum pcmk_rsc_flags.
#define PCMK_ACTION_STONITH
Implementation of pcmk_node_t.
enum pe_obj_types variant
Resource variant.
Resource can be recovered if quorate.
const char * id
Node ID at the cluster layer.
void pcmk__order_vs_fence(pcmk_action_t *stonith_op, pcmk_scheduler_t *scheduler)
bool pe__is_guest_node(const pcmk_node_t *node)
Cluster status and scheduling.
Whether resource requires fencing before recovery if on unclean node.
Whether resource's class is "stonith".
Whether action is runnable.
void pe__order_notifs_after_fencing(const pcmk_action_t *action, pcmk_resource_t *rsc, pcmk_action_t *stonith_op)
pcmk_action_t * find_first_action(const GList *input, const char *uuid, const char *task, const pcmk_node_t *on_node)
pcmk_scheduler_t * scheduler
Whether action does not require invoking an agent.
enum pe_action_flags flags
Group of enum pe_action_flags.
#define pe_rsc_trace(rsc, fmt, args...)
unsigned long long flags
Group of enum pcmk_scheduler_flags.
Whether resource is managed.
Whether resource can be started or promoted only on unfenced nodes.
#define crm_info(fmt, args...)
pcmk_resource_t * remote_rsc
Remote connection resource for node, if it is a Pacemaker Remote node.
#define pe_rsc_info(rsc, fmt, args...)
char * id
Resource ID in configuration.
GHashTable * allowed_nodes
Nodes where resource may run (key is node ID, not name)
bool pcmk__node_unfenced(const pcmk_node_t *node)