pacemaker  2.1.7-0f7f88312f
Scalable High-Availability cluster resource manager
Data Structures | Macros | Typedefs | Functions
options_internal.h File Reference
#include <config.h>
#include <glib.h>
#include <stdbool.h>
Include dependency graph for options_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pcmk__cluster_option_s
 

Macros

#define PCMK__CONFIG_H
 
#define PCMK__ENV_AUTHKEY_LOCATION   "authkey_location"
 
#define PCMK__ENV_BLACKBOX   "blackbox"
 
#define PCMK__ENV_CALLGRIND_ENABLED   "callgrind_enabled"
 
#define PCMK__ENV_CLUSTER_TYPE   "cluster_type"
 
#define PCMK__ENV_DEBUG   "debug"
 
#define PCMK__ENV_DH_MAX_BITS   "dh_max_bits"
 
#define PCMK__ENV_DH_MIN_BITS   "dh_min_bits"
 
#define PCMK__ENV_FAIL_FAST   "fail_fast"
 
#define PCMK__ENV_IPC_BUFFER   "ipc_buffer"
 
#define PCMK__ENV_IPC_TYPE   "ipc_type"
 
#define PCMK__ENV_LOGFACILITY   "logfacility"
 
#define PCMK__ENV_LOGFILE   "logfile"
 
#define PCMK__ENV_LOGFILE_MODE   "logfile_mode"
 
#define PCMK__ENV_LOGPRIORITY   "logpriority"
 
#define PCMK__ENV_NODE_ACTION_LIMIT   "node_action_limit"
 
#define PCMK__ENV_NODE_START_STATE   "node_start_state"
 
#define PCMK__ENV_PANIC_ACTION   "panic_action"
 
#define PCMK__ENV_PHYSICAL_HOST   "physical_host"
 
#define PCMK__ENV_REMOTE_ADDRESS   "remote_address"
 
#define PCMK__ENV_REMOTE_PID1   "remote_pid1"
 
#define PCMK__ENV_REMOTE_PORT   "remote_port"
 
#define PCMK__ENV_RESPAWNED   "respawned"
 
#define PCMK__ENV_SCHEMA_DIRECTORY   "schema_directory"
 
#define PCMK__ENV_SERVICE   "service"
 
#define PCMK__ENV_STDERR   "stderr"
 
#define PCMK__ENV_TLS_PRIORITIES   "tls_priorities"
 
#define PCMK__ENV_TRACE_BLACKBOX   "trace_blackbox"
 
#define PCMK__ENV_TRACE_FILES   "trace_files"
 
#define PCMK__ENV_TRACE_FORMATS   "trace_formats"
 
#define PCMK__ENV_TRACE_FUNCTIONS   "trace_functions"
 
#define PCMK__ENV_TRACE_TAGS   "trace_tags"
 
#define PCMK__ENV_VALGRIND_ENABLED   "valgrind_enabled"
 
#define PCMK__ENV_CIB_TIMEOUT   "cib_timeout"
 
#define PCMK__ENV_MCP   "mcp"
 
#define PCMK__ENV_QUORUM_TYPE   "quorum_type"
 
#define PCMK__ENV_SHUTDOWN_DELAY   "shutdown_delay"
 
#define PCMK__OPT_NODE_HEALTH_BASE   "node-health-base"
 
#define PCMK__OPT_NODE_HEALTH_GREEN   "node-health-green"
 
#define PCMK__OPT_NODE_HEALTH_RED   "node-health-red"
 
#define PCMK__OPT_NODE_HEALTH_STRATEGY   "node-health-strategy"
 
#define PCMK__OPT_NODE_HEALTH_YELLOW   "node-health-yellow"
 
#define PCMK__META_ALLOW_UNHEALTHY_NODES   "allow-unhealthy-nodes"
 
#define PCMK__VALUE_CLUSTER   "cluster"
 
#define PCMK__VALUE_CUSTOM   "custom"
 
#define PCMK__VALUE_FENCING   "fencing"
 
#define PCMK__VALUE_GREEN   "green"
 
#define PCMK__VALUE_LOCAL   "local"
 
#define PCMK__VALUE_MIGRATE_ON_RED   "migrate-on-red"
 
#define PCMK__VALUE_NONE   "none"
 
#define PCMK__VALUE_NOTHING   "nothing"
 
#define PCMK__VALUE_ONLY_GREEN   "only-green"
 
#define PCMK__VALUE_PROGRESSIVE   "progressive"
 
#define PCMK__VALUE_QUORUM   "quorum"
 
#define PCMK__VALUE_RED   "red"
 
#define PCMK__VALUE_UNFENCING   "unfencing"
 
#define PCMK__VALUE_YELLOW   "yellow"
 

Typedefs

typedef struct pcmk__cluster_option_s pcmk__cluster_option_t
 

Functions

_Noreturn void pcmk__cli_help (char cmd)
 
const char * pcmk__env_option (const char *option)
 
void pcmk__set_env_option (const char *option, const char *value, bool compat)
 Set or unset a Pacemaker environment variable option. More...
 
bool pcmk__env_option_enabled (const char *daemon, const char *option)
 
const char * pcmk__cluster_option (GHashTable *options, const pcmk__cluster_option_t *option_list, int len, const char *name)
 
gchar * pcmk__format_option_metadata (const char *name, const char *desc_short, const char *desc_long, pcmk__cluster_option_t *option_list, int len)
 
void pcmk__validate_cluster_options (GHashTable *options, pcmk__cluster_option_t *option_list, int len)
 
bool pcmk__valid_interval_spec (const char *value)
 
bool pcmk__valid_boolean (const char *value)
 
bool pcmk__valid_number (const char *value)
 
bool pcmk__valid_positive_number (const char *value)
 
bool pcmk__valid_quorum (const char *value)
 
bool pcmk__valid_script (const char *value)
 
bool pcmk__valid_percentage (const char *value)
 
long pcmk__get_sbd_timeout (void)
 
bool pcmk__get_sbd_sync_resource_startup (void)
 
long pcmk__auto_watchdog_timeout (void)
 
bool pcmk__valid_sbd_timeout (const char *value)
 

Macro Definition Documentation

◆ PCMK__CONFIG_H

#define PCMK__CONFIG_H

Definition at line 14 of file options_internal.h.

◆ PCMK__ENV_AUTHKEY_LOCATION

#define PCMK__ENV_AUTHKEY_LOCATION   "authkey_location"

Definition at line 79 of file options_internal.h.

◆ PCMK__ENV_BLACKBOX

#define PCMK__ENV_BLACKBOX   "blackbox"

Definition at line 80 of file options_internal.h.

◆ PCMK__ENV_CALLGRIND_ENABLED

#define PCMK__ENV_CALLGRIND_ENABLED   "callgrind_enabled"

Definition at line 81 of file options_internal.h.

◆ PCMK__ENV_CIB_TIMEOUT

#define PCMK__ENV_CIB_TIMEOUT   "cib_timeout"

Definition at line 113 of file options_internal.h.

◆ PCMK__ENV_CLUSTER_TYPE

#define PCMK__ENV_CLUSTER_TYPE   "cluster_type"

Definition at line 82 of file options_internal.h.

◆ PCMK__ENV_DEBUG

#define PCMK__ENV_DEBUG   "debug"

Definition at line 83 of file options_internal.h.

◆ PCMK__ENV_DH_MAX_BITS

#define PCMK__ENV_DH_MAX_BITS   "dh_max_bits"

Definition at line 84 of file options_internal.h.

◆ PCMK__ENV_DH_MIN_BITS

#define PCMK__ENV_DH_MIN_BITS   "dh_min_bits"

Definition at line 85 of file options_internal.h.

◆ PCMK__ENV_FAIL_FAST

#define PCMK__ENV_FAIL_FAST   "fail_fast"

Definition at line 86 of file options_internal.h.

◆ PCMK__ENV_IPC_BUFFER

#define PCMK__ENV_IPC_BUFFER   "ipc_buffer"

Definition at line 87 of file options_internal.h.

◆ PCMK__ENV_IPC_TYPE

#define PCMK__ENV_IPC_TYPE   "ipc_type"

Definition at line 88 of file options_internal.h.

◆ PCMK__ENV_LOGFACILITY

#define PCMK__ENV_LOGFACILITY   "logfacility"

Definition at line 89 of file options_internal.h.

◆ PCMK__ENV_LOGFILE

#define PCMK__ENV_LOGFILE   "logfile"

Definition at line 90 of file options_internal.h.

◆ PCMK__ENV_LOGFILE_MODE

#define PCMK__ENV_LOGFILE_MODE   "logfile_mode"

Definition at line 91 of file options_internal.h.

◆ PCMK__ENV_LOGPRIORITY

#define PCMK__ENV_LOGPRIORITY   "logpriority"

Definition at line 92 of file options_internal.h.

◆ PCMK__ENV_MCP

#define PCMK__ENV_MCP   "mcp"

Definition at line 116 of file options_internal.h.

◆ PCMK__ENV_NODE_ACTION_LIMIT

#define PCMK__ENV_NODE_ACTION_LIMIT   "node_action_limit"

Definition at line 93 of file options_internal.h.

◆ PCMK__ENV_NODE_START_STATE

#define PCMK__ENV_NODE_START_STATE   "node_start_state"

Definition at line 94 of file options_internal.h.

◆ PCMK__ENV_PANIC_ACTION

#define PCMK__ENV_PANIC_ACTION   "panic_action"

Definition at line 95 of file options_internal.h.

◆ PCMK__ENV_PHYSICAL_HOST

#define PCMK__ENV_PHYSICAL_HOST   "physical_host"

Definition at line 96 of file options_internal.h.

◆ PCMK__ENV_QUORUM_TYPE

#define PCMK__ENV_QUORUM_TYPE   "quorum_type"

Definition at line 119 of file options_internal.h.

◆ PCMK__ENV_REMOTE_ADDRESS

#define PCMK__ENV_REMOTE_ADDRESS   "remote_address"

Definition at line 97 of file options_internal.h.

◆ PCMK__ENV_REMOTE_PID1

#define PCMK__ENV_REMOTE_PID1   "remote_pid1"

Definition at line 98 of file options_internal.h.

◆ PCMK__ENV_REMOTE_PORT

#define PCMK__ENV_REMOTE_PORT   "remote_port"

Definition at line 99 of file options_internal.h.

◆ PCMK__ENV_RESPAWNED

#define PCMK__ENV_RESPAWNED   "respawned"

Definition at line 100 of file options_internal.h.

◆ PCMK__ENV_SCHEMA_DIRECTORY

#define PCMK__ENV_SCHEMA_DIRECTORY   "schema_directory"

Definition at line 101 of file options_internal.h.

◆ PCMK__ENV_SERVICE

#define PCMK__ENV_SERVICE   "service"

Definition at line 102 of file options_internal.h.

◆ PCMK__ENV_SHUTDOWN_DELAY

#define PCMK__ENV_SHUTDOWN_DELAY   "shutdown_delay"

Definition at line 124 of file options_internal.h.

◆ PCMK__ENV_STDERR

#define PCMK__ENV_STDERR   "stderr"

Definition at line 103 of file options_internal.h.

◆ PCMK__ENV_TLS_PRIORITIES

#define PCMK__ENV_TLS_PRIORITIES   "tls_priorities"

Definition at line 104 of file options_internal.h.

◆ PCMK__ENV_TRACE_BLACKBOX

#define PCMK__ENV_TRACE_BLACKBOX   "trace_blackbox"

Definition at line 105 of file options_internal.h.

◆ PCMK__ENV_TRACE_FILES

#define PCMK__ENV_TRACE_FILES   "trace_files"

Definition at line 106 of file options_internal.h.

◆ PCMK__ENV_TRACE_FORMATS

#define PCMK__ENV_TRACE_FORMATS   "trace_formats"

Definition at line 107 of file options_internal.h.

◆ PCMK__ENV_TRACE_FUNCTIONS

#define PCMK__ENV_TRACE_FUNCTIONS   "trace_functions"

Definition at line 108 of file options_internal.h.

◆ PCMK__ENV_TRACE_TAGS

#define PCMK__ENV_TRACE_TAGS   "trace_tags"

Definition at line 109 of file options_internal.h.

◆ PCMK__ENV_VALGRIND_ENABLED

#define PCMK__ENV_VALGRIND_ENABLED   "valgrind_enabled"

Definition at line 110 of file options_internal.h.

◆ PCMK__META_ALLOW_UNHEALTHY_NODES

#define PCMK__META_ALLOW_UNHEALTHY_NODES   "allow-unhealthy-nodes"

Definition at line 134 of file options_internal.h.

◆ PCMK__OPT_NODE_HEALTH_BASE

#define PCMK__OPT_NODE_HEALTH_BASE   "node-health-base"

Definition at line 127 of file options_internal.h.

◆ PCMK__OPT_NODE_HEALTH_GREEN

#define PCMK__OPT_NODE_HEALTH_GREEN   "node-health-green"

Definition at line 128 of file options_internal.h.

◆ PCMK__OPT_NODE_HEALTH_RED

#define PCMK__OPT_NODE_HEALTH_RED   "node-health-red"

Definition at line 129 of file options_internal.h.

◆ PCMK__OPT_NODE_HEALTH_STRATEGY

#define PCMK__OPT_NODE_HEALTH_STRATEGY   "node-health-strategy"

Definition at line 130 of file options_internal.h.

◆ PCMK__OPT_NODE_HEALTH_YELLOW

#define PCMK__OPT_NODE_HEALTH_YELLOW   "node-health-yellow"

Definition at line 131 of file options_internal.h.

◆ PCMK__VALUE_CLUSTER

#define PCMK__VALUE_CLUSTER   "cluster"

Definition at line 137 of file options_internal.h.

◆ PCMK__VALUE_CUSTOM

#define PCMK__VALUE_CUSTOM   "custom"

Definition at line 138 of file options_internal.h.

◆ PCMK__VALUE_FENCING

#define PCMK__VALUE_FENCING   "fencing"

Definition at line 139 of file options_internal.h.

◆ PCMK__VALUE_GREEN

#define PCMK__VALUE_GREEN   "green"

Definition at line 140 of file options_internal.h.

◆ PCMK__VALUE_LOCAL

#define PCMK__VALUE_LOCAL   "local"

Definition at line 141 of file options_internal.h.

◆ PCMK__VALUE_MIGRATE_ON_RED

#define PCMK__VALUE_MIGRATE_ON_RED   "migrate-on-red"

Definition at line 142 of file options_internal.h.

◆ PCMK__VALUE_NONE

#define PCMK__VALUE_NONE   "none"

Definition at line 143 of file options_internal.h.

◆ PCMK__VALUE_NOTHING

#define PCMK__VALUE_NOTHING   "nothing"

Definition at line 144 of file options_internal.h.

◆ PCMK__VALUE_ONLY_GREEN

#define PCMK__VALUE_ONLY_GREEN   "only-green"

Definition at line 145 of file options_internal.h.

◆ PCMK__VALUE_PROGRESSIVE

#define PCMK__VALUE_PROGRESSIVE   "progressive"

Definition at line 146 of file options_internal.h.

◆ PCMK__VALUE_QUORUM

#define PCMK__VALUE_QUORUM   "quorum"

Definition at line 147 of file options_internal.h.

◆ PCMK__VALUE_RED

#define PCMK__VALUE_RED   "red"

Definition at line 148 of file options_internal.h.

◆ PCMK__VALUE_UNFENCING

#define PCMK__VALUE_UNFENCING   "unfencing"

Definition at line 149 of file options_internal.h.

◆ PCMK__VALUE_YELLOW

#define PCMK__VALUE_YELLOW   "yellow"

Definition at line 150 of file options_internal.h.

Typedef Documentation

◆ pcmk__cluster_option_t

Function Documentation

◆ pcmk__auto_watchdog_timeout()

long pcmk__auto_watchdog_timeout ( void  )

Definition at line 269 of file watchdog.c.

◆ pcmk__cli_help()

_Noreturn void pcmk__cli_help ( char  cmd)

Definition at line 25 of file options.c.

◆ pcmk__cluster_option()

const char* pcmk__cluster_option ( GHashTable *  options,
const pcmk__cluster_option_t option_list,
int  len,
const char *  name 
)

Definition at line 350 of file options.c.

◆ pcmk__env_option()

const char* pcmk__env_option ( const char *  option)

Definition at line 58 of file options.c.

◆ pcmk__env_option_enabled()

bool pcmk__env_option_enabled ( const char *  daemon,
const char *  option 
)

Definition at line 165 of file options.c.

◆ pcmk__format_option_metadata()

gchar* pcmk__format_option_metadata ( const char *  name,
const char *  desc_short,
const char *  desc_long,
pcmk__cluster_option_t option_list,
int  len 
)

Definition at line 426 of file options.c.

◆ pcmk__get_sbd_sync_resource_startup()

bool pcmk__get_sbd_sync_resource_startup ( void  )

Definition at line 246 of file watchdog.c.

◆ pcmk__get_sbd_timeout()

long pcmk__get_sbd_timeout ( void  )

Definition at line 235 of file watchdog.c.

◆ pcmk__set_env_option()

void pcmk__set_env_option ( const char *  option,
const char *  value,
bool  compat 
)

Set or unset a Pacemaker environment variable option.

Set an environment variable option with a "PCMK_" prefix and optionally an "HA_" prefix for backward compatibility.

Parameters
[in]optionEnvironment variable name (without prefix)
[in]valueNew value (or NULL to unset)
[in]compatIf false and value is not NULL, set only "PCMK_<option>"; otherwise, set (or unset) both "PCMK_<option>" and "HA_<option>"
Note
compat is ignored when value is NULL. A NULL value means we're unsetting option. pcmk__get_env_option() checks for both prefixes, so we want to clear them both.

Definition at line 108 of file options.c.

◆ pcmk__valid_boolean()

bool pcmk__valid_boolean ( const char *  value)

Definition at line 187 of file options.c.

◆ pcmk__valid_interval_spec()

bool pcmk__valid_interval_spec ( const char *  value)

Definition at line 180 of file options.c.

◆ pcmk__valid_number()

bool pcmk__valid_number ( const char *  value)

Definition at line 195 of file options.c.

◆ pcmk__valid_percentage()

bool pcmk__valid_percentage ( const char *  value)

Definition at line 251 of file options.c.

◆ pcmk__valid_positive_number()

bool pcmk__valid_positive_number ( const char *  value)

Definition at line 209 of file options.c.

◆ pcmk__valid_quorum()

bool pcmk__valid_quorum ( const char *  value)

Definition at line 218 of file options.c.

◆ pcmk__valid_sbd_timeout()

bool pcmk__valid_sbd_timeout ( const char *  value)

Definition at line 277 of file watchdog.c.

◆ pcmk__valid_script()

bool pcmk__valid_script ( const char *  value)

Definition at line 224 of file options.c.

◆ pcmk__validate_cluster_options()

void pcmk__validate_cluster_options ( GHashTable *  options,
pcmk__cluster_option_t option_list,
int  len 
)

Definition at line 501 of file options.c.