root/daemons/controld/controld_transition.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright 2004-2022 the Pacemaker project contributors
   3  *
   4  * This source code is licensed under the GNU Lesser General Public License
   5  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
   6  */
   7 
   8 #ifndef TENGINE__H
   9 #  define TENGINE__H
  10 
  11 #  include <crm/common/mainloop.h>
  12 #  include <crm/stonith-ng.h>
  13 #  include <crm/services.h>
  14 #  include <pacemaker-internal.h>
  15 
  16 /* tengine */
  17 pcmk__graph_action_t *match_down_event(const char *target);
  18 pcmk__graph_action_t *get_cancel_action(const char *id, const char *node);
  19 bool confirm_cancel_action(const char *id, const char *node_id);
  20 
  21 void controld_record_action_timeout(pcmk__graph_action_t *action);
  22 gboolean fail_incompletable_actions(pcmk__graph_t *graph, const char *down_node);
  23 void process_graph_event(xmlNode *event, const char *event_node);
  24 
  25 /* utils */
  26 pcmk__graph_action_t *controld_get_action(int id);
  27 gboolean stop_te_timer(pcmk__graph_action_t *action);
  28 const char *get_rsc_state(const char *task, enum pcmk_exec_status status);
  29 
  30 void process_te_message(xmlNode *msg, xmlNode *xml_data);
  31 
  32 extern pcmk__graph_t *transition_graph;
  33 extern crm_trigger_t *transition_trigger;
  34 
  35 extern char *te_uuid;
  36 
  37 void notify_crmd(pcmk__graph_t * graph);
  38 
  39 void cib_action_updated(xmlNode *msg, int call_id, int rc, xmlNode *output,
  40                         void *user_data);
  41 gboolean action_timer_callback(gpointer data);
  42 gboolean te_graph_trigger(gpointer user_data);
  43 void te_update_diff(const char *event, xmlNode *msg);
  44 
  45 extern void trigger_graph_processing(const char *fn, int line);
  46 void abort_after_delay(int abort_priority, enum pcmk__graph_next abort_action,
  47                        const char *abort_text, guint delay_ms);
  48 void abort_transition_graph(int abort_priority,
  49                             enum pcmk__graph_next abort_action,
  50                             const char *abort_text, const xmlNode *reason,
  51                             const char *fn, int line);
  52 
  53 #  define trigger_graph()       trigger_graph_processing(__func__, __LINE__)
  54 #  define abort_transition(pri, action, text, reason)                   \
  55         abort_transition_graph(pri, action, text, reason,__func__,__LINE__);
  56 
  57 extern crm_trigger_t *transition_trigger;
  58 
  59 extern char *failed_stop_offset;
  60 extern char *failed_start_offset;
  61 
  62 void te_action_confirmed(pcmk__graph_action_t *action, pcmk__graph_t *graph);
  63 void te_reset_job_counts(void);
  64 
  65 #endif

/* [previous][next][first][last][top][bottom][index][help] */