#include <stdbool.h>
#include <stdint.h>
#include <glib.h>
#include <libxml/tree.h>
#include <crm/common/actions.h>
#include <crm/common/roles.h>
#include <crm/common/scheduler_types.h>
#include <crm/common/strings_internal.h>
Go to the source code of this file.
|
enum | pcmk__action_type {
pcmk__action_unspecified = 0
, pcmk__action_monitor
, pcmk__action_stop
, pcmk__action_stopped
,
pcmk__action_start
, pcmk__action_started
, pcmk__action_notify
, pcmk__action_notified
,
pcmk__action_promote
, pcmk__action_promoted
, pcmk__action_demote
, pcmk__action_demoted
,
pcmk__action_shutdown
, pcmk__action_fence
} |
|
enum | pcmk__action_flags {
pcmk__no_action_flags = 0
, pcmk__action_pseudo = (UINT32_C(1) << 0)
, pcmk__action_runnable = (UINT32_C(1) << 1)
, pcmk__action_optional = (UINT32_C(1) << 2)
,
pcmk__action_always_in_graph = (UINT32_C(1) << 3)
, pcmk__action_attrs_evaluated = (UINT32_C(1) << 4)
, pcmk__action_migratable = (UINT32_C(1) << 7)
, pcmk__action_added_to_graph = (UINT32_C(1) << 8)
,
pcmk__action_migration_abort = (UINT32_C(1) << 11)
, pcmk__action_reschedule = (UINT32_C(1) << 13)
, pcmk__action_detect_loop = (UINT32_C(1) << 14)
, pcmk__action_inputs_deduplicated = (UINT32_C(1) << 15)
,
pcmk__action_on_dc = (UINT32_C(1) << 16)
} |
|
enum | pcmk__on_fail {
pcmk__on_fail_ignore
, pcmk__on_fail_demote
, pcmk__on_fail_restart
, pcmk__on_fail_reset_remote
,
pcmk__on_fail_restart_container
, pcmk__on_fail_ban
, pcmk__on_fail_block
, pcmk__on_fail_stop
,
pcmk__on_fail_standby_node
, pcmk__on_fail_fence_node
} |
|
enum | pcmk__requires { pcmk__requires_nothing = 0
, pcmk__requires_quorum = 1
, pcmk__requires_fencing = 2
} |
|
◆ pcmk__clear_action_flags
#define pcmk__clear_action_flags |
( |
| action, |
|
|
| flags_to_clear ) |
Value: do { \
(
action)->
flags = pcmk__clear_flags_as(__func__, __LINE__, \
(flags_to_clear), \
#flags_to_clear); \
} while (0)
Definition at line 55 of file actions_internal.h.
◆ pcmk__clear_raw_action_flags
#define pcmk__clear_raw_action_flags |
( |
| action_flags, |
|
|
| action_name, |
|
|
| to_clear ) |
Value: do { \
action_flags = pcmk__clear_flags_as(__func__, __LINE__,
LOG_TRACE, \
"Action", action_name, \
(action_flags), \
(to_clear), #to_clear); \
} while (0)
Definition at line 87 of file actions_internal.h.
◆ PCMK__OP_FMT
#define PCMK__OP_FMT "%s_%s_%u" |
printf-style format to create operation key from resource, action, interval
Definition at line 30 of file actions_internal.h.
◆ pcmk__set_action_flags
#define pcmk__set_action_flags |
( |
| action, |
|
|
| flags_to_set ) |
Value: do { \
(
action)->
flags = pcmk__set_flags_as(__func__, __LINE__, \
(flags_to_set), \
#flags_to_set); \
} while (0)
Definition at line 39 of file actions_internal.h.
◆ pcmk__set_raw_action_flags
#define pcmk__set_raw_action_flags |
( |
| action_flags, |
|
|
| action_name, |
|
|
| to_set ) |
Value: do { \
action_flags = pcmk__set_flags_as(__func__, __LINE__, \
(action_flags), \
(to_set), #to_set); \
} while (0)
Definition at line 72 of file actions_internal.h.
◆ pcmk__action_flags
Enumerator |
---|
pcmk__no_action_flags | |
pcmk__action_pseudo | |
pcmk__action_runnable | |
pcmk__action_optional | |
pcmk__action_always_in_graph | |
pcmk__action_attrs_evaluated | |
pcmk__action_migratable | |
pcmk__action_added_to_graph | |
pcmk__action_migration_abort | |
pcmk__action_reschedule | |
pcmk__action_detect_loop | |
pcmk__action_inputs_deduplicated | |
pcmk__action_on_dc | |
Definition at line 122 of file actions_internal.h.
◆ pcmk__action_type
Enumerator |
---|
pcmk__action_unspecified | |
pcmk__action_monitor | |
pcmk__action_stop | |
pcmk__action_stopped | |
pcmk__action_start | |
pcmk__action_started | |
pcmk__action_notify | |
pcmk__action_notified | |
pcmk__action_promote | |
pcmk__action_promoted | |
pcmk__action_demote | |
pcmk__action_demoted | |
pcmk__action_shutdown | |
pcmk__action_fence | |
Definition at line 96 of file actions_internal.h.
◆ pcmk__on_fail
Enumerator |
---|
pcmk__on_fail_ignore | |
pcmk__on_fail_demote | |
pcmk__on_fail_restart | |
pcmk__on_fail_reset_remote | |
pcmk__on_fail_restart_container | |
pcmk__on_fail_ban | |
pcmk__on_fail_block | |
pcmk__on_fail_stop | |
pcmk__on_fail_standby_node | |
pcmk__on_fail_fence_node | |
Definition at line 168 of file actions_internal.h.
◆ pcmk__requires
Enumerator |
---|
pcmk__requires_nothing | |
pcmk__requires_quorum | |
pcmk__requires_fencing | |
Definition at line 188 of file actions_internal.h.
◆ pcmk__action_text()
◆ pcmk__filter_op_for_digest()
void pcmk__filter_op_for_digest |
( |
xmlNode * | param_set | ) |
|
◆ pcmk__free_action()
void pcmk__free_action |
( |
gpointer | user_data | ) |
|
◆ pcmk__is_fencing_action()
bool pcmk__is_fencing_action |
( |
const char * | action | ) |
|
◆ pcmk__notify_key()
char * pcmk__notify_key |
( |
const char * | rsc_id, |
|
|
const char * | notify_type, |
|
|
const char * | op_type ) |
◆ pcmk__on_fail_text()
◆ pcmk__op_key()
char * pcmk__op_key |
( |
const char * | rsc_id, |
|
|
const char * | op_type, |
|
|
guint | interval_ms ) |
Generate an operation key (RESOURCE_ACTION_INTERVAL)
- Parameters
-
[in] | rsc_id | ID of resource being operated on |
[in] | op_type | Operation name |
[in] | interval_ms | Operation interval |
- Returns
- Newly allocated memory containing operation key as string
- Note
- This function asserts on errors, so it will never return NULL. The caller is responsible for freeing the result with free().
Definition at line 225 of file actions.c.
◆ pcmk__parse_action()
◆ pcmk__transition_key()
char * pcmk__transition_key |
( |
int | transition_id, |
|
|
int | action_id, |
|
|
int | target_rc, |
|
|
const char * | node ) |