File: controld_transition.h

package info (click to toggle)
pacemaker 3.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 68,576 kB
  • sloc: xml: 160,564; ansic: 143,744; python: 5,670; sh: 2,969; makefile: 2,426
file content (69 lines) | stat: -rw-r--r-- 2,580 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
 * Copyright 2004-2024 the Pacemaker project contributors
 *
 * This source code is licensed under the GNU Lesser General Public License
 * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
 */

#ifndef TENGINE__H
#define TENGINE__H

#include <glib.h>                   // gboolean
#include <libxml/tree.h>            // xmlNode

#include <crm/cluster/internal.h>   // pcmk__node_status_t
#include <crm/common/mainloop.h>
#include <crm/stonith-ng.h>
#include <crm/services.h>
#include <pacemaker-internal.h>

/* tengine */
pcmk__graph_action_t *match_down_event(const char *target);
pcmk__graph_action_t *get_cancel_action(const char *id, const char *node);
bool confirm_cancel_action(const char *id, const char *node_id);

void controld_record_action_timeout(pcmk__graph_action_t *action);

void controld_destroy_outside_events_table(void);
void controld_remove_all_outside_events(void);

gboolean fail_incompletable_actions(pcmk__graph_t *graph, const char *down_node);
void process_graph_event(xmlNode *event, const char *event_node);

/* utils */
pcmk__graph_action_t *controld_get_action(int id);
gboolean stop_te_timer(pcmk__graph_action_t *action);
const char *get_rsc_state(const char *task, enum pcmk_exec_status status);

void process_te_message(xmlNode *msg, xmlNode *xml_data);

void controld_register_graph_functions(void);

void notify_crmd(pcmk__graph_t * graph);

void cib_action_updated(xmlNode *msg, int call_id, int rc, xmlNode *output,
                        void *user_data);
gboolean action_timer_callback(gpointer data);
void te_update_diff(const char *event, xmlNode *msg);

void controld_init_transition_trigger(void);
void controld_destroy_transition_trigger(void);

void controld_trigger_graph_as(const char *fn, int line);
void abort_after_delay(int abort_priority, enum pcmk__graph_next abort_action,
                       const char *abort_text, guint delay_ms);
void controld_node_pending_timer(const pcmk__node_status_t *node);
void controld_free_node_pending_timers(void);
void abort_transition_graph(int abort_priority,
                            enum pcmk__graph_next abort_action,
                            const char *abort_text, const xmlNode *reason,
                            const char *fn, int line);

#  define trigger_graph()   controld_trigger_graph_as(__func__, __LINE__)
#  define abort_transition(pri, action, text, reason)			\
	abort_transition_graph(pri, action, text, reason,__func__,__LINE__);

void te_action_confirmed(pcmk__graph_action_t *action, pcmk__graph_t *graph);
void te_reset_job_counts(void);

#endif