pacemaker  2.1.4-dc6eb4362
Scalable High-Availability cluster resource manager
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
common.h File Reference
#include <glib.h>
#include <regex.h>
#include <crm/common/iso8601.h>
#include <crm/pengine/common_compat.h>
Include dependency graph for common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pe_re_match_data
 
struct  pe_match_data
 
struct  pe_rsc_eval_data
 
struct  pe_op_eval_data
 
struct  pe_rule_eval_data
 

Macros

#define RSC_ROLE_MAX   (RSC_ROLE_PROMOTED + 1)
 
#define RSC_ROLE_UNKNOWN_S   "Unknown"
 
#define RSC_ROLE_STOPPED_S   "Stopped"
 
#define RSC_ROLE_STARTED_S   "Started"
 
#define RSC_ROLE_UNPROMOTED_S   "Unpromoted"
 
#define RSC_ROLE_PROMOTED_S   "Promoted"
 
#define RSC_ROLE_UNPROMOTED_LEGACY_S   "Slave"
 
#define RSC_ROLE_PROMOTED_LEGACY_S   "Master"
 

Typedefs

typedef struct pe_re_match_data pe_re_match_data_t
 
typedef struct pe_match_data pe_match_data_t
 
typedef struct pe_rsc_eval_data pe_rsc_eval_data_t
 
typedef struct pe_op_eval_data pe_op_eval_data_t
 
typedef struct pe_rule_eval_data pe_rule_eval_data_t
 

Enumerations

enum  action_fail_response {
  action_fail_ignore, action_fail_recover, action_fail_migrate, action_fail_block,
  action_fail_stop, action_fail_standby, action_fail_fence, action_fail_restart_container,
  action_fail_reset_remote, action_fail_demote
}
 
enum  action_tasks {
  no_action, monitor_rsc, stop_rsc, stopped_rsc,
  start_rsc, started_rsc, action_notify, action_notified,
  action_promote, action_promoted, action_demote, action_demoted,
  shutdown_crm, stonith_node
}
 
enum  rsc_recovery_type { recovery_stop_start, recovery_stop_only, recovery_block, recovery_stop_unexpected }
 
enum  rsc_start_requirement { rsc_req_nothing, rsc_req_quorum, rsc_req_stonith }
 
enum  rsc_role_e {
  RSC_ROLE_UNKNOWN = 0, RSC_ROLE_STOPPED = 1, RSC_ROLE_STARTED = 2, RSC_ROLE_UNPROMOTED = 3,
  RSC_ROLE_PROMOTED = 4, RSC_ROLE_SLAVE = RSC_ROLE_UNPROMOTED, RSC_ROLE_MASTER = RSC_ROLE_PROMOTED
}
 Possible roles that a resource can be in. More...
 
enum  pe_print_options {
  pe_print_log = (1 << 0), pe_print_html = (1 << 1), pe_print_ncurses = (1 << 2), pe_print_printf = (1 << 3),
  pe_print_dev = (1 << 4), pe_print_details = (1 << 5), pe_print_max_details = (1 << 6), pe_print_rsconly = (1 << 7),
  pe_print_ops = (1 << 8), pe_print_suppres_nl = (1 << 9), pe_print_xml = (1 << 10), pe_print_brief = (1 << 11),
  pe_print_pending = (1 << 12), pe_print_clone_details = (1 << 13), pe_print_clone_active = (1 << 14), pe_print_implicit = (1 << 15)
}
 Deprecated. More...
 

Functions

const char * task2text (enum action_tasks task)
 
enum action_tasks text2task (const char *task)
 
enum rsc_role_e text2role (const char *role)
 
const char * role2text (enum rsc_role_e role)
 
const char * fail2text (enum action_fail_response fail)
 
const char * pe_pref (GHashTable *options, const char *name)
 
void calculate_active_ops (GList *sorted_op_list, int *start_index, int *stop_index)
 

Variables

gboolean was_processing_error
 
gboolean was_processing_warning
 

Macro Definition Documentation

◆ RSC_ROLE_MAX

#define RSC_ROLE_MAX   (RSC_ROLE_PROMOTED + 1)

Definition at line 108 of file common.h.

◆ RSC_ROLE_PROMOTED_LEGACY_S

#define RSC_ROLE_PROMOTED_LEGACY_S   "Master"

Definition at line 116 of file common.h.

◆ RSC_ROLE_PROMOTED_S

#define RSC_ROLE_PROMOTED_S   "Promoted"

Definition at line 114 of file common.h.

◆ RSC_ROLE_STARTED_S

#define RSC_ROLE_STARTED_S   "Started"

Definition at line 112 of file common.h.

◆ RSC_ROLE_STOPPED_S

#define RSC_ROLE_STOPPED_S   "Stopped"

Definition at line 111 of file common.h.

◆ RSC_ROLE_UNKNOWN_S

#define RSC_ROLE_UNKNOWN_S   "Unknown"

Definition at line 110 of file common.h.

◆ RSC_ROLE_UNPROMOTED_LEGACY_S

#define RSC_ROLE_UNPROMOTED_LEGACY_S   "Slave"

Definition at line 115 of file common.h.

◆ RSC_ROLE_UNPROMOTED_S

#define RSC_ROLE_UNPROMOTED_S   "Unpromoted"

Definition at line 113 of file common.h.

Typedef Documentation

◆ pe_match_data_t

◆ pe_op_eval_data_t

◆ pe_re_match_data_t

◆ pe_rsc_eval_data_t

◆ pe_rule_eval_data_t

Enumeration Type Documentation

◆ action_fail_response

Enumerator
action_fail_ignore 
action_fail_recover 
action_fail_migrate 
action_fail_block 
action_fail_stop 
action_fail_standby 
action_fail_fence 
action_fail_restart_container 
action_fail_reset_remote 
action_fail_demote 

Definition at line 33 of file common.h.

◆ action_tasks

Enumerator
no_action 
monitor_rsc 
stop_rsc 
stopped_rsc 
start_rsc 
started_rsc 
action_notify 
action_notified 
action_promote 
action_promoted 
action_demote 
action_demoted 
shutdown_crm 
stonith_node 

Definition at line 61 of file common.h.

◆ pe_print_options

Deprecated.

Enumerator
pe_print_log 
pe_print_html 
pe_print_ncurses 
pe_print_printf 
pe_print_dev 
pe_print_details 

Ignored.

pe_print_max_details 

Ignored.

pe_print_rsconly 

Ignored.

pe_print_ops 
pe_print_suppres_nl 
pe_print_xml 
pe_print_brief 
pe_print_pending 
pe_print_clone_details 
pe_print_clone_active 
pe_print_implicit 

Definition at line 119 of file common.h.

◆ rsc_recovery_type

Enumerator
recovery_stop_start 
recovery_stop_only 
recovery_block 
recovery_stop_unexpected 

Definition at line 78 of file common.h.

◆ rsc_role_e

enum rsc_role_e

Possible roles that a resource can be in.

Enumerator
RSC_ROLE_UNKNOWN 
RSC_ROLE_STOPPED 
RSC_ROLE_STARTED 
RSC_ROLE_UNPROMOTED 
RSC_ROLE_PROMOTED 
RSC_ROLE_SLAVE 
Deprecated:
Use RSC_ROLE_UNPROMOTED instead
RSC_ROLE_MASTER 
Deprecated:
Use RSC_ROLE_PROMOTED instead

Definition at line 92 of file common.h.

◆ rsc_start_requirement

Enumerator
rsc_req_nothing 
rsc_req_quorum 
rsc_req_stonith 

Definition at line 85 of file common.h.

Function Documentation

◆ calculate_active_ops()

void calculate_active_ops ( GList *  sorted_op_list,
int *  start_index,
int *  stop_index 
)

Definition at line 2259 of file unpack.c.

◆ fail2text()

const char* fail2text ( enum action_fail_response  fail)

Definition at line 311 of file common.c.

◆ pe_pref()

const char* pe_pref ( GHashTable *  options,
const char *  name 
)

Definition at line 305 of file common.c.

◆ role2text()

const char* role2text ( enum rsc_role_e  role)

Definition at line 454 of file common.c.

◆ task2text()

const char* task2text ( enum action_tasks  task)

Definition at line 401 of file common.c.

◆ text2role()

enum rsc_role_e text2role ( const char *  role)

Definition at line 483 of file common.c.

◆ text2task()

enum action_tasks text2task ( const char *  task)

Definition at line 351 of file common.c.

Variable Documentation

◆ was_processing_error

gboolean was_processing_error

Definition at line 20 of file common.c.

◆ was_processing_warning

gboolean was_processing_warning

Definition at line 21 of file common.c.