pacemaker  2.1.8-3980678f03
Scalable High-Availability cluster resource manager
scheduler_internal.h
Go to the documentation of this file.
1 /*
2  * Copyright 2004-2024 the Pacemaker project contributors
3  *
4  * The version control history for this file may have further details.
5  *
6  * This source code is licensed under the GNU Lesser General Public License
7  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8  */
9 
10 #ifndef PCMK__CRM_COMMON_SCHEDULER_INTERNAL__H
11 #define PCMK__CRM_COMMON_SCHEDULER_INTERNAL__H
12 
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
35  /* Clear fail count if parameters changed for un-expired start or monitor
36  * last_failure.
37  */
39 
40  /* Clear fail count if parameters changed for start, monitor, promote, or
41  * migrate_from actions for active resources.
42  */
44 };
45 
46 // Group of enum pcmk__warnings flags for warnings we want to log once
47 extern uint32_t pcmk__warnings;
48 
56 #define pcmk__rsc_info(rsc, fmt, args...) \
57  crm_log_tag(LOG_INFO, ((rsc) == NULL)? "<NULL>" : (rsc)->id, (fmt), ##args)
58 
66 #define pcmk__rsc_debug(rsc, fmt, args...) \
67  crm_log_tag(LOG_DEBUG, ((rsc) == NULL)? "<NULL>" : (rsc)->id, (fmt), ##args)
68 
76 #define pcmk__rsc_trace(rsc, fmt, args...) \
77  crm_log_tag(LOG_TRACE, ((rsc) == NULL)? "<NULL>" : (rsc)->id, (fmt), ##args)
78 
85 #define pcmk__sched_err(fmt...) do { \
86  was_processing_error = TRUE; \
87  crm_err(fmt); \
88  } while (0)
89 
96 #define pcmk__sched_warn(fmt...) do { \
97  was_processing_warning = TRUE; \
98  crm_warn(fmt); \
99  } while (0)
100 
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 
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 // PCMK__CRM_COMMON_SCHEDULER_INTERNAL__H
pcmk__check_parameters
uint32_t pcmk__warnings
Definition: scheduler.c:19