samba.git
2 years agopthreadpool: Fix fork behaviour
Volker Lendecke [Mon, 28 Aug 2017 14:38:19 +0000 (16:38 +0200)]
pthreadpool: Fix fork behaviour

glibc's pthread_cond_wait(&c, &m) increments m.__data.__nusers, making
pthread_mutex_destroy return EBUSY. Thus we can't allow any thread waiting for
a job across a fork. Also, the state of the condvar itself is unclear across a
fork. Right now to me it looks like an initialized but unused condvar can be
used in the child. Busy worker threads don't cause any trouble here, they don't
hold mutexes or condvars. Also, they can't reach the condvar because _prepare
holds all mutexes.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13006
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agowinbind: Rename winbindd_cm_conn->netlogon_creds to _ctx
Volker Lendecke [Fri, 25 Aug 2017 11:26:08 +0000 (13:26 +0200)]
winbind: Rename winbindd_cm_conn->netlogon_creds to _ctx

We have too many variables called _creds :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Aug 30 22:44:45 CEST 2017 on sn-devel-144

2 years agowinbind: Fix a signed/unsigned hickup
Volker Lendecke [Tue, 29 Aug 2017 08:21:05 +0000 (10:21 +0200)]
winbind: Fix a signed/unsigned hickup

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2 years agoctdb-tests: Drop unused test template
Amitay Isaacs [Wed, 9 Aug 2017 01:09:47 +0000 (11:09 +1000)]
ctdb-tests: Drop unused test template

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Aug 30 18:55:42 CEST 2017 on sn-devel-144

2 years agoctdb-protocol: Fix marshalling of ctdb_event_reply
Amitay Isaacs [Mon, 7 Aug 2017 08:00:04 +0000 (18:00 +1000)]
ctdb-protocol: Fix marshalling of ctdb_event_reply

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_event_request
Amitay Isaacs [Mon, 7 Aug 2017 07:55:50 +0000 (17:55 +1000)]
ctdb-protocol: Fix marshalling for ctdb_event_request

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_event_header
Amitay Isaacs [Wed, 26 Jul 2017 15:51:40 +0000 (01:51 +1000)]
ctdb-protocol: Fix marshalling for ctdb_event_header

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_event_reply_data
Amitay Isaacs [Wed, 26 Jul 2017 15:48:51 +0000 (01:48 +1000)]
ctdb-protocol: Fix marshalling for ctdb_event_reply_data

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_event_reply_script_list
Amitay Isaacs [Wed, 26 Jul 2017 15:45:44 +0000 (01:45 +1000)]
ctdb-protocol: Fix marshalling for ctdb_event_reply_script_list

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshaling for ctdb_event_reply_status
Amitay Isaacs [Wed, 26 Jul 2017 15:43:54 +0000 (01:43 +1000)]
ctdb-protocol: Fix marshaling for ctdb_event_reply_status

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_event_request_data
Amitay Isaacs [Wed, 26 Jul 2017 15:41:58 +0000 (01:41 +1000)]
ctdb-protocol: Fix marshalling for ctdb_event_request_data

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_event_request_script_disable
Amitay Isaacs [Wed, 26 Jul 2017 15:36:56 +0000 (01:36 +1000)]
ctdb-protocol: Fix marshalling for ctdb_event_request_script_disable

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_event_request_script_enable
Amitay Isaacs [Wed, 26 Jul 2017 15:35:20 +0000 (01:35 +1000)]
ctdb-protocol: Fix marshalling for ctdb_event_request_script_enable

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_event_request_status
Amitay Isaacs [Wed, 26 Jul 2017 15:33:45 +0000 (01:33 +1000)]
ctdb-protocol: Fix marshalling for ctdb_event_request_status

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_event_request_run
Amitay Isaacs [Wed, 26 Jul 2017 15:32:10 +0000 (01:32 +1000)]
ctdb-protocol: Fix marshalling for ctdb_event_request_run

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_event_status_state
Amitay Isaacs [Wed, 26 Jul 2017 15:30:17 +0000 (01:30 +1000)]
ctdb-protocol: Fix marshalling for ctdb_event_status_state

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_event_command
Amitay Isaacs [Wed, 26 Jul 2017 15:28:43 +0000 (01:28 +1000)]
ctdb-protocol: Fix marshalling for ctdb_event_command

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_event
Amitay Isaacs [Wed, 26 Jul 2017 15:26:43 +0000 (01:26 +1000)]
ctdb-protocol: Fix marshalling for ctdb_event

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-tests: Add test templates for eventd protocol elements
Amitay Isaacs [Fri, 4 Aug 2017 07:34:14 +0000 (17:34 +1000)]
ctdb-tests: Add test templates for eventd protocol elements

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-tests: Remove unused #defines
Amitay Isaacs [Wed, 16 Aug 2017 02:49:24 +0000 (12:49 +1000)]
ctdb-tests: Remove unused #defines

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Add marshalling for ctdb_req_keepalive
Amitay Isaacs [Wed, 28 Jun 2017 06:50:53 +0000 (16:50 +1000)]
ctdb-protocol: Add marshalling for ctdb_req_keepalive

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_req_message_data
Amitay Isaacs [Fri, 21 Jul 2017 05:21:01 +0000 (15:21 +1000)]
ctdb-protocol: Fix marshalling for ctdb_req_message_data

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_req_message
Amitay Isaacs [Fri, 21 Jul 2017 05:07:30 +0000 (15:07 +1000)]
ctdb-protocol: Fix marshalling for ctdb_req_message

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_message_data
Amitay Isaacs [Fri, 21 Jul 2017 04:40:01 +0000 (14:40 +1000)]
ctdb-protocol: Fix marshalling for ctdb_message_data

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_reply_control
Amitay Isaacs [Thu, 3 Aug 2017 08:05:41 +0000 (18:05 +1000)]
ctdb-protocol: Fix marshalling for ctdb_reply_control

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_req_control
Amitay Isaacs [Thu, 3 Aug 2017 08:00:24 +0000 (18:00 +1000)]
ctdb-protocol: Fix marshalling for ctdb_req_control

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_reply_control_data
Amitay Isaacs [Thu, 3 Aug 2017 06:32:55 +0000 (16:32 +1000)]
ctdb-protocol: Fix marshalling for ctdb_reply_control_data

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_req_control_data
Amitay Isaacs [Wed, 26 Jul 2017 16:20:03 +0000 (02:20 +1000)]
ctdb-protocol: Fix marshalling for ctdb_req_control_data

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_reply_dmaster
Amitay Isaacs [Wed, 19 Jul 2017 05:08:21 +0000 (15:08 +1000)]
ctdb-protocol: Fix marshalling for ctdb_reply_dmaster

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_req_dmaster
Amitay Isaacs [Wed, 19 Jul 2017 04:58:21 +0000 (14:58 +1000)]
ctdb-protocol: Fix marshalling for ctdb_req_dmaster

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_reply_error
Amitay Isaacs [Wed, 19 Jul 2017 04:41:45 +0000 (14:41 +1000)]
ctdb-protocol: Fix marshalling for ctdb_reply_error

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_reply_call
Amitay Isaacs [Wed, 19 Jul 2017 04:36:45 +0000 (14:36 +1000)]
ctdb-protocol: Fix marshalling for ctdb_reply_call

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_req_call
Amitay Isaacs [Wed, 19 Jul 2017 04:30:47 +0000 (14:30 +1000)]
ctdb-protocol: Fix marshalling for ctdb_req_call

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_req_header
Amitay Isaacs [Wed, 19 Jul 2017 01:12:08 +0000 (11:12 +1000)]
ctdb-protocol: Fix marshalling for ctdb_req_header

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-tests: Add compatibility test for ctdb protocol elements
Amitay Isaacs [Tue, 15 Aug 2017 05:41:26 +0000 (15:41 +1000)]
ctdb-tests: Add compatibility test for ctdb protocol elements

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-tests: Add test templates for ctdb protocol elements
Amitay Isaacs [Wed, 2 Aug 2017 09:13:52 +0000 (19:13 +1000)]
ctdb-tests: Add test templates for ctdb protocol elements

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_g_lock_list
Amitay Isaacs [Thu, 13 Jul 2017 05:27:17 +0000 (15:27 +1000)]
ctdb-protocol: Fix marshalling for ctdb_g_lock_list

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_g_lock
Amitay Isaacs [Thu, 13 Jul 2017 05:22:08 +0000 (15:22 +1000)]
ctdb-protocol: Fix marshalling for ctdb_g_lock

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_server_id
Amitay Isaacs [Thu, 13 Jul 2017 05:15:25 +0000 (15:15 +1000)]
ctdb-protocol: Fix marshalling for ctdb_server_id

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_disable_message
Amitay Isaacs [Thu, 13 Jul 2017 05:09:31 +0000 (15:09 +1000)]
ctdb-protocol: Fix marshalling for ctdb_disable_message

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_srvid_message
Amitay Isaacs [Thu, 13 Jul 2017 05:01:37 +0000 (15:01 +1000)]
ctdb-protocol: Fix marshalling for ctdb_srvid_message

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_election_message
Amitay Isaacs [Thu, 13 Jul 2017 04:56:50 +0000 (14:56 +1000)]
ctdb-protocol: Fix marshalling for ctdb_election_message

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_db_statistics
Amitay Isaacs [Wed, 26 Jul 2017 15:00:51 +0000 (01:00 +1000)]
ctdb-protocol: Fix marshalling for ctdb_db_statistics

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_key_data
Amitay Isaacs [Wed, 12 Jul 2017 09:05:13 +0000 (19:05 +1000)]
ctdb-protocol: Fix marshalling for ctdb_key_data

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_statistics_list
Amitay Isaacs [Wed, 26 Jul 2017 04:43:02 +0000 (14:43 +1000)]
ctdb-protocol: Fix marshalling for ctdb_statistics_list

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_public_ip_info
Amitay Isaacs [Wed, 12 Jul 2017 08:52:56 +0000 (18:52 +1000)]
ctdb-protocol: Fix marshalling for ctdb_public_ip_info

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_iface_list
Amitay Isaacs [Wed, 12 Jul 2017 08:45:42 +0000 (18:45 +1000)]
ctdb-protocol: Fix marshalling for ctdb_iface_list

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_iface
Amitay Isaacs [Wed, 12 Jul 2017 08:38:19 +0000 (18:38 +1000)]
ctdb-protocol: Fix marshalling for ctdb_iface

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_notify_data
Amitay Isaacs [Wed, 12 Jul 2017 08:29:12 +0000 (18:29 +1000)]
ctdb-protocol: Fix marshalling for ctdb_notify_data

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_ban_state
Amitay Isaacs [Wed, 12 Jul 2017 08:24:34 +0000 (18:24 +1000)]
ctdb-protocol: Fix marshalling for ctdb_ban_state

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_script_list
Amitay Isaacs [Wed, 12 Jul 2017 08:18:29 +0000 (18:18 +1000)]
ctdb-protocol: Fix marshalling for ctdb_script_list

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_script
Amitay Isaacs [Wed, 12 Jul 2017 07:59:02 +0000 (17:59 +1000)]
ctdb-protocol: Fix marshalling for ctdb_script

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_node_map
Amitay Isaacs [Thu, 6 Jul 2017 04:25:58 +0000 (14:25 +1000)]
ctdb-protocol: Fix marshalling for ctdb_node_map

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_node_and_flags
Amitay Isaacs [Thu, 6 Jul 2017 04:18:02 +0000 (14:18 +1000)]
ctdb-protocol: Fix marshalling for ctdb_node_and_flags

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_public_ip_list
Amitay Isaacs [Thu, 6 Jul 2017 04:12:57 +0000 (14:12 +1000)]
ctdb-protocol: Fix marshalling for ctdb_public_ip_list

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_public_ip
Amitay Isaacs [Thu, 6 Jul 2017 04:04:51 +0000 (14:04 +1000)]
ctdb-protocol: Fix marshalling for ctdb_public_ip

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_uptime
Amitay Isaacs [Thu, 6 Jul 2017 05:34:51 +0000 (15:34 +1000)]
ctdb-protocol: Fix marshalling for ctdb_uptime

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_transdb
Amitay Isaacs [Wed, 5 Jul 2017 07:51:03 +0000 (17:51 +1000)]
ctdb-protocol: Fix marshalling for ctdb_transdb

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_addr_info
Amitay Isaacs [Tue, 4 Jul 2017 08:12:04 +0000 (18:12 +1000)]
ctdb-protocol: Fix marshalling for ctdb_addr_info

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_tickle_list
Amitay Isaacs [Tue, 4 Jul 2017 07:56:12 +0000 (17:56 +1000)]
ctdb-protocol: Fix marshalling for ctdb_tickle_list

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_tunable_list
Amitay Isaacs [Wed, 26 Jul 2017 05:30:19 +0000 (15:30 +1000)]
ctdb-protocol: Fix marshalling for ctdb_tunable_list

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_var_list
Amitay Isaacs [Thu, 29 Jun 2017 15:28:26 +0000 (01:28 +1000)]
ctdb-protocol: Fix marshalling for ctdb_var_list

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_node_flag_change
Amitay Isaacs [Thu, 29 Jun 2017 14:42:53 +0000 (00:42 +1000)]
ctdb-protocol: Fix marshalling for ctdb_node_flag_change

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_tunable
Amitay Isaacs [Thu, 29 Jun 2017 14:36:18 +0000 (00:36 +1000)]
ctdb-protocol: Fix marshalling for ctdb_tunable

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_connection
Amitay Isaacs [Thu, 29 Jun 2017 14:31:21 +0000 (00:31 +1000)]
ctdb-protocol: Fix marshalling for ctdb_connection

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_sock_addr
Amitay Isaacs [Tue, 18 Jul 2017 07:12:37 +0000 (17:12 +1000)]
ctdb-protocol: Fix marshalling for ctdb_sock_addr

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_traverse_all_ext
Amitay Isaacs [Thu, 29 Jun 2017 14:24:40 +0000 (00:24 +1000)]
ctdb-protocol: Fix marshalling for ctdb_traverse_all_ext

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_traverse_start_ext
Amitay Isaacs [Thu, 29 Jun 2017 14:16:58 +0000 (00:16 +1000)]
ctdb-protocol: Fix marshalling for ctdb_traverse_start_ext

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_traverse_all
Amitay Isaacs [Thu, 29 Jun 2017 13:56:02 +0000 (23:56 +1000)]
ctdb-protocol: Fix marshalling for ctdb_traverse_all

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_traverse_start
Amitay Isaacs [Thu, 29 Jun 2017 13:48:01 +0000 (23:48 +1000)]
ctdb-protocol: Fix marshalling for ctdb_traverse_start

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_rec_buffer
Amitay Isaacs [Thu, 29 Jun 2017 13:41:08 +0000 (23:41 +1000)]
ctdb-protocol: Fix marshalling for ctdb_rec_buffer

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Use ctdb_rec_buffer_traverse to calaculate length of data
Amitay Isaacs [Thu, 3 Aug 2017 07:50:48 +0000 (17:50 +1000)]
ctdb-protocol: Use ctdb_rec_buffer_traverse to calaculate length of data

If the parser function is NULL, ctdb_rec_buffer_traverse will return the
amount of data used by ctdb_rec_data structures.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_rec_data
Amitay Isaacs [Thu, 29 Jun 2017 13:27:33 +0000 (23:27 +1000)]
ctdb-protocol: Fix marshalling for ctdb_rec_data

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Drop header argument to ctdb_rec_data_pull_data()
Amitay Isaacs [Wed, 2 Aug 2017 07:35:33 +0000 (17:35 +1000)]
ctdb-protocol: Drop header argument to ctdb_rec_data_pull_data()

Since header is always set to NULL, there is no need to pass header as
an argument.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_ltdb_header
Amitay Isaacs [Thu, 29 Jun 2017 12:39:41 +0000 (22:39 +1000)]
ctdb-protocol: Fix marshalling for ctdb_ltdb_header

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_pulldb_ext
Amitay Isaacs [Thu, 29 Jun 2017 09:55:15 +0000 (19:55 +1000)]
ctdb-protocol: Fix marshalling for ctdb_pulldb_ext

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_pulldb
Amitay Isaacs [Thu, 29 Jun 2017 09:50:21 +0000 (19:50 +1000)]
ctdb-protocol: Fix marshalling for ctdb_pulldb

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_dbid_map
Amitay Isaacs [Thu, 29 Jun 2017 09:33:04 +0000 (19:33 +1000)]
ctdb-protocol: Fix marshalling for ctdb_dbid_map

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Add marshalling for ctdb_dbid
Amitay Isaacs [Thu, 6 Jul 2017 07:53:24 +0000 (17:53 +1000)]
ctdb-protocol: Add marshalling for ctdb_dbid

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_vnn_map
Amitay Isaacs [Thu, 29 Jun 2017 09:04:56 +0000 (19:04 +1000)]
ctdb-protocol: Fix marshalling for ctdb_vnn_map

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for ctdb_statistics
Amitay Isaacs [Wed, 26 Jul 2017 02:50:12 +0000 (12:50 +1000)]
ctdb-protocol: Fix marshalling for ctdb_statistics

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-tests: Add compatibility test for protocol data types
Amitay Isaacs [Mon, 14 Aug 2017 06:28:16 +0000 (16:28 +1000)]
ctdb-tests: Add compatibility test for protocol data types

This patch prepares for testing old and new marshalling codes for
various data types to ensure backward compatibility.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Add marshalling for ctdb_latency_counter
Amitay Isaacs [Wed, 26 Jul 2017 02:49:51 +0000 (12:49 +1000)]
ctdb-protocol: Add marshalling for ctdb_latency_counter

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Add marshalling for tdb_data with size
Amitay Isaacs [Thu, 29 Jun 2017 08:41:43 +0000 (18:41 +1000)]
ctdb-protocol: Add marshalling for tdb_data with size

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for tdb_data
Amitay Isaacs [Fri, 30 Jun 2017 07:15:47 +0000 (17:15 +1000)]
ctdb-protocol: Fix marshalling for tdb_data

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Move tdb_data marshalling code
Amitay Isaacs [Mon, 31 Jul 2017 06:48:58 +0000 (16:48 +1000)]
ctdb-protocol: Move tdb_data marshalling code

There is no change in the code.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Add padding data type to handle structure padding
Amitay Isaacs [Thu, 6 Jul 2017 07:52:25 +0000 (17:52 +1000)]
ctdb-protocol: Add padding data type to handle structure padding

This takes care of alignment sizes, so that it works on both 32-bit and
64-bit architectures.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Add marshalling for struct timeval
Amitay Isaacs [Thu, 6 Jul 2017 04:48:38 +0000 (14:48 +1000)]
ctdb-protocol: Add marshalling for struct timeval

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for pid_t
Amitay Isaacs [Thu, 29 Jun 2017 12:18:27 +0000 (22:18 +1000)]
ctdb-protocol: Fix marshalling for pid_t

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for a string with length
Amitay Isaacs [Thu, 20 Apr 2017 02:45:24 +0000 (12:45 +1000)]
ctdb-protocol: Fix marshalling for a string with length

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for a string
Amitay Isaacs [Thu, 29 Jun 2017 08:48:51 +0000 (18:48 +1000)]
ctdb-protocol: Fix marshalling for a string

Always return NULL terminated strings.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Add marshalling for fixed size char array
Amitay Isaacs [Thu, 6 Jul 2017 08:05:04 +0000 (18:05 +1000)]
ctdb-protocol: Add marshalling for fixed size char array

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Add marshalling for bool
Amitay Isaacs [Thu, 29 Jun 2017 14:11:45 +0000 (00:11 +1000)]
ctdb-protocol: Add marshalling for bool

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for double
Amitay Isaacs [Thu, 29 Jun 2017 12:16:56 +0000 (22:16 +1000)]
ctdb-protocol: Fix marshalling for double

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for uint64_t
Amitay Isaacs [Thu, 29 Jun 2017 12:15:43 +0000 (22:15 +1000)]
ctdb-protocol: Fix marshalling for uint64_t

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for uint32_t
Amitay Isaacs [Thu, 29 Jun 2017 12:14:23 +0000 (22:14 +1000)]
ctdb-protocol: Fix marshalling for uint32_t

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Fix marshalling for int32_t
Amitay Isaacs [Thu, 29 Jun 2017 12:09:26 +0000 (22:09 +1000)]
ctdb-protocol: Fix marshalling for int32_t

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Add marshalling for uint16_t
Amitay Isaacs [Wed, 12 Jul 2017 08:38:00 +0000 (18:38 +1000)]
ctdb-protocol: Add marshalling for uint16_t

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-protocol: Add marshalling for uint8_t
Amitay Isaacs [Thu, 29 Jun 2017 12:24:20 +0000 (22:24 +1000)]
ctdb-protocol: Add marshalling for uint8_t

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2 years agoctdb-tests: Add test templates for various data types
Amitay Isaacs [Thu, 27 Jul 2017 07:38:47 +0000 (17:38 +1000)]
ctdb-tests: Add test templates for various data types

These test templates will use new style of len/push/pull functions.
The differences in the new style of marshalling functions are:

1. len/push functions will be passed pointer to a value instead of the value
2. push/pull functions will additionally return the number of bytes consumed

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