pacemaker  2.1.5-b7adf64e51
Scalable High-Availability cluster resource manager
Macros | Functions
pcmk_cluster_queries.c File Reference
#include <crm_internal.h>
#include <glib.h>
#include <libxml/tree.h>
#include <pacemaker.h>
#include <pacemaker-internal.h>
#include <crm/crm.h>
#include <crm/cib.h>
#include <crm/cib/internal.h>
#include <crm/msg_xml.h>
#include <crm/common/output_internal.h>
#include <crm/common/xml.h>
#include <crm/common/xml_internal.h>
#include <crm/common/iso8601.h>
#include <crm/common/ipc_controld.h>
#include <crm/common/ipc_pacemakerd.h>
#include <crm/common/mainloop.h>
Include dependency graph for pcmk_cluster_queries.c:

Go to the source code of this file.

Macros

#define DEFAULT_MESSAGE_TIMEOUT_MS   30000
 

Functions

int pcmk__controller_status (pcmk__output_t *out, char *dest_node, guint message_timeout_ms)
 
int pcmk_controller_status (xmlNodePtr *xml, char *dest_node, unsigned int message_timeout_ms)
 Get controller status. More...
 
int pcmk__designated_controller (pcmk__output_t *out, guint message_timeout_ms)
 
int pcmk_designated_controller (xmlNodePtr *xml, unsigned int message_timeout_ms)
 Get designated controller. More...
 
int pcmk__pacemakerd_status (pcmk__output_t *out, const char *ipc_name, guint message_timeout_ms, enum pcmk_pacemakerd_state *state)
 
int pcmk_pacemakerd_status (xmlNodePtr *xml, const char *ipc_name, unsigned int message_timeout_ms)
 Get and output pacemakerd status. More...
 
int pcmk__list_nodes (pcmk__output_t *out, char *node_types, gboolean bash_export)
 
int pcmk_list_nodes (xmlNodePtr *xml, char *node_types)
 Get nodes list. More...
 

Macro Definition Documentation

◆ DEFAULT_MESSAGE_TIMEOUT_MS

#define DEFAULT_MESSAGE_TIMEOUT_MS   30000

Definition at line 30 of file pcmk_cluster_queries.c.

Function Documentation

◆ pcmk__controller_status()

int pcmk__controller_status ( pcmk__output_t out,
char *  dest_node,
guint  message_timeout_ms 
)

Definition at line 288 of file pcmk_cluster_queries.c.

◆ pcmk__designated_controller()

int pcmk__designated_controller ( pcmk__output_t out,
guint  message_timeout_ms 
)

Definition at line 345 of file pcmk_cluster_queries.c.

◆ pcmk__list_nodes()

int pcmk__list_nodes ( pcmk__output_t out,
char *  node_types,
gboolean  bash_export 
)

Definition at line 514 of file pcmk_cluster_queries.c.

◆ pcmk__pacemakerd_status()

int pcmk__pacemakerd_status ( pcmk__output_t out,
const char *  ipc_name,
guint  message_timeout_ms,
enum pcmk_pacemakerd_state state 
)

Definition at line 425 of file pcmk_cluster_queries.c.

◆ pcmk_controller_status()

int pcmk_controller_status ( xmlNodePtr *  xml,
char *  dest_node,
unsigned int  message_timeout_ms 
)

Get controller status.

Parameters
[in,out]xmlThe destination for the result, as an XML tree.
[in]dest_nodeDestination node for request
[in]message_timeout_msMessage timeout
Returns
Standard Pacemaker return code

Definition at line 327 of file pcmk_cluster_queries.c.

◆ pcmk_designated_controller()

int pcmk_designated_controller ( xmlNodePtr *  xml,
unsigned int  message_timeout_ms 
)

Get designated controller.

Parameters
[in,out]xmlThe destination for the result, as an XML tree.
[in]message_timeout_msMessage timeout
Returns
Standard Pacemaker return code

Definition at line 384 of file pcmk_cluster_queries.c.

◆ pcmk_list_nodes()

int pcmk_list_nodes ( xmlNodePtr *  xml,
char *  node_types 
)

Get nodes list.

Parameters
[in,out]xmlThe destination for the result, as an XML tree.
[in]node_typesNode type(s) to return (default: all)
Returns
Standard Pacemaker return code

Definition at line 568 of file pcmk_cluster_queries.c.

◆ pcmk_pacemakerd_status()

int pcmk_pacemakerd_status ( xmlNodePtr *  xml,
const char *  ipc_name,
unsigned int  message_timeout_ms 
)

Get and output pacemakerd status.

Parameters
[in,out]xmlDestination for the result, as an XML tree
[in]ipc_nameIPC name for request
[in]message_timeout_msHow long to wait for a reply from the pacemakerd API. If 0, pcmk_ipc_dispatch_sync will be used. If positive, pcmk_ipc_dispatch_main will be used, and a new mainloop will be created for this purpose (freed before return).
Returns
Standard Pacemaker return code

Definition at line 468 of file pcmk_cluster_queries.c.