pacemaker  2.1.9-49aab99839
Scalable High-Availability cluster resource manager
Data Structures | Macros | Typedefs | Enumerations | Functions
internal.h File Reference
#include <crm/cib.h>
#include <crm/common/ipc_internal.h>
#include <crm/common/output_internal.h>
Include dependency graph for internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cib__operation_s
 
struct  cib_notify_client_s
 
struct  cib_callback_client_s
 
struct  timer_rec_s
 

Macros

#define PCMK__CIB_REQUEST_SECONDARY   "cib_slave"
 
#define PCMK__CIB_REQUEST_PRIMARY   "cib_master"
 
#define PCMK__CIB_REQUEST_SYNC_TO_ALL   "cib_sync"
 
#define PCMK__CIB_REQUEST_SYNC_TO_ONE   "cib_sync_one"
 
#define PCMK__CIB_REQUEST_IS_PRIMARY   "cib_ismaster"
 
#define PCMK__CIB_REQUEST_BUMP   "cib_bump"
 
#define PCMK__CIB_REQUEST_QUERY   "cib_query"
 
#define PCMK__CIB_REQUEST_CREATE   "cib_create"
 
#define PCMK__CIB_REQUEST_MODIFY   "cib_modify"
 
#define PCMK__CIB_REQUEST_DELETE   "cib_delete"
 
#define PCMK__CIB_REQUEST_ERASE   "cib_erase"
 
#define PCMK__CIB_REQUEST_REPLACE   "cib_replace"
 
#define PCMK__CIB_REQUEST_APPLY_PATCH   "cib_apply_diff"
 
#define PCMK__CIB_REQUEST_UPGRADE   "cib_upgrade"
 
#define PCMK__CIB_REQUEST_ABS_DELETE   "cib_delete_alt"
 
#define PCMK__CIB_REQUEST_NOOP   "noop"
 
#define PCMK__CIB_REQUEST_SHUTDOWN   "cib_shutdown_req"
 
#define PCMK__CIB_REQUEST_COMMIT_TRANSACT   "cib_commit_transact"
 
#define PCMK__CIB_REQUEST_SCHEMAS   "cib_schemas"
 
#define cib__set_call_options(cib_call_opts, call_for, flags_to_set)
 
#define cib__clear_call_options(cib_call_opts, call_for, flags_to_clear)
 

Typedefs

typedef int(* cib__op_fn_t) (const char *, int, const char *, xmlNode *, xmlNode *, xmlNode *, xmlNode **, xmlNode **)
 
typedef struct cib__operation_s cib__operation_t
 
typedef struct cib_notify_client_s cib_notify_client_t
 
typedef struct cib_callback_client_s cib_callback_client_t
 

Enumerations

enum  cib__op_attr {
  cib__op_attr_none = 0, cib__op_attr_modifies = (1 << 1), cib__op_attr_privileged = (1 << 2), cib__op_attr_local = (1 << 3),
  cib__op_attr_replaces = (1 << 4), cib__op_attr_writes_through = (1 << 5), cib__op_attr_transaction = (1 << 6)
}
 
enum  cib__op_type {
  cib__op_abs_delete, cib__op_apply_patch, cib__op_bump, cib__op_commit_transact,
  cib__op_create, cib__op_delete, cib__op_erase, cib__op_is_primary,
  cib__op_modify, cib__op_noop, cib__op_ping, cib__op_primary,
  cib__op_query, cib__op_replace, cib__op_secondary, cib__op_shutdown,
  cib__op_sync_all, cib__op_sync_one, cib__op_upgrade, cib__op_schemas
}
 

Functions

gboolean cib_diff_version_details (xmlNode *diff, int *admin_epoch, int *epoch, int *updates, int *_admin_epoch, int *_epoch, int *_updates)
 
gboolean cib_read_config (GHashTable *options, xmlNode *current_cib)
 
cib_tcib_new_variant (void)
 
int cib__get_notify_patchset (const xmlNode *msg, const xmlNode **patchset)
 
bool cib__element_in_patchset (const xmlNode *patchset, const char *element)
 
int cib_perform_op (cib_t *cib, const char *op, uint32_t call_options, cib__op_fn_t fn, bool is_query, const char *section, xmlNode *req, xmlNode *input, bool manage_counters, bool *config_changed, xmlNode **current_cib, xmlNode **result_cib, xmlNode **diff, xmlNode **output)
 
int cib__create_op (cib_t *cib, const char *op, const char *host, const char *section, xmlNode *data, int call_options, const char *user_name, const char *client_name, xmlNode **op_msg)
 
int cib__extend_transaction (cib_t *cib, xmlNode *request)
 
void cib_native_callback (cib_t *cib, xmlNode *msg, int call_id, int rc)
 
void cib_native_notify (gpointer data, gpointer user_data)
 
int cib__get_operation (const char *op, const cib__operation_t **operation)
 
int cib_process_query (const char *op, int options, const char *section, xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
 
int cib_process_erase (const char *op, int options, const char *section, xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
 
int cib_process_bump (const char *op, int options, const char *section, xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
 
int cib_process_replace (const char *op, int options, const char *section, xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
 
int cib_process_create (const char *op, int options, const char *section, xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
 
int cib_process_modify (const char *op, int options, const char *section, xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
 
int cib_process_delete (const char *op, int options, const char *section, xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
 
int cib_process_diff (const char *op, int options, const char *section, xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
 
int cib_process_upgrade (const char *op, int options, const char *section, xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
 
int cib_process_xpath (const char *op, int options, const char *section, const xmlNode *req, xmlNode *input, xmlNode *existing_cib, xmlNode **result_cib, xmlNode **answer)
 
bool cib__config_changed_v1 (xmlNode *last, xmlNode *next, xmlNode **diff)
 
int cib_internal_op (cib_t *cib, const char *op, const char *host, const char *section, xmlNode *data, xmlNode **output_data, int call_options, const char *user_name)
 
int cib_file_read_and_verify (const char *filename, const char *sigfile, xmlNode **root)
 
int cib_file_write_with_digest (xmlNode *cib_root, const char *cib_dirname, const char *cib_filename)
 
void cib__set_output (cib_t *cib, pcmk__output_t *out)
 
cib_callback_client_tcib__lookup_id (int call_id)
 
int cib__signon_query (pcmk__output_t *out, cib_t **cib, xmlNode **cib_object)
 
int cib__signon_attempts (cib_t *cib, const char *name, enum cib_conn_type type, int attempts)
 
int cib__clean_up_connection (cib_t **cib)
 
int cib__update_node_attr (pcmk__output_t *out, cib_t *cib, int call_options, const char *section, const char *node_uuid, const char *set_type, const char *set_name, const char *attr_id, const char *attr_name, const char *attr_value, const char *user_name, const char *node_type)
 
int cib__get_node_attrs (pcmk__output_t *out, cib_t *cib, const char *section, const char *node_uuid, const char *set_type, const char *set_name, const char *attr_id, const char *attr_name, const char *user_name, xmlNode **result)
 
int cib__delete_node_attr (pcmk__output_t *out, cib_t *cib, int options, const char *section, const char *node_uuid, const char *set_type, const char *set_name, const char *attr_id, const char *attr_name, const char *attr_value, const char *user_name)
 

Macro Definition Documentation

◆ cib__clear_call_options

#define cib__clear_call_options (   cib_call_opts,
  call_for,
  flags_to_clear 
)
Value:
do { \
cib_call_opts = pcmk__clear_flags_as(__func__, __LINE__, \
LOG_TRACE, "CIB call", (call_for), (cib_call_opts), \
(flags_to_clear), #flags_to_clear); \
} while (0)
#define LOG_TRACE
Definition: logging.h:38

Definition at line 124 of file internal.h.

◆ cib__set_call_options

#define cib__set_call_options (   cib_call_opts,
  call_for,
  flags_to_set 
)
Value:
do { \
cib_call_opts = pcmk__set_flags_as(__func__, __LINE__, \
LOG_TRACE, "CIB call", (call_for), (cib_call_opts), \
(flags_to_set), #flags_to_set); \
} while (0)
#define LOG_TRACE
Definition: logging.h:38

Definition at line 118 of file internal.h.

◆ PCMK__CIB_REQUEST_ABS_DELETE

#define PCMK__CIB_REQUEST_ABS_DELETE   "cib_delete_alt"

Definition at line 31 of file internal.h.

◆ PCMK__CIB_REQUEST_APPLY_PATCH

#define PCMK__CIB_REQUEST_APPLY_PATCH   "cib_apply_diff"

Definition at line 29 of file internal.h.

◆ PCMK__CIB_REQUEST_BUMP

#define PCMK__CIB_REQUEST_BUMP   "cib_bump"

Definition at line 22 of file internal.h.

◆ PCMK__CIB_REQUEST_COMMIT_TRANSACT

#define PCMK__CIB_REQUEST_COMMIT_TRANSACT   "cib_commit_transact"

Definition at line 34 of file internal.h.

◆ PCMK__CIB_REQUEST_CREATE

#define PCMK__CIB_REQUEST_CREATE   "cib_create"

Definition at line 24 of file internal.h.

◆ PCMK__CIB_REQUEST_DELETE

#define PCMK__CIB_REQUEST_DELETE   "cib_delete"

Definition at line 26 of file internal.h.

◆ PCMK__CIB_REQUEST_ERASE

#define PCMK__CIB_REQUEST_ERASE   "cib_erase"

Definition at line 27 of file internal.h.

◆ PCMK__CIB_REQUEST_IS_PRIMARY

#define PCMK__CIB_REQUEST_IS_PRIMARY   "cib_ismaster"

Definition at line 21 of file internal.h.

◆ PCMK__CIB_REQUEST_MODIFY

#define PCMK__CIB_REQUEST_MODIFY   "cib_modify"

Definition at line 25 of file internal.h.

◆ PCMK__CIB_REQUEST_NOOP

#define PCMK__CIB_REQUEST_NOOP   "noop"

Definition at line 32 of file internal.h.

◆ PCMK__CIB_REQUEST_PRIMARY

#define PCMK__CIB_REQUEST_PRIMARY   "cib_master"

Definition at line 18 of file internal.h.

◆ PCMK__CIB_REQUEST_QUERY

#define PCMK__CIB_REQUEST_QUERY   "cib_query"

Definition at line 23 of file internal.h.

◆ PCMK__CIB_REQUEST_REPLACE

#define PCMK__CIB_REQUEST_REPLACE   "cib_replace"

Definition at line 28 of file internal.h.

◆ PCMK__CIB_REQUEST_SCHEMAS

#define PCMK__CIB_REQUEST_SCHEMAS   "cib_schemas"

Definition at line 35 of file internal.h.

◆ PCMK__CIB_REQUEST_SECONDARY

#define PCMK__CIB_REQUEST_SECONDARY   "cib_slave"

Definition at line 17 of file internal.h.

◆ PCMK__CIB_REQUEST_SHUTDOWN

#define PCMK__CIB_REQUEST_SHUTDOWN   "cib_shutdown_req"

Definition at line 33 of file internal.h.

◆ PCMK__CIB_REQUEST_SYNC_TO_ALL

#define PCMK__CIB_REQUEST_SYNC_TO_ALL   "cib_sync"

Definition at line 19 of file internal.h.

◆ PCMK__CIB_REQUEST_SYNC_TO_ONE

#define PCMK__CIB_REQUEST_SYNC_TO_ONE   "cib_sync_one"

Definition at line 20 of file internal.h.

◆ PCMK__CIB_REQUEST_UPGRADE

#define PCMK__CIB_REQUEST_UPGRADE   "cib_upgrade"

Definition at line 30 of file internal.h.

Typedef Documentation

◆ cib__op_fn_t

typedef int(* cib__op_fn_t) (const char *, int, const char *, xmlNode *, xmlNode *, xmlNode *, xmlNode **, xmlNode **)

Definition at line 85 of file internal.h.

◆ cib__operation_t

◆ cib_callback_client_t

◆ cib_notify_client_t

Enumeration Type Documentation

◆ cib__op_attr

Enumerator
cib__op_attr_none 

No special attributes.

cib__op_attr_modifies 

Modifies CIB.

cib__op_attr_privileged 

Requires privileges.

cib__op_attr_local 

Must only be processed locally.

cib__op_attr_replaces 

Replaces CIB.

cib__op_attr_writes_through 

Writes to disk on success.

cib__op_attr_transaction 

Supported in a transaction.

Definition at line 42 of file internal.h.

◆ cib__op_type

Enumerator
cib__op_abs_delete 
cib__op_apply_patch 
cib__op_bump 
cib__op_commit_transact 
cib__op_create 
cib__op_delete 
cib__op_erase 
cib__op_is_primary 
cib__op_modify 
cib__op_noop 
cib__op_ping 
cib__op_primary 
cib__op_query 
cib__op_replace 
cib__op_secondary 
cib__op_shutdown 
cib__op_sync_all 
cib__op_sync_one 
cib__op_upgrade 
cib__op_schemas 

Definition at line 57 of file internal.h.

Function Documentation

◆ cib__clean_up_connection()

int cib__clean_up_connection ( cib_t **  cib)

Definition at line 1051 of file cib_utils.c.

◆ cib__config_changed_v1()

bool cib__config_changed_v1 ( xmlNode *  last,
xmlNode *  next,
xmlNode **  diff 
)

Definition at line 692 of file cib_ops.c.

◆ cib__create_op()

int cib__create_op ( cib_t cib,
const char *  op,
const char *  host,
const char *  section,
xmlNode *  data,
int  call_options,
const char *  user_name,
const char *  client_name,
xmlNode **  op_msg 
)

Definition at line 661 of file cib_utils.c.

◆ cib__delete_node_attr()

int cib__delete_node_attr ( pcmk__output_t out,
cib_t cib,
int  options,
const char *  section,
const char *  node_uuid,
const char *  set_type,
const char *  set_name,
const char *  attr_id,
const char *  attr_name,
const char *  attr_value,
const char *  user_name 
)

Definition at line 371 of file cib_attrs.c.

◆ cib__element_in_patchset()

bool cib__element_in_patchset ( const xmlNode *  patchset,
const char *  element 
)

Definition at line 199 of file cib_utils.c.

◆ cib__extend_transaction()

int cib__extend_transaction ( cib_t cib,
xmlNode *  request 
)

Definition at line 744 of file cib_utils.c.

◆ cib__get_node_attrs()

int cib__get_node_attrs ( pcmk__output_t out,
cib_t cib,
const char *  section,
const char *  node_uuid,
const char *  set_type,
const char *  set_name,
const char *  attr_id,
const char *  attr_name,
const char *  user_name,
xmlNode **  result 
)

Definition at line 345 of file cib_attrs.c.

◆ cib__get_notify_patchset()

int cib__get_notify_patchset ( const xmlNode *  msg,
const xmlNode **  patchset 
)

Definition at line 75 of file cib_utils.c.

◆ cib__get_operation()

int cib__get_operation ( const char *  op,
const cib__operation_t **  operation 
)

Definition at line 144 of file cib_ops.c.

◆ cib__lookup_id()

cib_callback_client_t* cib__lookup_id ( int  call_id)

Definition at line 818 of file cib_client.c.

◆ cib__set_output()

void cib__set_output ( cib_t cib,
pcmk__output_t out 
)

Definition at line 684 of file cib_remote.c.

◆ cib__signon_attempts()

int cib__signon_attempts ( cib_t cib,
const char *  name,
enum cib_conn_type  type,
int  attempts 
)

Definition at line 1024 of file cib_utils.c.

◆ cib__signon_query()

int cib__signon_query ( pcmk__output_t out,
cib_t **  cib,
xmlNode **  cib_object 
)

Definition at line 970 of file cib_utils.c.

◆ cib__update_node_attr()

int cib__update_node_attr ( pcmk__output_t out,
cib_t cib,
int  call_options,
const char *  section,
const char *  node_uuid,
const char *  set_type,
const char *  set_name,
const char *  attr_id,
const char *  attr_name,
const char *  attr_value,
const char *  user_name,
const char *  node_type 
)

Definition at line 164 of file cib_attrs.c.

◆ cib_diff_version_details()

gboolean cib_diff_version_details ( xmlNode *  diff,
int *  admin_epoch,
int *  epoch,
int *  updates,
int *  _admin_epoch,
int *  _epoch,
int *  _updates 
)

Definition at line 46 of file cib_utils.c.

◆ cib_file_read_and_verify()

int cib_file_read_and_verify ( const char *  filename,
const char *  sigfile,
xmlNode **  root 
)

Definition at line 762 of file cib_file.c.

◆ cib_file_write_with_digest()

int cib_file_write_with_digest ( xmlNode *  cib_root,
const char *  cib_dirname,
const char *  cib_filename 
)

Definition at line 934 of file cib_file.c.

◆ cib_internal_op()

int cib_internal_op ( cib_t cib,
const char *  op,
const char *  host,
const char *  section,
xmlNode *  data,
xmlNode **  output_data,
int  call_options,
const char *  user_name 
)

Definition at line 884 of file cib_utils.c.

◆ cib_native_callback()

void cib_native_callback ( cib_t cib,
xmlNode *  msg,
int  call_id,
int  rc 
)

Definition at line 772 of file cib_utils.c.

◆ cib_native_notify()

void cib_native_notify ( gpointer  data,
gpointer  user_data 
)

Definition at line 824 of file cib_utils.c.

◆ cib_new_variant()

cib_t* cib_new_variant ( void  )

Definition at line 656 of file cib_client.c.

◆ cib_perform_op()

int cib_perform_op ( cib_t cib,
const char *  op,
uint32_t  call_options,
cib__op_fn_t  fn,
bool  is_query,
const char *  section,
xmlNode *  req,
xmlNode *  input,
bool  manage_counters,
bool *  config_changed,
xmlNode **  current_cib,
xmlNode **  result_cib,
xmlNode **  diff,
xmlNode **  output 
)

Definition at line 332 of file cib_utils.c.

◆ cib_process_bump()

int cib_process_bump ( const char *  op,
int  options,
const char *  section,
xmlNode *  req,
xmlNode *  input,
xmlNode *  existing_cib,
xmlNode **  result_cib,
xmlNode **  answer 
)

Definition at line 289 of file cib_ops.c.

◆ cib_process_create()

int cib_process_create ( const char *  op,
int  options,
const char *  section,
xmlNode *  req,
xmlNode *  input,
xmlNode *  existing_cib,
xmlNode **  result_cib,
xmlNode **  answer 
)

Definition at line 602 of file cib_ops.c.

◆ cib_process_delete()

int cib_process_delete ( const char *  op,
int  options,
const char *  section,
xmlNode *  req,
xmlNode *  input,
xmlNode *  existing_cib,
xmlNode **  result_cib,
xmlNode **  answer 
)

Definition at line 429 of file cib_ops.c.

◆ cib_process_diff()

int cib_process_diff ( const char *  op,
int  options,
const char *  section,
xmlNode *  req,
xmlNode *  input,
xmlNode *  existing_cib,
xmlNode **  result_cib,
xmlNode **  answer 
)

Definition at line 669 of file cib_ops.c.

◆ cib_process_erase()

int cib_process_erase ( const char *  op,
int  options,
const char *  section,
xmlNode *  req,
xmlNode *  input,
xmlNode *  existing_cib,
xmlNode **  result_cib,
xmlNode **  answer 
)

Definition at line 241 of file cib_ops.c.

◆ cib_process_modify()

int cib_process_modify ( const char *  op,
int  options,
const char *  section,
xmlNode *  req,
xmlNode *  input,
xmlNode *  existing_cib,
xmlNode **  result_cib,
xmlNode **  answer 
)

Definition at line 457 of file cib_ops.c.

◆ cib_process_query()

int cib_process_query ( const char *  op,
int  options,
const char *  section,
xmlNode *  req,
xmlNode *  input,
xmlNode *  existing_cib,
xmlNode **  result_cib,
xmlNode **  answer 
)

Definition at line 168 of file cib_ops.c.

◆ cib_process_replace()

int cib_process_replace ( const char *  op,
int  options,
const char *  section,
xmlNode *  req,
xmlNode *  input,
xmlNode *  existing_cib,
xmlNode **  result_cib,
xmlNode **  answer 
)

Definition at line 304 of file cib_ops.c.

◆ cib_process_upgrade()

int cib_process_upgrade ( const char *  op,
int  options,
const char *  section,
xmlNode *  req,
xmlNode *  input,
xmlNode *  existing_cib,
xmlNode **  result_cib,
xmlNode **  answer 
)

Definition at line 260 of file cib_ops.c.

◆ cib_process_xpath()

int cib_process_xpath ( const char *  op,
int  options,
const char *  section,
const xmlNode *  req,
xmlNode *  input,
xmlNode *  existing_cib,
xmlNode **  result_cib,
xmlNode **  answer 
)

Definition at line 763 of file cib_ops.c.

◆ cib_read_config()

gboolean cib_read_config ( GHashTable *  options,
xmlNode *  current_cib 
)

Definition at line 856 of file cib_utils.c.