2 ctdb database library: old client interface
4 Copyright (C) Andrew Tridgell 2006
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, see <http://www.gnu.org/licenses/>.
20 #ifndef _CTDB_CLIENT_H
21 #define _CTDB_CLIENT_H
22 #include "ctdb_protocol.h"
24 enum control_state
{CTDB_CONTROL_WAIT
, CTDB_CONTROL_DONE
, CTDB_CONTROL_ERROR
, CTDB_CONTROL_TIMEOUT
};
26 struct ctdb_client_control_state
{
27 struct ctdb_context
*ctdb
;
31 enum control_state state
;
33 struct ctdb_req_control
*c
;
35 /* if we have a callback registered for the completion (or failure) of
37 if a callback is used, it MUST talloc_free the cb_data passed to it
40 void (*fn
)(struct ctdb_client_control_state
*);
45 struct ctdb_client_notify_register
{
48 uint8_t notify_data
[1];
51 struct ctdb_client_notify_deregister
{
55 struct tevent_context
;
58 initialise ctdb subsystem
60 struct ctdb_context
*ctdb_init(struct tevent_context
*ev
);
65 int ctdb_set_transport(struct ctdb_context
*ctdb
, const char *transport
);
70 void ctdb_set_flags(struct ctdb_context
*ctdb
, unsigned flags
);
73 tell ctdb what address to listen on, in transport specific format
75 int ctdb_set_address(struct ctdb_context
*ctdb
, const char *address
);
77 int ctdb_set_socketname(struct ctdb_context
*ctdb
, const char *socketname
);
78 const char *ctdb_get_socketname(struct ctdb_context
*ctdb
);
81 Check that a specific ip address exists in the node list and returns
82 the id for the node or -1
84 int ctdb_ip_to_nodeid(struct ctdb_context
*ctdb
, const char *nodeip
);
87 start the ctdb protocol
89 int ctdb_start(struct ctdb_context
*ctdb
);
92 attach to a ctdb database
94 struct ctdb_db_context
*ctdb_attach(struct ctdb_context
*ctdb
,
95 struct timeval timeout
,
100 int ctdb_detach(struct ctdb_context
*ctdb
, uint32_t db_id
);
103 find an attached ctdb_db handle given a name
105 struct ctdb_db_context
*ctdb_db_handle(struct ctdb_context
*ctdb
, const char *name
);
108 error string for last ctdb error
110 const char *ctdb_errstr(struct ctdb_context
*);
112 /* a ctdb call function */
113 typedef int (*ctdb_fn_t
)(struct ctdb_call_info
*);
116 setup a ctdb call function
118 int ctdb_set_call(struct ctdb_db_context
*ctdb_db
, ctdb_fn_t fn
, uint32_t id
);
123 make a ctdb call. The associated ctdb call function will be called on the DMASTER
126 int ctdb_call(struct ctdb_db_context
*ctdb_db
, struct ctdb_call
*call
);
129 initiate an ordered ctdb cluster shutdown
130 this function will never return
132 void ctdb_shutdown(struct ctdb_context
*ctdb
);
134 /* return pnn of this node */
135 uint32_t ctdb_get_pnn(struct ctdb_context
*ctdb
);
138 return the number of nodes
140 uint32_t ctdb_get_num_nodes(struct ctdb_context
*ctdb
);
142 /* setup a handler for ctdb messages */
143 typedef void (*ctdb_msg_fn_t
)(struct ctdb_context
*, uint64_t srvid
,
144 TDB_DATA data
, void *);
145 int ctdb_client_set_message_handler(struct ctdb_context
*ctdb
, uint64_t srvid
,
146 ctdb_msg_fn_t handler
,
148 int ctdb_client_remove_message_handler(struct ctdb_context
*ctdb
,
149 uint64_t srvid
, void *private_data
);
150 int ctdb_client_check_message_handlers(struct ctdb_context
*ctdb
,
151 uint64_t *ids
, uint32_t num
,
154 int ctdb_call(struct ctdb_db_context
*ctdb_db
, struct ctdb_call
*call
);
155 struct ctdb_client_call_state
*ctdb_call_send(struct ctdb_db_context
*ctdb_db
, struct ctdb_call
*call
);
156 int ctdb_call_recv(struct ctdb_client_call_state
*state
, struct ctdb_call
*call
);
158 /* send a ctdb message */
159 int ctdb_client_send_message(struct ctdb_context
*ctdb
, uint32_t pnn
,
160 uint64_t srvid
, TDB_DATA data
);
164 Fetch a ctdb record from a remote node
165 . Underneath this will force the
166 dmaster for the record to be moved to the local node.
168 struct ctdb_record_handle
*ctdb_fetch_lock(struct ctdb_db_context
*ctdb_db
, TALLOC_CTX
*mem_ctx
,
169 TDB_DATA key
, TDB_DATA
*data
);
171 struct ctdb_record_handle
*ctdb_fetch_readonly_lock(struct ctdb_db_context
*ctdb_db
, TALLOC_CTX
*mem_ctx
, TDB_DATA key
, TDB_DATA
*data
, int read_only
);
173 int ctdb_record_store(struct ctdb_record_handle
*h
, TDB_DATA data
);
175 int ctdb_fetch(struct ctdb_db_context
*ctdb_db
, TALLOC_CTX
*mem_ctx
,
176 TDB_DATA key
, TDB_DATA
*data
);
178 int ctdb_register_message_handler(struct ctdb_context
*ctdb
,
181 ctdb_msg_fn_t handler
,
184 struct ctdb_db_context
*find_ctdb_db(struct ctdb_context
*ctdb
, uint32_t id
);
187 struct ctdb_context
*ctdb_cmdline_client(struct tevent_context
*ev
,
188 struct timeval req_timeout
);
190 struct ctdb_statistics
;
191 int ctdb_ctrl_statistics(struct ctdb_context
*ctdb
, uint32_t destnode
, struct ctdb_statistics
*status
);
192 int ctdb_ctrl_dbstatistics(struct ctdb_context
*ctdb
, uint32_t destnode
, uint32_t dbid
,
193 TALLOC_CTX
*mem_ctx
, struct ctdb_db_statistics
**dbstat
);
195 int ctdb_ctrl_shutdown(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
);
198 int ctdb_ctrl_getvnnmap(struct ctdb_context
*ctdb
,
199 struct timeval timeout
, uint32_t destnode
,
200 TALLOC_CTX
*mem_ctx
, struct ctdb_vnn_map
**vnnmap
);
201 int ctdb_ctrl_setvnnmap(struct ctdb_context
*ctdb
,
202 struct timeval timeout
, uint32_t destnode
,
203 TALLOC_CTX
*mem_ctx
, struct ctdb_vnn_map
*vnnmap
);
205 /* table that contains a list of all dbids on a node
207 struct ctdb_dbid_map
{
211 #define CTDB_DB_FLAGS_PERSISTENT 0x01
212 #define CTDB_DB_FLAGS_READONLY 0x02
213 #define CTDB_DB_FLAGS_STICKY 0x04
217 int ctdb_ctrl_getdbmap(struct ctdb_context
*ctdb
,
218 struct timeval timeout
, uint32_t destnode
,
219 TALLOC_CTX
*mem_ctx
, struct ctdb_dbid_map
**dbmap
);
222 struct ctdb_node_map
;
224 int ctdb_ctrl_getnodemap(struct ctdb_context
*ctdb
,
225 struct timeval timeout
, uint32_t destnode
,
226 TALLOC_CTX
*mem_ctx
, struct ctdb_node_map
**nodemap
);
228 int ctdb_ctrl_getnodemapv4(struct ctdb_context
*ctdb
,
229 struct timeval timeout
, uint32_t destnode
,
230 TALLOC_CTX
*mem_ctx
, struct ctdb_node_map
**nodemap
);
232 int ctdb_ctrl_reload_nodes_file(struct ctdb_context
*ctdb
,
233 struct timeval timeout
, uint32_t destnode
);
235 struct ctdb_key_list
{
239 struct ctdb_ltdb_header
*headers
;
243 int ctdb_ctrl_pulldb(
244 struct ctdb_context
*ctdb
, uint32_t destnode
, uint32_t dbid
,
245 uint32_t lmaster
, TALLOC_CTX
*mem_ctx
,
246 struct timeval timeout
, TDB_DATA
*outdata
);
248 struct ctdb_client_control_state
*ctdb_ctrl_pulldb_send(
249 struct ctdb_context
*ctdb
, uint32_t destnode
, uint32_t dbid
,
250 uint32_t lmaster
, TALLOC_CTX
*mem_ctx
, struct timeval timeout
);
252 int ctdb_ctrl_pulldb_recv(
253 struct ctdb_context
*ctdb
,
254 TALLOC_CTX
*mem_ctx
, struct ctdb_client_control_state
*state
,
257 int ctdb_ctrl_pushdb(
258 struct ctdb_context
*ctdb
, uint32_t destnode
, uint32_t dbid
,
260 struct timeval timeout
, TDB_DATA indata
);
262 struct ctdb_client_control_state
*ctdb_ctrl_pushdb_send(
263 struct ctdb_context
*ctdb
, uint32_t destnode
, uint32_t dbid
,
264 TALLOC_CTX
*mem_ctx
, struct timeval timeout
,
267 int ctdb_ctrl_pushdb_recv(
268 struct ctdb_context
*ctdb
, TALLOC_CTX
*mem_ctx
,
269 struct ctdb_client_control_state
*state
);
272 int ctdb_ctrl_copydb(struct ctdb_context
*ctdb
,
273 struct timeval timeout
, uint32_t sourcenode
,
274 uint32_t destnode
, uint32_t dbid
, uint32_t lmaster
,
275 TALLOC_CTX
*mem_ctx
);
277 int ctdb_ctrl_getdbpath(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
, uint32_t dbid
, TALLOC_CTX
*mem_ctx
, const char **path
);
278 int ctdb_ctrl_getdbname(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
, uint32_t dbid
, TALLOC_CTX
*mem_ctx
, const char **name
);
279 int ctdb_ctrl_getdbhealth(struct ctdb_context
*ctdb
,
280 struct timeval timeout
,
282 uint32_t dbid
, TALLOC_CTX
*mem_ctx
,
283 const char **reason
);
284 int ctdb_ctrl_getdbseqnum(struct ctdb_context
*ctdb
, struct timeval timeout
,
285 uint32_t destnode
, uint32_t dbid
, uint64_t *seqnum
);
286 int ctdb_ctrl_createdb(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
, TALLOC_CTX
*mem_ctx
, const char *name
, bool persistent
);
288 int ctdb_ctrl_process_exists(struct ctdb_context
*ctdb
, uint32_t destnode
, pid_t pid
);
290 int ctdb_ctrl_ping(struct ctdb_context
*ctdb
, uint32_t destnode
);
292 int ctdb_ctrl_get_runstate(struct ctdb_context
*ctdb
,
293 struct timeval timeout
,
297 int ctdb_ctrl_get_config(struct ctdb_context
*ctdb
);
299 int ctdb_ctrl_get_debuglevel(struct ctdb_context
*ctdb
, uint32_t destnode
, int32_t *level
);
300 int ctdb_ctrl_set_debuglevel(struct ctdb_context
*ctdb
, uint32_t destnode
, int32_t level
);
303 change dmaster for all keys in the database to the new value
305 int ctdb_ctrl_setdmaster(struct ctdb_context
*ctdb
,
306 struct timeval timeout
, uint32_t destnode
,
307 TALLOC_CTX
*mem_ctx
, uint32_t dbid
, uint32_t dmaster
);
310 write a record on a specific db (this implicitely updates dmaster of the record to locally be the vnn of the node where the control is executed on)
312 int ctdb_ctrl_write_record(struct ctdb_context
*ctdb
, uint32_t destnode
, TALLOC_CTX
*mem_ctx
, uint32_t dbid
, TDB_DATA key
, TDB_DATA data
);
314 #define CTDB_RECOVERY_NORMAL 0
315 #define CTDB_RECOVERY_ACTIVE 1
318 get the recovery mode of a remote node
320 int ctdb_ctrl_getrecmode(struct ctdb_context
*ctdb
, TALLOC_CTX
*mem_ctx
, struct timeval timeout
, uint32_t destnode
, uint32_t *recmode
);
322 struct ctdb_client_control_state
*ctdb_ctrl_getrecmode_send(struct ctdb_context
*ctdb
, TALLOC_CTX
*mem_ctx
, struct timeval timeout
, uint32_t destnode
);
324 int ctdb_ctrl_getrecmode_recv(struct ctdb_context
*ctdb
, TALLOC_CTX
*mem_ctx
, struct ctdb_client_control_state
*state
, uint32_t *recmode
);
328 set the recovery mode of a remote node
330 int ctdb_ctrl_setrecmode(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
, uint32_t recmode
);
332 get the monitoring mode of a remote node
334 int ctdb_ctrl_getmonmode(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
, uint32_t *monmode
);
337 set the monitoring mode of a remote node to active
339 int ctdb_ctrl_enable_monmode(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
);
342 set the monitoring mode of a remote node to disabled
344 int ctdb_ctrl_disable_monmode(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
);
348 get the recovery master of a remote node
350 int ctdb_ctrl_getrecmaster(struct ctdb_context
*ctdb
, TALLOC_CTX
*mem_ctx
, struct timeval timeout
, uint32_t destnode
, uint32_t *recmaster
);
352 struct ctdb_client_control_state
*ctdb_ctrl_getrecmaster_send(struct ctdb_context
*ctdb
, TALLOC_CTX
*mem_ctx
, struct timeval timeout
, uint32_t destnode
);
354 int ctdb_ctrl_getrecmaster_recv(struct ctdb_context
*ctdb
, TALLOC_CTX
*mem_ctx
, struct ctdb_client_control_state
*state
, uint32_t *recmaster
);
359 set the recovery master of a remote node
361 int ctdb_ctrl_setrecmaster(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
, uint32_t recmaster
);
363 uint32_t *ctdb_get_connected_nodes(struct ctdb_context
*ctdb
,
364 struct timeval timeout
,
366 uint32_t *num_nodes
);
368 int ctdb_statistics_reset(struct ctdb_context
*ctdb
, uint32_t destnode
);
370 typedef int (*ctdb_traverse_func
)(struct ctdb_context
*, TDB_DATA
, TDB_DATA
, void *);
371 int ctdb_traverse(struct ctdb_db_context
*ctdb_db
, ctdb_traverse_func fn
, void *private_data
);
373 struct ctdb_dump_db_context
{
375 bool printemptyrecords
;
379 bool printrecordflags
;
382 int ctdb_dumpdb_record(struct ctdb_context
*ctdb
, TDB_DATA key
, TDB_DATA data
, void *p
);
383 int ctdb_dump_db(struct ctdb_db_context
*ctdb_db
,
384 struct ctdb_dump_db_context
*ctx
);
387 get the pid of a ctdb daemon
389 int ctdb_ctrl_getpid(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
, uint32_t *pid
);
391 int ctdb_ctrl_freeze(struct ctdb_context
*ctdb
, struct timeval timeout
,
393 int ctdb_ctrl_freeze_priority(struct ctdb_context
*ctdb
, struct timeval timeout
,
394 uint32_t destnode
, uint32_t priority
);
396 struct ctdb_client_control_state
*
397 ctdb_ctrl_freeze_send(struct ctdb_context
*ctdb
, TALLOC_CTX
*mem_ctx
,
398 struct timeval timeout
, uint32_t destnode
,
401 int ctdb_ctrl_freeze_recv(struct ctdb_context
*ctdb
, TALLOC_CTX
*mem_ctx
,
402 struct ctdb_client_control_state
*state
);
404 int ctdb_ctrl_thaw_priority(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
, uint32_t priority
);
405 int ctdb_ctrl_thaw(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
);
407 int ctdb_ctrl_getpnn(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
);
409 int ctdb_ctrl_get_tunable(struct ctdb_context
*ctdb
,
410 struct timeval timeout
,
412 const char *name
, uint32_t *value
);
414 int ctdb_ctrl_set_tunable(struct ctdb_context
*ctdb
,
415 struct timeval timeout
,
417 const char *name
, uint32_t value
);
419 int ctdb_ctrl_list_tunables(struct ctdb_context
*ctdb
,
420 struct timeval timeout
,
423 const char ***list
, uint32_t *count
);
425 int ctdb_ctrl_modflags(struct ctdb_context
*ctdb
,
426 struct timeval timeout
,
428 uint32_t set
, uint32_t clear
);
430 enum ctdb_server_id_type
{
436 struct ctdb_server_id
{
437 enum ctdb_server_id_type type
;
442 struct ctdb_server_id_list
{
444 struct ctdb_server_id server_ids
[1];
448 int ctdb_ctrl_register_server_id(struct ctdb_context
*ctdb
,
449 struct timeval timeout
,
450 struct ctdb_server_id
*id
);
451 int ctdb_ctrl_unregister_server_id(struct ctdb_context
*ctdb
,
452 struct timeval timeout
,
453 struct ctdb_server_id
*id
);
454 int ctdb_ctrl_check_server_id(struct ctdb_context
*ctdb
,
455 struct timeval timeout
, uint32_t destnode
,
456 struct ctdb_server_id
*id
, uint32_t *status
);
457 int ctdb_ctrl_get_server_id_list(struct ctdb_context
*ctdb
,
459 struct timeval timeout
, uint32_t destnode
,
460 struct ctdb_server_id_list
**svid_list
);
463 struct timeval current_time
;
464 struct timeval ctdbd_start_time
;
465 struct timeval last_recovery_started
;
466 struct timeval last_recovery_finished
;
470 struct for tcp_client control
471 this is an ipv4 only version of this structure used by samba
472 samba will later be migrated over to use the
473 ctdb_control_tcp_addr structure instead
475 struct ctdb_control_tcp
{
476 struct sockaddr_in src
; /* samba uses this */
477 struct sockaddr_in dest
; /* samba uses this */
479 /* new style structure */
480 struct ctdb_control_tcp_addr
{
485 int ctdb_socket_connect(struct ctdb_context
*ctdb
);
488 get the uptime of a remote node
490 int ctdb_ctrl_uptime(struct ctdb_context
*ctdb
, TALLOC_CTX
*mem_ctx
, struct timeval timeout
, uint32_t destnode
, struct ctdb_uptime
**uptime
);
492 struct ctdb_client_control_state
*ctdb_ctrl_uptime_send(struct ctdb_context
*ctdb
, TALLOC_CTX
*mem_ctx
, struct timeval timeout
, uint32_t destnode
);
494 int ctdb_ctrl_uptime_recv(struct ctdb_context
*ctdb
, TALLOC_CTX
*mem_ctx
, struct ctdb_client_control_state
*state
, struct ctdb_uptime
**uptime
);
496 int ctdb_ctrl_end_recovery(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
);
498 int ctdb_ctrl_getreclock(struct ctdb_context
*ctdb
,
499 struct timeval timeout
, uint32_t destnode
,
500 TALLOC_CTX
*mem_ctx
, const char **reclock
);
501 int ctdb_ctrl_setreclock(struct ctdb_context
*ctdb
,
502 struct timeval timeout
, uint32_t destnode
,
503 const char *reclock
);
506 uint32_t *list_of_nodes(struct ctdb_context
*ctdb
,
507 struct ctdb_node_map
*node_map
,
511 uint32_t *list_of_connected_nodes(struct ctdb_context
*ctdb
,
512 struct ctdb_node_map
*node_map
,
515 uint32_t *list_of_active_nodes(struct ctdb_context
*ctdb
,
516 struct ctdb_node_map
*node_map
,
519 uint32_t *list_of_vnnmap_nodes(struct ctdb_context
*ctdb
,
520 struct ctdb_vnn_map
*vnn_map
,
524 int ctdb_read_pnn_lock(int fd
, int32_t pnn
);
527 get capabilities of a remote node
529 int ctdb_ctrl_getcapabilities(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
, uint32_t *capabilities
);
531 struct ctdb_client_control_state
*ctdb_ctrl_getcapabilities_send(struct ctdb_context
*ctdb
, TALLOC_CTX
*mem_ctx
, struct timeval timeout
, uint32_t destnode
);
533 int ctdb_ctrl_getcapabilities_recv(struct ctdb_context
*ctdb
, TALLOC_CTX
*mem_ctx
, struct ctdb_client_control_state
*state
, uint32_t *capabilities
);
535 struct ctdb_marshall_buffer
*ctdb_marshall_add(TALLOC_CTX
*mem_ctx
,
536 struct ctdb_marshall_buffer
*m
,
540 struct ctdb_ltdb_header
*header
,
542 TDB_DATA
ctdb_marshall_finish(struct ctdb_marshall_buffer
*m
);
544 struct ctdb_transaction_handle
*ctdb_transaction_start(struct ctdb_db_context
*ctdb_db
,
545 TALLOC_CTX
*mem_ctx
);
546 int ctdb_transaction_fetch(struct ctdb_transaction_handle
*h
,
548 TDB_DATA key
, TDB_DATA
*data
);
549 int ctdb_transaction_store(struct ctdb_transaction_handle
*h
,
550 TDB_DATA key
, TDB_DATA data
);
551 int ctdb_transaction_commit(struct ctdb_transaction_handle
*h
);
552 int ctdb_transaction_cancel(struct ctdb_transaction_handle
*h
);
554 int ctdb_ctrl_recd_ping(struct ctdb_context
*ctdb
);
556 int switch_from_server_to_client(struct ctdb_context
*ctdb
, const char *fmt
,
559 int ctdb_ctrl_getscriptstatus(struct ctdb_context
*ctdb
,
560 struct timeval timeout
, uint32_t destnode
,
561 TALLOC_CTX
*mem_ctx
, enum ctdb_eventscript_call type
,
562 struct ctdb_scripts_wire
**script_status
);
565 int ctdb_ctrl_stop_node(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
);
566 int ctdb_ctrl_continue_node(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
);
568 int ctdb_ctrl_setnatgwstate(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
, uint32_t natgwstate
);
569 int ctdb_ctrl_setlmasterrole(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
, uint32_t lmasterrole
);
570 int ctdb_ctrl_setrecmasterrole(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
, uint32_t recmasterrole
);
572 int ctdb_ctrl_enablescript(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
, const char *script
);
573 int ctdb_ctrl_disablescript(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
, const char *script
);
575 struct ctdb_ban_time
{
580 int ctdb_ctrl_set_ban(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
, struct ctdb_ban_time
*bantime
);
581 int ctdb_ctrl_get_ban(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
, TALLOC_CTX
*mem_ctx
, struct ctdb_ban_time
**bantime
);
583 struct ctdb_db_priority
{
588 int ctdb_ctrl_set_db_priority(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
, struct ctdb_db_priority
*db_prio
);
589 int ctdb_ctrl_get_db_priority(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
, uint32_t db_id
, uint32_t *priority
);
591 int ctdb_ctrl_getstathistory(struct ctdb_context
*ctdb
, struct timeval timeout
, uint32_t destnode
, TALLOC_CTX
*mem_ctx
, struct ctdb_statistics_wire
**stats
);
595 struct ctdb_client_control_state
*
596 ctdb_ctrl_updaterecord_send(struct ctdb_context
*ctdb
, TALLOC_CTX
*mem_ctx
, struct timeval timeout
, uint32_t destnode
, struct ctdb_db_context
*ctdb_db
, TDB_DATA key
, struct ctdb_ltdb_header
*header
, TDB_DATA data
);
598 int ctdb_ctrl_updaterecord_recv(struct ctdb_context
*ctdb
, struct ctdb_client_control_state
*state
);
601 ctdb_ctrl_updaterecord(struct ctdb_context
*ctdb
, TALLOC_CTX
*mem_ctx
, struct timeval timeout
, uint32_t destnode
, struct ctdb_db_context
*ctdb_db
, TDB_DATA key
, struct ctdb_ltdb_header
*header
, TDB_DATA data
);
604 struct ctdb_client_control_state
*
605 ctdb_ctrl_set_db_readonly_send(struct ctdb_context
*ctdb
, uint32_t destnode
, uint32_t dbid
);
606 int ctdb_ctrl_set_db_readonly_recv(struct ctdb_context
*ctdb
, struct ctdb_client_control_state
*state
);
607 int ctdb_ctrl_set_db_readonly(struct ctdb_context
*ctdb
, uint32_t destnode
, uint32_t dbid
);
609 struct ctdb_client_control_state
*
610 ctdb_ctrl_set_db_sticky_send(struct ctdb_context
*ctdb
, uint32_t destnode
, uint32_t dbid
);
611 int ctdb_ctrl_set_db_sticky_recv(struct ctdb_context
*ctdb
, struct ctdb_client_control_state
*state
);
612 int ctdb_ctrl_set_db_sticky(struct ctdb_context
*ctdb
, uint32_t destnode
, uint32_t dbid
);
614 #endif /* _CTDB_CLIENT_H */