1
2
3
4
5
6
7
8
9
10 #ifndef PCMK__CRM_COMMON_SCHEDULER_INTERNAL__H
11 #define PCMK__CRM_COMMON_SCHEDULER_INTERNAL__H
12
13 #include <crm/common/action_relation_internal.h>
14 #include <crm/common/actions_internal.h>
15 #include <crm/common/attrs_internal.h>
16 #include <crm/common/bundles_internal.h>
17 #include <crm/common/clone_internal.h>
18 #include <crm/common/digests_internal.h>
19 #include <crm/common/failcounts_internal.h>
20 #include <crm/common/group_internal.h>
21 #include <crm/common/history_internal.h>
22 #include <crm/common/location_internal.h>
23 #include <crm/common/nodes_internal.h>
24 #include <crm/common/primitive_internal.h>
25 #include <crm/common/remote_internal.h>
26 #include <crm/common/resources_internal.h>
27 #include <crm/common/roles_internal.h>
28 #include <crm/common/rules_internal.h>
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 enum pcmk__check_parameters {
35
36
37
38 pcmk__check_last_failure,
39
40
41
42
43 pcmk__check_active,
44 };
45
46
47 extern uint32_t pcmk__warnings;
48
49
50
51
52
53
54
55
56 #define pcmk__rsc_info(rsc, fmt, args...) \
57 crm_log_tag(LOG_INFO, ((rsc) == NULL)? "<NULL>" : (rsc)->id, (fmt), ##args)
58
59
60
61
62
63
64
65
66 #define pcmk__rsc_debug(rsc, fmt, args...) \
67 crm_log_tag(LOG_DEBUG, ((rsc) == NULL)? "<NULL>" : (rsc)->id, (fmt), ##args)
68
69
70
71
72
73
74
75
76 #define pcmk__rsc_trace(rsc, fmt, args...) \
77 crm_log_tag(LOG_TRACE, ((rsc) == NULL)? "<NULL>" : (rsc)->id, (fmt), ##args)
78
79
80
81
82
83
84
85 #define pcmk__sched_err(fmt...) do { \
86 was_processing_error = TRUE; \
87 crm_err(fmt); \
88 } while (0)
89
90
91
92
93
94
95
96 #define pcmk__sched_warn(fmt...) do { \
97 was_processing_warning = TRUE; \
98 crm_warn(fmt); \
99 } while (0)
100
101
102
103
104
105
106
107
108 #define pcmk__set_scheduler_flags(scheduler, flags_to_set) do { \
109 (scheduler)->flags = pcmk__set_flags_as(__func__, __LINE__, \
110 LOG_TRACE, "Scheduler", crm_system_name, \
111 (scheduler)->flags, (flags_to_set), #flags_to_set); \
112 } while (0)
113
114
115
116
117
118
119
120
121 #define pcmk__clear_scheduler_flags(scheduler, flags_to_clear) do { \
122 (scheduler)->flags = pcmk__clear_flags_as(__func__, __LINE__, \
123 LOG_TRACE, "Scheduler", crm_system_name, \
124 (scheduler)->flags, (flags_to_clear), #flags_to_clear); \
125 } while (0)
126
127 #ifdef __cplusplus
128 }
129 #endif
130
131 #endif