pacemaker
2.1.9-49aab99839
Scalable High-Availability cluster resource manager
|
#include <unistd.h>
#include <stdbool.h>
#include <stdint.h>
#include <glib.h>
#include <libxml/tree.h>
#include <crm/common/util.h>
#include <crm/common/logging.h>
#include <crm/common/mainloop.h>
#include <crm/common/actions_internal.h>
#include <crm/common/digests_internal.h>
#include <crm/common/health_internal.h>
#include <crm/common/io_internal.h>
#include <crm/common/iso8601_internal.h>
#include <crm/common/results_internal.h>
#include <crm/common/messages_internal.h>
#include <crm/common/nvpair_internal.h>
#include <crm/common/scores_internal.h>
#include <crm/common/strings_internal.h>
#include <crm/common/acl_internal.h>
Go to the source code of this file.
Macros | |
#define | PCMK__NELEM(a) ((int) (sizeof(a)/sizeof(a[0])) ) |
#define | pcmk__assert_alloc(nmemb, size) pcmk__assert_alloc_as(__FILE__, __func__, __LINE__, nmemb, size) |
#define | PCMK__FAIL_COUNT_PREFIX "fail-count" |
#define | PCMK__LAST_FAILURE_PREFIX "last-failure" |
Functions | |
int | pcmk__add_mainloop_ipc (crm_ipc_t *ipc, int priority, void *userdata, const struct ipc_client_callbacks *callbacks, mainloop_io_t **source) |
Connect to IPC and add it as a main loop source. More... | |
guint | pcmk__mainloop_timer_get_period (const mainloop_timer_t *timer) |
Get period for mainloop timer. More... | |
void | pcmk__xe_add_node (xmlNode *xml, const char *node, int nodeid) |
int | pcmk__scan_nvpair (const char *input, char **name, char **value) |
char * | pcmk__format_nvpair (const char *name, const char *value, const char *units) |
void | pcmk__xe_set_bool_attr (xmlNodePtr node, const char *name, bool value) |
bool | pcmk__xe_attr_is_true (const xmlNode *node, const char *name) |
int | pcmk__xe_get_bool_attr (const xmlNode *node, const char *name, bool *value) |
pid_t | pcmk__procfs_pid_of (const char *name) |
unsigned int | pcmk__procfs_num_cores (void) |
int | pcmk__procfs_pid2path (pid_t pid, char path[], size_t path_size) |
bool | pcmk__procfs_has_pids (void) |
int | pcmk__pid_active (pid_t pid, const char *daemon) |
int | pcmk__read_pidfile (const char *filename, pid_t *pid) |
int | pcmk__pidfile_matches (const char *filename, pid_t expected_pid, const char *expected_name, pid_t *pid) |
int | pcmk__lock_pidfile (const char *filename, const char *name) |
void | pcmk__daemonize (const char *name, const char *pidfile) |
void | pcmk__panic (const char *origin) |
pid_t | pcmk__locate_sbd (void) |
void | pcmk__sleep_ms (unsigned int ms) |
int | pcmk__effective_rc (int rc) |
Variables | |
bool | pcmk__is_daemon |
char * | pcmk__our_nodename |
Node name of the local node. More... | |
int | pcmk__score_red |
int | pcmk__score_green |
int | pcmk__score_yellow |
#define pcmk__assert_alloc | ( | nmemb, | |
size | |||
) | pcmk__assert_alloc_as(__FILE__, __func__, __LINE__, nmemb, size) |
Definition at line 297 of file internal.h.
#define PCMK__FAIL_COUNT_PREFIX "fail-count" |
Definition at line 350 of file internal.h.
#define PCMK__LAST_FAILURE_PREFIX "last-failure" |
Definition at line 351 of file internal.h.
#define PCMK__NELEM | ( | a | ) | ((int) (sizeof(a)/sizeof(a[0])) ) |
Definition at line 48 of file internal.h.
int pcmk__add_mainloop_ipc | ( | crm_ipc_t * | ipc, |
int | priority, | ||
void * | userdata, | ||
const struct ipc_client_callbacks * | callbacks, | ||
mainloop_io_t ** | source | ||
) |
Connect to IPC and add it as a main loop source.
[in,out] | ipc | IPC connection to add |
[in] | priority | Event source priority to use for connection |
[in] | userdata | Data to register with callbacks |
[in] | callbacks | Dispatch and destroy callbacks for connection |
[out] | source | Newly allocated event source |
Definition at line 863 of file mainloop.c.
void pcmk__daemonize | ( | const char * | name, |
const char * | pidfile | ||
) |
char* pcmk__format_nvpair | ( | const char * | name, |
const char * | value, | ||
const char * | units | ||
) |
pid_t pcmk__locate_sbd | ( | void | ) |
Definition at line 202 of file watchdog.c.
int pcmk__lock_pidfile | ( | const char * | filename, |
const char * | name | ||
) |
guint pcmk__mainloop_timer_get_period | ( | const mainloop_timer_t * | timer | ) |
Get period for mainloop timer.
[in] | timer | Timer |
Definition at line 909 of file mainloop.c.
void pcmk__panic | ( | const char * | origin | ) |
Definition at line 169 of file watchdog.c.
int pcmk__pidfile_matches | ( | const char * | filename, |
pid_t | expected_pid, | ||
const char * | expected_name, | ||
pid_t * | pid | ||
) |
int pcmk__procfs_pid2path | ( | pid_t | pid, |
char | path[], | ||
size_t | path_size | ||
) |
int pcmk__scan_nvpair | ( | const char * | input, |
char ** | name, | ||
char ** | value | ||
) |
void pcmk__xe_add_node | ( | xmlNode * | xml, |
const char * | node, | ||
int | nodeid | ||
) |
bool pcmk__xe_attr_is_true | ( | const xmlNode * | node, |
const char * | name | ||
) |
int pcmk__xe_get_bool_attr | ( | const xmlNode * | node, |
const char * | name, | ||
bool * | value | ||
) |
void pcmk__xe_set_bool_attr | ( | xmlNodePtr | node, |
const char * | name, | ||
bool | value | ||
) |