pacemaker 2.1.1-77db578727
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
ipc_controld.h
Go to the documentation of this file.
1/*
2 * Copyright 2020-2021 the Pacemaker project contributors
3 *
4 * The version control history for this file may have further details.
5 *
6 * This source code is licensed under the GNU Lesser General Public License
7 * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8 */
9
10#ifndef PCMK__IPC_CONTROLD__H
11# define PCMK__IPC_CONTROLD__H
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
24#include <stdbool.h> // bool
25#include <glib.h> // GList
26#include <libxml/tree.h> // xmlNode
27#include <crm/common/ipc.h> // pcmk_ipc_api_t
28
38
39// Node information passed with pcmk_controld_reply_nodes
40typedef struct {
41 uint32_t id;
42 const char *uname;
43 const char *state;
45
57typedef struct {
59 const char *feature_set;
60 const char *host_from;
61
62 union {
63 // pcmk_controld_reply_info
64 struct {
67 int id;
68 const char *uuid;
69 const char *uname;
70 const char *state;
71 } node_info;
72
73 // pcmk_controld_reply_resource
74 struct {
75 xmlNode *node_state; //<! Resource operation history XML
76 } resource;
77
78 // pcmk_controld_reply_ping
79 struct {
80 const char *sys_from;
81 const char *fsa_state;
82 const char *result;
83 } ping;
84
85 // pcmk_controld_reply_nodes
86 GList *nodes; // list of pcmk_controld_api_node_t *
89
90int pcmk_controld_api_reprobe(pcmk_ipc_api_t *api, const char *target_node,
91 const char *router_node);
92int pcmk_controld_api_node_info(pcmk_ipc_api_t *api, uint32_t nodeid);
93int pcmk_controld_api_fail(pcmk_ipc_api_t *api, const char *target_node,
94 const char *router_node, const char *rsc_id,
95 const char *rsc_long_id, const char *standard,
96 const char *provider, const char *type);
97int pcmk_controld_api_refresh(pcmk_ipc_api_t *api, const char *target_node,
98 const char *router_node, const char *rsc_id,
99 const char *rsc_long_id, const char *standard,
100 const char *provider, const char *type,
101 bool cib_only);
102int pcmk_controld_api_ping(pcmk_ipc_api_t *api, const char *node_name);
105
106#ifdef __cplusplus
107}
108#endif
109
110#endif // PCMK__IPC_CONTROLD__H
enum crm_ais_msg_types type
Definition cpg.c:3
char data[0]
Definition cpg.c:10
IPC interface to Pacemaker daemons.
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.
int pcmk_controld_api_list_nodes(pcmk_ipc_api_t *api)
Ask the controller for cluster information.
int pcmk_controld_api_ping(pcmk_ipc_api_t *api, const char *node_name)
Ask the controller for status.
pcmk_controld_api_reply
Possible types of controller replies.
@ pcmk_controld_reply_nodes
@ pcmk_controld_reply_reprobe
@ pcmk_controld_reply_resource
@ pcmk_controld_reply_ping
@ pcmk_controld_reply_info
@ pcmk_controld_reply_unknown
unsigned int pcmk_controld_api_replies_expected(pcmk_ipc_api_t *api)
Get the number of IPC replies currently expected from the controller.
int pcmk_controld_api_node_info(pcmk_ipc_api_t *api, uint32_t nodeid)
Send a "node info" controller operation.
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.
int pcmk_controld_api_reprobe(pcmk_ipc_api_t *api, const char *target_node, const char *router_node)
Send a reprobe controller operation.
const char * feature_set
CRM feature set advertised by controller.
const char * host_from
Name of node that sent reply.
enum pcmk_controld_api_reply reply_type