53 pe_rsc_trace(rsc,
"Creating actions to %smigrate %s from %s to %s",
55 rsc->
id, pe__node_name(current),
69 if ((migrate_from != NULL)
81 if (migrate_to != NULL) {
116 if (migrate_to != NULL) {
117 add_migration_meta(migrate_to, current, rsc->
allocated_to);
135 if (migrate_from != NULL) {
136 add_migration_meta(migrate_from, current, rsc->
allocated_to);
157 "Scheduling stop%s for %s on %s due to dangling migration",
158 (cleanup?
" and cleanup" :
""), rsc->
id,
159 pe__node_name(dangling_source));
183 "the configuration does not allow it",
189 pe_rsc_trace(rsc,
"%s cannot migrate because it is not managed",
195 pe_rsc_trace(rsc,
"%s cannot migrate because it is failed",
201 pe_rsc_trace(rsc,
"%s cannot migrate because it has a start pending",
208 "its current node (%s) is unclean",
209 rsc->
id, pe__node_name(current));
215 "its next node (%s) is unclean",
238 res = strdup(
action->task);
240 }
else if (key != NULL) {
259 char *first_task = NULL;
260 char *then_task = NULL;
261 bool then_migratable;
262 bool first_migratable;
275 if (!first_migratable && !then_migratable) {
280 first_task = task_from_action_or_key(order->
lh_action,
282 then_task = task_from_action_or_key(order->
rh_action,
290 if (first_migratable && then_migratable) {
300 if (then_migratable) {
301 if (first_migratable) {
316 }
else if (then_migratable
322 if (first_migratable) {
349 if (then_migratable) {
364 if (then_migratable) {
#define CRM_CHECK(expr, failure_action)
enum rsc_start_requirement needs
gboolean parse_op_key(const char *key, char **rsc_id, char **op_type, guint *interval_ms)
void pcmk__order_migration_equivalents(pe__ordering_t *order)
G_GNUC_INTERNAL void pcmk__schedule_cleanup(pe_resource_t *rsc, const pe_node_t *node, bool optional)
#define pe__set_action_flags(action, flags_to_set)
gboolean is_parent(pe_resource_t *child, pe_resource_t *rsc)
#define stop_action(rsc, node, optional)
#define pe_flag_remove_after_stop
void pcmk__create_migration_actions(pe_resource_t *rsc, const pe_node_t *current)
pe_node_t * partial_migration_target
#define pe_rsc_allow_migrate
#define pe_rsc_start_pending
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
struct pe_node_shared_s * details
G_GNUC_INTERNAL void pcmk__new_ordering(pe_resource_t *first_rsc, char *first_task, pe_action_t *first_action, pe_resource_t *then_rsc, char *then_task, pe_action_t *then_action, uint32_t flags, pe_working_set_t *data_set)
#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)
bool pcmk__rsc_can_migrate(const pe_resource_t *rsc, const pe_node_t *current)
void add_hash_param(GHashTable *hash, const char *name, const char *value)
#define start_action(rsc, node, optional)
pe_working_set_t * cluster
#define XML_OP_ATTR_PENDING
#define pe_rsc_trace(rsc, fmt, args...)
#define pe__set_order_flags(order_flags, flags_to_set)
#define XML_LRM_ATTR_MIGRATE_SOURCE
pe_action_t * custom_action(pe_resource_t *rsc, char *key, const char *task, const pe_node_t *on_node, gboolean optional, gboolean foo, pe_working_set_t *data_set)
Create or update an action object.
void pcmk__abort_dangling_migration(void *data, void *user_data)