pacemaker  2.1.9-49aab99839
Scalable High-Availability cluster resource manager
Functions
ipc_controld.c File Reference
#include <crm_internal.h>
#include <errno.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <libxml/tree.h>
#include <crm/crm.h>
#include <crm/common/xml.h>
#include <crm/common/ipc.h>
#include <crm/common/ipc_internal.h>
#include <crm/common/ipc_controld.h>
#include "crmcommon_private.h"
Include dependency graph for ipc_controld.c:

Go to the source code of this file.

Functions

const char * pcmk__controld_api_reply2str (enum pcmk_controld_api_reply reply)
 
pcmk__ipc_methods_tpcmk__controld_api_methods (void)
 
int pcmk_controld_api_reprobe (pcmk_ipc_api_t *api, const char *target_node, const char *router_node)
 Send a reprobe controller operation. More...
 
int pcmk_controld_api_node_info (pcmk_ipc_api_t *api, uint32_t nodeid)
 Send a "node info" controller operation. More...
 
int pcmk_controld_api_ping (pcmk_ipc_api_t *api, const char *node_name)
 Ask the controller for status. More...
 
int pcmk_controld_api_list_nodes (pcmk_ipc_api_t *api)
 Ask the controller for cluster information. More...
 
int pcmk_controld_api_fail (pcmk_ipc_api_t *api, const char *target_node, const char *router_node, const char *rsc_id, const char *rsc_long_id, const char *standard, const char *provider, const char *type)
 Ask the controller to fail a resource. More...
 
int pcmk_controld_api_refresh (pcmk_ipc_api_t *api, const char *target_node, const char *router_node, const char *rsc_id, const char *rsc_long_id, const char *standard, const char *provider, const char *type, bool cib_only)
 Ask the controller to refresh a resource. More...
 
unsigned int pcmk_controld_api_replies_expected (const pcmk_ipc_api_t *api)
 Get the number of IPC replies currently expected from the controller. More...
 
xmlNode * create_hello_message (const char *uuid, const char *client_name, const char *major_version, const char *minor_version)
 Create XML for a controller IPC "hello" message. More...
 

Function Documentation

◆ create_hello_message()

xmlNode* create_hello_message ( const char *  uuid,
const char *  client_name,
const char *  major_version,
const char *  minor_version 
)

Create XML for a controller IPC "hello" message.

Deprecated:
This function is deprecated as part of the public C API.

Definition at line 627 of file ipc_controld.c.

◆ pcmk__controld_api_methods()

pcmk__ipc_methods_t* pcmk__controld_api_methods ( void  )

Definition at line 292 of file ipc_controld.c.

◆ pcmk__controld_api_reply2str()

const char* pcmk__controld_api_reply2str ( enum pcmk_controld_api_reply  reply)

Definition at line 41 of file ipc_controld.c.

◆ pcmk_controld_api_fail()

int pcmk_controld_api_fail ( pcmk_ipc_api_t api,
const char *  target_node,
const char *  router_node,
const char *  rsc_id,
const char *  rsc_long_id,
const char *  standard,
const char *  provider,
const char *  type 
)

Ask the controller to fail a resource.

Parameters
[in,out]apiController connection
[in]target_nodeName of node resource is on
[in]router_nodeRouter node for target
[in]rsc_idID of resource to fail
[in]rsc_long_idLong ID of resource (if any)
[in]standardStandard of resource
[in]providerProvider of resource (if any)
[in]typeType of resource to fail
Returns
Standard Pacemaker return code
Note
Event callback will get a reply of type pcmk_controld_reply_resource.

Definition at line 556 of file ipc_controld.c.

◆ pcmk_controld_api_list_nodes()

int pcmk_controld_api_list_nodes ( pcmk_ipc_api_t api)

Ask the controller for cluster information.

Parameters
[in,out]apiController connection
Returns
Standard Pacemaker return code
Note
Event callback will get a reply of type pcmk_controld_reply_nodes.

Definition at line 464 of file ipc_controld.c.

◆ pcmk_controld_api_node_info()

int pcmk_controld_api_node_info ( pcmk_ipc_api_t api,
uint32_t  nodeid 
)

Send a "node info" controller operation.

Parameters
[in,out]apiController connection
[in]nodeidID of node to get info for (or 0 for local node)
Returns
Standard Pacemaker return code
Note
Event callback will get a reply of type pcmk_controld_reply_info.

Definition at line 413 of file ipc_controld.c.

◆ pcmk_controld_api_ping()

int pcmk_controld_api_ping ( pcmk_ipc_api_t api,
const char *  node_name 
)

Ask the controller for status.

Parameters
[in,out]apiController connection
[in]node_nameName of node whose status is desired (NULL for DC)
Returns
Standard Pacemaker return code
Note
Event callback will get a reply of type pcmk_controld_reply_ping.

Definition at line 441 of file ipc_controld.c.

◆ pcmk_controld_api_refresh()

int pcmk_controld_api_refresh ( pcmk_ipc_api_t api,
const char *  target_node,
const char *  router_node,
const char *  rsc_id,
const char *  rsc_long_id,
const char *  standard,
const char *  provider,
const char *  type,
bool  cib_only 
)

Ask the controller to refresh a resource.

Parameters
[in,out]apiController connection
[in]target_nodeName of node resource is on
[in]router_nodeRouter node for target
[in]rsc_idID of resource to refresh
[in]rsc_long_idLong ID of resource (if any)
[in]standardStandard of resource
[in]providerProvider of resource (if any)
[in]typeType of resource
[in]cib_onlyIf true, clean resource from CIB only
Returns
Standard Pacemaker return code
Note
Event callback will get a reply of type pcmk_controld_reply_resource.

Definition at line 589 of file ipc_controld.c.

◆ pcmk_controld_api_replies_expected()

unsigned int pcmk_controld_api_replies_expected ( const pcmk_ipc_api_t api)

Get the number of IPC replies currently expected from the controller.

Parameters
[in]apiController IPC API connection
Returns
Number of replies expected

Definition at line 613 of file ipc_controld.c.

◆ pcmk_controld_api_reprobe()

int pcmk_controld_api_reprobe ( pcmk_ipc_api_t api,
const char *  target_node,
const char *  router_node 
)

Send a reprobe controller operation.

Parameters
[in,out]apiController connection
[in]target_nodeName of node to reprobe
[in]router_nodeRouter node for host
Returns
Standard Pacemaker return code
Note
Event callback will get a reply of type pcmk_controld_reply_reprobe.

Definition at line 378 of file ipc_controld.c.