1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

53 Commits

Author SHA1 Message Date
Martin Schwenke
5b4dd8c001 ctdb-protocol: CTDB_CONTROL_SET_RECLOCK_FILE is obsolete
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-06-08 00:51:28 +02:00
Martin Schwenke
872eb37eb4 ctdb-protocol: Drop support for SET_RECLOCK
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-06-08 00:51:28 +02:00
Amitay Isaacs
e35ffb06bc ctdb-protocol: Add function to compare ctdb_sock_addr
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-10 22:51:22 +02:00
Martin Schwenke
e225fbd38c ctdb-protocol: Drop unused CTDB_SRVID_TAKEOVER_RUN_RESPONSE
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-05-06 11:39:09 +02:00
Amitay Isaacs
10dbeddab5 ctdb-protocol: Return required buffer size in push functions
If the buffer size provided is not sufficient, then return the required
buffer length.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-03 04:43:20 +02:00
Amitay Isaacs
1fcedeb99b ctdb-protocol: Use consistent names for function arguments
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-03 04:43:20 +02:00
Amitay Isaacs
bf9b0b992a ctdb-protocol: Drop buffer allocation from protocol push functions
This means that the packet allocation will happen just before push
functions are called.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-03 04:43:20 +02:00
Amitay Isaacs
2717427e69 ctdb-protocol: Check arguments in ctdb_allocate_pkt
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-03 04:43:20 +02:00
Amitay Isaacs
0eca31baf7 ctdb-protocol: Expose function to allocate a packet
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-03 04:43:20 +02:00
Amitay Isaacs
e834e0a2c0 ctdb-protocol: Fix marshalling of ctdb_reply_control
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-03 04:43:20 +02:00
Amitay Isaacs
75363b9954 ctdb-protocol: Use length routines for protocol elements
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-03 04:43:20 +02:00
Amitay Isaacs
8a20c116fd ctdb-protocol: Add length routines for protocol elements
This follows the convention used for marshalling routines for ctdb data types.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-03 04:43:20 +02:00
Amitay Isaacs
6ec25c7529 ctdb-protocol: Use ctdb_req_header marshalling
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-03 04:43:20 +02:00
Amitay Isaacs
79d1507c16 ctdb-protocol: Fix marshalling of ctdb_req_header
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-03 04:43:20 +02:00
Amitay Isaacs
2e14d4e4e3 ctdb-protocol: Use TDB_DATA marshalling
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-03 04:43:19 +02:00
Amitay Isaacs
c64435f22e ctdb-protocol: Fix marshalling of TDB_DATA
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-03 04:43:19 +02:00
Amitay Isaacs
324ae757c3 ctdb-protocol: Use ctdb_string marshalling
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-03 04:43:19 +02:00
Amitay Isaacs
fcb2ab7641 ctdb-protocol: Fix marshalling of ctdb_string
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-05-03 04:43:19 +02:00
Amitay Isaacs
2a06e56f92 ctdb-protocol: Consistency check for opcode in the reply structure
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-04-23 23:55:15 +02:00
Amitay Isaacs
1bd461fed5 ctdb-protocol: Remove data structures for obsolete server_id controls
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-04-23 23:55:15 +02:00
Amitay Isaacs
8142e108c7 ctdb-protocol: Define a range of SRVIDs used by the ctdb tool
Get rid of the range reserved for traversals since it's not used.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-04-23 23:55:14 +02:00
Amitay Isaacs
811192be34 ctdb-protocol: Remove unused CTDB_SRVID_PREFIX
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-04-23 23:55:14 +02:00
Martin Schwenke
ffd64de772 ctdb-daemon: Drop --lvs option and support for CTDB_CAP_LVS
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Apr 15 09:35:51 CEST 2016 on sn-devel-144
2016-04-15 09:35:51 +02:00
Martin Schwenke
52cfe76de8 ctdb-protocol: Drop killtcp protocol support
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-04-01 04:42:12 +02:00
Amitay Isaacs
fc63eae80b ctdb-protocol: Add srvid for assigning banning credits
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-03-25 03:26:16 +01:00
Amitay Isaacs
bb6541b386 ctdb-protocol: Add new capability
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-03-25 03:26:15 +01:00
Amitay Isaacs
c5776f0529 ctdb-protocol: Add srvid for messages during recovery
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-03-25 03:26:15 +01:00
Amitay Isaacs
b1e8714bb8 ctdb-protocol: Introduce variable for checking srvid prefix
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-03-25 03:26:15 +01:00
Amitay Isaacs
76f653f0bc ctdb-protocol: Add file IO functions for ctdb_rec_buffer
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-03-25 03:26:15 +01:00
Amitay Isaacs
0fd156ae84 ctdb-protocol: Add new controls DB_PULL and DB_PUSH_START/DB_PUSH_CONFIRM
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-03-25 03:26:14 +01:00
Amitay Isaacs
fe69b72569 ctdb-protocol: Add new data type ctdb_pulldb_ext for new control
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-03-25 03:26:14 +01:00
Amitay Isaacs
c41808e6d2 ctdb-tunables: Add new tunable RecBufferSizeLimit
This will be used to limit the size of record buffer sent in newer
controls for recovery and existing controls for vacuuming.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-03-25 03:26:14 +01:00
Amitay Isaacs
6cdb927e76 ctdb-protocol: Add protocol debug routines
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-03-17 10:17:47 +01:00
Amitay Isaacs
0fa2853ce1 ctdb-protocol: Check header is not null before copying
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-03-17 10:17:47 +01:00
Martin Schwenke
6bbf7d8f09 ctdb: NAT gateway capability and control to set it are obsolete
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Jan 27 18:35:24 CET 2016 on sn-devel-144
2016-01-27 18:35:24 +01:00
Martin Schwenke
07e878ab74 ctdb-protocol: Drop protocol support for setting NAT gatway capability
This is no longer used.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-01-27 15:28:17 +01:00
Amitay Isaacs
0ed60d757d ctdb-protocol: Fix marshaling of seqnum
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-01-20 04:19:11 +01:00
Amitay Isaacs
1ee7053180 ctdb-protocol: Fix marshalling for struct ctdb_rec_data
If the header is specified, then the datalen should be incremented.

There are two ways of marshalling ctdb_rec_data:

1. ctdb_rec_data->header is NULL and ctdb_rec_data->data embeds both
   the header and the value. Used in recovery for push/pull of records.

2. ctdb_rec_data->header is not NULL and ctdb_rec_data->data embeds
   only the value.  Used everywhere else.

In both cases, the wire format includes the header and the value.
There is nothing in the wire format to inform the unmarshalling code
whether to extract the header separately or not.

In the current code the header is extracted depending on whether the
header argument to the extractor routine is NULL or not.  This is insane
and highly error-prone.

So in the new API, unmarshalling code never extracts the header.  If the
caller requires the header, then it can be extracted separately using
special function ctdb_ltdb_header_extract().

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Nov 25 13:21:48 CET 2015 on sn-devel-104
2015-11-25 13:21:47 +01:00
Amitay Isaacs
8ded8e81b0 ctdb-protocol: Add API to extract ctdb_ltdb_header from TDB_DATA
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-11-25 10:16:20 +01:00
Amitay Isaacs
5f5b3193a3 ctdb-protocol: Fix marshalling of struct ctdb_public_ip_list
There can be 0 public addresses.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-11-25 10:16:20 +01:00
Amitay Isaacs
5498b71b3d ctdb-protocol: Fix marshalling of struct ctdb_addr_info
ctdb_addr_info->iface can be NULL.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-11-25 10:16:20 +01:00
Amitay Isaacs
587817774a ctdb-protocol: Do not expect a reply for SHUTDOWN control
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-11-25 10:16:20 +01:00
Amitay Isaacs
3fc6a89548 ctdb-protocol: Add marshalling for TDB_DATA
This is required when ctdb client wants to send arbitrary data as part
of CTDB_REQ_MESSAGE.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-11-25 10:16:20 +01:00
Amitay Isaacs
3d84399f5e ctdb-protocol: Add utility function ctdb_sock_addr_to_string
This is a duplicate function to ctdb_addr_to_str, but ctdb-util cannot
be linked with the code using new API mainly because it code in ctdb-util
requires struct ctdb_context.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-11-25 10:16:20 +01:00
Amitay Isaacs
28fb8993e0 ctdb-include: Make protocol headers self contained
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-11-25 10:16:19 +01:00
Martin Schwenke
9166c30a41 ctdb-daemon: Rename EventScriptTimeoutCount to MonitorTimeoutCount
This only applies to monitor events so renaming clarifies this.

Note that this change is not backward compatible.  Users with

  CTDB_SET_EventScriptTimeoutCount=<n>

in their configuration will get failures when starting CTDB but the
cause will be clearly logged.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-11-16 08:42:11 +01:00
Volker Lendecke
0aca421136 ctdb: Fix the O3 developer build
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Nov 13 12:42:22 CET 2015 on sn-devel-104
2015-11-13 12:42:21 +01:00
Amitay Isaacs
8b84a82eab ctdb-protocol: Rename G_LOCK_READ/WRITE to CTDB_G_LOCK_READ/WRITE
to avoid clash with definitions from source3/include/g_lock.h.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2015-11-04 00:47:16 +01:00
Amitay Isaacs
42b1d30fbb ctdb-daemon: Keep protocol.h in sync with ctdb_protocol.h
ctdb_protocol.h was modified to update default capabilities without
corresponding changes in protocol.h.

(Patch dfc84fdd45)

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2015-10-27 04:15:14 +01:00
Amitay Isaacs
cbfabd8104 ctdb-daemon: Add parallel database recovery capability
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2015-10-07 14:53:29 +02:00