53 pe_rsc_trace(rsc,
"Creating actions to %smigrate %s from %s to %s",
55 rsc->
id, pe__node_name(current),
123 if (migrate_to != NULL) {
124 add_migration_meta(migrate_to, current, rsc->
allocated_to);
142 add_migration_meta(migrate_from, current, rsc->
allocated_to);
163 "Scheduling stop%s for %s on %s due to dangling migration",
164 (cleanup?
" and cleanup" :
""), rsc->
id,
165 pe__node_name(dangling_source));
189 "the configuration does not allow it",
195 pe_rsc_trace(rsc,
"%s cannot migrate because it is not managed",
201 pe_rsc_trace(rsc,
"%s cannot migrate because it is failed",
207 pe_rsc_trace(rsc,
"%s cannot migrate because it has a start pending",
214 "its current node (%s) is unclean",
215 rsc->
id, pe__node_name(current));
221 "its next node (%s) is unclean",
244 res = strdup(
action->task);
246 }
else if (key != NULL) {
265 char *first_task = NULL;
266 char *then_task = NULL;
267 bool then_migratable;
268 bool first_migratable;
281 if (!first_migratable && !then_migratable) {
286 first_task = task_from_action_or_key(order->
lh_action,
288 then_task = task_from_action_or_key(order->
rh_action,
296 if (first_migratable && then_migratable) {
308 if (then_migratable) {
309 if (first_migratable) {
326 }
else if (then_migratable
332 if (first_migratable) {
363 if (then_migratable) {
380 if (then_migratable) {
#define CRM_CHECK(expr, failure_action)
pcmk_action_t * lh_action
enum rsc_start_requirement needs
Prerequisite for recovery.
void pcmk__order_migration_equivalents(pe__ordering_t *order)
pcmk_scheduler_t * cluster
Cluster that resource is part of.
G_GNUC_INTERNAL void pcmk__schedule_cleanup(pcmk_resource_t *rsc, const pcmk_node_t *node, bool optional)
#define pe__set_action_flags(action, flags_to_set)
pcmk_node_t * partial_migration_target
The destination node, if migrate_to completed but migrate_from has not.
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)
#define stop_action(rsc, node, optional)
pcmk_action_t * rh_action
If 'first' is unrunnable, 'then' becomes a real, unmigratable action.
Implementation of pcmk_action_t.
#define PCMK_ACTION_MONITOR
#define PCMK_ACTION_MIGRATE_TO
void pcmk__create_migration_actions(pcmk_resource_t *rsc, const pcmk_node_t *current)
#define PCMK_ACTION_DEMOTE
Implementation of pcmk_resource_t.
Actions are ordered (optionally, if no other flags are set)
Whether resource is considered failed.
GHashTable * meta
Meta-attributes relevant to action.
#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
bool pcmk__rsc_can_migrate(const pcmk_resource_t *rsc, const pcmk_node_t *current)
unsigned long long flags
Group of enum pcmk_rsc_flags.
const char * uname
Node name in cluster.
#define XML_LRM_ATTR_MIGRATE_TARGET
char * pcmk__op_key(const char *rsc_id, const char *op_type, guint interval_ms)
Generate an operation key (RESOURCE_ACTION_INTERVAL)
Implementation of pcmk_node_t.
Whether resource has pending start action in history.
pcmk_action_t * custom_action(pcmk_resource_t *rsc, char *key, const char *task, const pcmk_node_t *on_node, gboolean optional, pcmk_scheduler_t *scheduler)
Create or update an action object.
gboolean is_remote_node
Whether this is a remote connection.
void add_hash_param(GHashTable *hash, const char *name, const char *value)
#define start_action(rsc, node, optional)
Whether action does not require invoking an agent.
Relation applies only if 'first' cannot be part of a live migration.
Whether resource is allowed to live-migrate.
#define PCMK_ACTION_MIGRATE_FROM
gboolean parse_op_key(const char *key, char **rsc_id, char **op_type, guint *interval_ms)
pcmk_node_t * allocated_to
Node resource is assigned to.
gboolean is_parent(pcmk_resource_t *child, pcmk_resource_t *rsc)
#define PCMK_ACTION_PROMOTE
#define XML_OP_ATTR_PENDING
Whether action is allowed to be part of a live migration.
Whether action is a stop to abort a dangling migration.
#define pe_rsc_trace(rsc, fmt, args...)
#define pe__set_order_flags(order_flags, flags_to_set)
unsigned long long flags
Group of enum pcmk_scheduler_flags.
#define XML_LRM_ATTR_MIGRATE_SOURCE
Whether resource is managed.
gboolean unclean
Whether node requires fencing.
void pcmk__abort_dangling_migration(void *data, void *user_data)
char * id
Resource ID in configuration.