MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / action_complete

Function action_complete

lrmd/lrmd.c:499–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

497}
498
499static void
500action_complete(svc_action_t * action)
501{
502 lrmd_rsc_t *rsc;
503 lrmd_cmd_t *cmd = action->cb_data;
504
505 if (!cmd) {
506 crm_err("LRMD action (%s) completed does not match any known operations.", action->id);
507 return;
508 }
509#ifdef HAVE_SYS_TIMEB_H
510 if (cmd->exec_rc != action->rc) {
511 ftime(&cmd->t_rcchange);
512 }
513#endif
514
515 cmd->exec_rc = get_uniform_rc(action->standard, cmd->action, action->rc);
516 cmd->lrmd_op_status = action->status;
517 rsc = cmd->rsc_id ? g_hash_table_lookup(rsc_list, cmd->rsc_id) : NULL;
518
519 if (action->stdout_data) {
520 cmd->output = strdup(action->stdout_data);
521 }
522
523 cmd_finalize(cmd, rsc);
524}
525
526
527static void

Callers

nothing calls this directly

Calls 2

get_uniform_rcFunction · 0.85
cmd_finalizeFunction · 0.85

Tested by

no test coverage detected