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