34 }
else if (pcmk__is_primitive(rsc)
35 && pcmk__is_anonymous_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;
132 || pcmk__is_guest_or_bundle_node(
target)) {
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 (!pcmk__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, pcmk__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",
235 if (pcmk__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: " 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 pcmk__node_name(node), stonith_op->
id,
397 pcmk__node_name(stop->
node));
406 crm_info(
"Implying guest %s is down (action %d) " 407 "after container %s is stopped (action %d)",
408 pcmk__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 pcmk__node_name(node), stonith_op->
id, stop->
id);
430 crm_info(
"Implying guest %s is down (action %d) ",
431 pcmk__node_name(node), stonith_op->
id);
473 crm_debug(
"Ordering any stops of %s before %s, and any starts after",
492 NULL, strdup(unfence->
uuid), unfence,
#define CRM_CHECK(expr, failure_action)
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)
#define crm_notice(fmt, args...)
'then' is runnable (and migratable) only if 'first' is runnable
pcmk_scheduler_t * cluster
void pcmk__fence_guest(pcmk_node_t *node)
void pcmk__order_restart_vs_unfence(gpointer data, gpointer user_data)
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)
#define pcmk__rsc_trace(rsc, fmt, args...)
#define pcmk__rsc_info(rsc, fmt, args...)
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.
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
pcmk_resource_t * container
Ordering applies even if 'first' runs on guest node created by 'then'.
#define pcmk__rsc_debug(rsc, fmt, args...)
pcmk__action_relation_flags
#define CRM_ATTR_UNFENCED
#define PCMK_ACTION_DEMOTE
#define PCMK_ACTION_REBOOT
#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)
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
#define PCMK_ACTION_START
#define PCMK_ACTION_STONITH
gboolean order_actions(pcmk_action_t *first, pcmk_action_t *then, uint32_t flags)
#define pcmk__assert(expr)
void pcmk__order_vs_fence(pcmk_action_t *stonith_op, pcmk_scheduler_t *scheduler)
Cluster status and scheduling.
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
const char * pcmk__node_attr(const pcmk_node_t *node, const char *name, const char *target, enum pcmk__rsc_node node_type)
enum pe_action_flags flags
#define pcmk__set_action_flags(action, flags_to_set)
#define crm_info(fmt, args...)
pcmk_resource_t * remote_rsc
GHashTable * allowed_nodes
Where resource is running.
bool pcmk__node_unfenced(const pcmk_node_t *node)