1
2
3
4
5
6
7
8
9
10 #ifndef CRMD_UTILS__H
11 # define CRMD_UTILS__H
12
13 # include <crm/crm.h>
14 # include <crm/common/xml.h>
15
16 # define FAKE_TE_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
17
18 enum node_update_flags {
19 node_update_none = 0x0000,
20 node_update_quick = 0x0001,
21 node_update_cluster = 0x0010,
22 node_update_peer = 0x0020,
23 node_update_join = 0x0040,
24 node_update_expected = 0x0100,
25 node_update_all = node_update_cluster|node_update_peer|node_update_join|node_update_expected,
26 };
27
28 crm_exit_t crmd_exit(crm_exit_t exit_code);
29 _Noreturn void crmd_fast_exit(crm_exit_t exit_code);
30 void controld_shutdown_schedulerd_ipc(void);
31 void controld_stop_sched_timer(void);
32 void controld_free_sched_timer(void);
33 void controld_expect_sched_reply(char *ref);
34
35 void fsa_dump_actions(uint64_t action, const char *text);
36 void fsa_dump_inputs(int log_level, const char *text, long long input_register);
37
38 gboolean update_dc(xmlNode * msg);
39 void crm_update_peer_join(const char *source, crm_node_t * node, enum crm_join_phase phase);
40 xmlNode *create_node_state_update(crm_node_t *node, int flags,
41 xmlNode *parent, const char *source);
42 void populate_cib_nodes(enum node_update_flags flags, const char *source);
43 void crm_update_quorum(gboolean quorum, gboolean force_update);
44 void controld_close_attrd_ipc(void);
45 void update_attrd(const char *host, const char *name, const char *value, const char *user_name, gboolean is_remote_node);
46 void update_attrd_list(GList *attrs, uint32_t opts);
47 void update_attrd_remote_node_removed(const char *host, const char *user_name);
48 void update_attrd_clear_failures(const char *host, const char *rsc,
49 const char *op, const char *interval_spec,
50 gboolean is_remote_node);
51
52 int crmd_join_phase_count(enum crm_join_phase phase);
53 void crmd_join_phase_log(int level);
54
55 void crmd_peer_down(crm_node_t *peer, bool full);
56
57 bool feature_set_compatible(const char *dc_version, const char *join_version);
58
59 const char *get_node_id(xmlNode *lrm_rsc_op);
60
61 #endif