summaryrefslogtreecommitdiff
path: root/ctdb/include
AgeCommit message (Collapse)AuthorFilesLines
2026-02-25ctdb-daemon: Remove helper variable CTDB_DEBUG_LOCKSMartin Schwenke1-0/+1
Replace with a lock_debug_script member in ctdb_context. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Anoop C S <anoopcs@samba.org>
2026-02-25ctdb-daemon: Remove helper variable CTDB_LOCK_HELPERMartin Schwenke1-0/+1
Replace with a lock_helper member in ctdb_context, set using path_helperdir_append(). Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Anoop C S <anoopcs@samba.org>
2024-10-08ctdb-daemon: Drop unused argumentsMartin Schwenke1-1/+1
Unused since commit a10545ab6bd8a1b9ca87b0fdba8381cb8af0e284. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Anoop C S <anoopcs@samba.org>
2024-09-22ctdb: Change the ctdb_vfork_exec prototype to const char*const*Volker Lendecke1-3/+5
I could not find out how to cast a char ** to const char ** without warning. This transfers fine to the execv call as well. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
2024-08-06ctdb-server: rename ctdb_load_nodes_file to ctdb_load_nodesJohn Mulligan1-1/+1
Rename ctdb_load_nodes_file to ctdb_load_nodes as it can now load nodes from more than a regular file. Signed-off-by: John Mulligan <jmulligan@redhat.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2024-08-06ctdb-server: rename nodes_file field to nodes_sourceJohn Mulligan1-1/+1
Rename the `struct ctdb_context` field nodes_file to nodes_source to better match that the field may indicate something other than a true file. Signed-off-by: John Mulligan <jmulligan@redhat.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2024-07-23ctdb-protocol: Move definition of CTDB_PORT to protocolMartin Schwenke1-3/+0
Users of CTDB_PORT will all pick up the new definition. Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Anoop C S <anoopcs@samba.org>
2024-03-06ctdb-server: Implement CTDB_CONTROL_START_IPREALLOCATEVinit Agnihotri1-0/+3
Trigger a "startipreallocate" event, but only if in RUNNING runstate. "startipreallocate" is intended to allow an NFS server to be put into grace on all nodes before any locks are released as part of releaseip during failover. If node A is leader and initiates a takeover run then node B may be connected/active but may not have completed startup. In this case, the attempt to put NFS-Ganesha into grace on node B will fail, startipreallocate will fail, and the node will be banned. Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com> Reviewed-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2024-03-06ctdb-common: Remove unused variable ctdb_eventscript_call_names.Martin Schwenke1-3/+0
Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2023-12-15ctdb: add/implement CTDB_CONTROL_TCP_CLIENT_PASSEDStefan Metzmacher1-0/+3
With multichannel a tcp connection is registered first with a temporary smbd process, that calls CTDB_CONTROL_TCP_CLIENT first and then passes the tcp connection to the longterm smbd that already handles all connections belonging to the specific client_guid. That smbd process calls CTDB_CONTROL_TCP_CLIENT again, but the 'tickle' information is already there. When the temporary smbd process exists/disconnects from ctdb or calls CTDB_CONTROL_TCP_CLIENT_DISCONNECTED, the 'tickle' information is removed, while the longterm smbd process still serves the tcp connection. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15523 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
2023-12-15ctdb: add/implement CTDB_CONTROL_TCP_CLIENT_DISCONNECTEDStefan Metzmacher1-0/+3
With multichannel a ctdb connection from smbd may hold multiple tcp connections, which can be disconnected before the smbd process terminates the whole ctdb connection, so we a way to remove undo 'CTDB_CONTROL_TCP_CLIENT' again. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15523 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
2023-12-15ctdb: remove unused ctdb->client_ip_list and print debug on ctdb_tcp_list ↵Stefan Metzmacher1-1/+0
instead BUG: https://bugzilla.samba.org/show_bug.cgi?id=15523 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
2023-03-24ctdb:include: Fix code spellingAndreas Schneider1-1/+1
Best reviewed with: `git show --word-diff` Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
2023-03-24ctdb:include: Remove trailing whitespaces in ctdb_protocol.hAndreas Schneider1-2/+2
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
2022-07-22ctdb-daemon: Drop unused ban_state element from CTDB node structureMartin Schwenke1-3/+0
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2022-04-06ctdb-daemon: New function ctdb_tunables_load()Martin Schwenke1-0/+1
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2022-01-17ctdb-daemon: Drop implementation of {GET,SET}_RECMASTER controlsMartin Schwenke1-3/+0
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2022-01-17ctdb-daemon: Drop unused old client recmaster functionsMartin Schwenke1-22/+0
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2022-01-17ctdb-daemon: Enable log reopening for event daemonMartin Schwenke1-0/+2
Add and call hook to pass on SIGHUP to eventd. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2021-09-09ctdb-daemon: Factor out a function to get node structure from PNNMartin Schwenke1-0/+2
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14784 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2020-09-11ctdb-daemon: Drop implementation of old-style database pull/push controlsMartin Schwenke1-4/+0
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 Sep 11 06:29:32 UTC 2020 on sn-devel-184
2020-07-24ctdb-recoverd: Move ctdb_ctrl_modflags() to ctdb_recoverd.cMartin Schwenke1-5/+0
This file is the only user of this function. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2020-05-22ctdb-daemon: Add extra logging of hot keysMartin Schwenke1-0/+1
ctdbd currently only logs when a new hot key is added. If a key gets hotter then nothing new is logged. Log hot key updates when the number of migrations has doubled since the last time that key was logged. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2020-05-22ctdb-daemon: Add separate hot keys array for database statisticsMartin Schwenke1-0/+6
There are 2 reasons for this. Sorting of hot keys is broken and will be changed to an implementation that needs a named (i.e. not anonymous) structure. Also, at least one non-protocol field will be added to facilitate more useful logging. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2020-03-23ctdb-daemon: Remove more unused old client database functionsMartin Schwenke1-12/+0
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14294 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2020-03-23ctdb-daemon: Remove unused old client database functionsMartin Schwenke2-22/+2
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14294 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2020-02-18ctdb-daemon: Fix signed/unsigned comparisonMartin Schwenke1-1/+1
csbuild says: ctdb/server/ctdb_lock.c: scope_hint: In function ‘ctdb_find_lock_context’ ctdb/server/ctdb_lock.c:671:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare] Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2020-02-10ctdb-daemon: Pass more information to ctdb_start_daemon()Martin Schwenke1-1/+3
No functional changes. This is staging for a change that makes ctdbd fork when test mode is enabled but interactive is not set. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-11-14ctdb-daemon: Rename ctdb_context private_data to transport_dataMartin Schwenke1-1/+1
This gives a casual reader a useful clue. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-11-14ctdb-daemon: Rename ctdb_node private_data to transport_dataMartin Schwenke1-1/+1
This gives a casual reader a useful clue. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-10-31ctdb/include/ctdb_private.h: typo fixesBjörn Jacke1-1/+1
Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
2019-10-24ctdb-daemon: Implement DB_VACUUM controlMartin Schwenke1-0/+5
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-10-24ctdb-vacuum: Simplify recording of in-progress vacuuming childMartin Schwenke1-1/+1
There can only be one, so simplify the logic. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-10-24ctdb-daemon: Add implementation of VACUUM_FETCH controlAmitay Isaacs1-0/+3
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2019-08-20ctdb-daemon: Drop unused function ctdb_local_node_got_banned()Martin Schwenke1-1/+0
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14087 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-08-20ctdb-daemon: Factor out new function ctdb_node_become_inactive()Martin Schwenke1-0/+2
This is a superset of ctdb_local_node_got_banned() so will replace that function, and will also be used in the NODE_STOP control. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14087 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-08-16ctdb-daemon: Add function ctdb_ip_to_node()Martin Schwenke1-0/+2
This is the core logic from ctdb_ip_to_pnn(), so re-implement that that function using ctdb_ip_to_node(). Something similar (ctdb_ip_to_nodeid()) was recently removed in commit 010c1d77cd7e192b1fff39b7b91fccbdbbf4a786 because it wasn't required. Now there is a use case. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14084 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-07-05ctdb-daemon: Drop unused function ctdb_vfork_with_logging()Martin Schwenke1-10/+0
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-07-05ctdb-daemon: Replace function ctdb_ip_to_nodeid() with ctdb_ip_to_pnn()Martin Schwenke1-1/+2
Node ID is a poorly defined concept, indicating the slot in the node map where the IP address was found. This signed value also ends up compared to num_nodes, which is unsigned, producing unwanted warnings. Just return the PNN because this what both callers really want. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-07-05ctdb-daemon: Fix signed/unsigned comparisons by declaring as unsignedMartin Schwenke1-1/+1
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-07-05ctdb-daemon: Make old list_of_nodes() function staticMartin Schwenke1-3/+0
The next commit will change the type of this function, which is only used in this file. So, make it static to isolate the change. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2019-03-15ctdb-version: Simplify version string usageAmitay Isaacs1-3/+0
There is no need to write SAMBA_VERSION_STRING as CTDB_VERSION_STRING. Wherever required use SAMBA_VERSION_STRING directly. Avoids the confusion with two version.h files. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13789 Signed-off-by: Amitay Isaacs <amitay@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Fri Mar 15 06:31:50 UTC 2019 on sn-devel-144
2019-03-15ctdb-build: use a fixed ctdb_version.h using SAMBA_VERSION_STRINGStefan Metzmacher1-0/+3
This way we don't get constant rebuild as SAMBA_VERSION_STRING is "4.7.0pre1.DEVELOPERBUILD" for the binaries under bin/ instead of "4.7.0pre1.GIT.59e51f6". BUG: https://bugzilla.samba.org/show_bug.cgi?id=13789 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
2018-11-06ctdb-daemon: Drop unused function ctdb_set_socketname()Martin Schwenke1-1/+0
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-10-08ctdb-daemon: Drop implementation of RECEIVE_RECORDS controlAmitay Isaacs1-2/+0
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13641 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2018-10-08ctdb-daemon: Add invalid_records flag to ctdb_db_contextAmitay Isaacs1-0/+1
If a node becomes INACTIVE, then all the records in volatile databases are invalidated. This avoids the need to include records from such nodes during subsequent recovery after the node comes out INACTIVE state. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13641 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2018-07-02ctdb-daemon: Only consider client ID for local database attachMartin Schwenke1-2/+5
The comment immediately above this code says "don't allow local clients to attach" and then looks up the client ID regardless of whether the request is local or remote. This means that an intentional remote attach from a client will not work correctly. No real client should ever do that since clients attach so they an access databases locally. Perhaps some sanity checks should be added. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13500 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01ctdb-daemon: Move ctdb_init() to the only place it is usedMartin Schwenke1-5/+0
This used to be used by client code but not anymore, so move it to where it is used. Drop the comment because it is wrong. Modernise logging. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01ctdb-daemon: Drop unused function ctdb_set_notification_script()Martin Schwenke1-1/+0
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-05-01ctdb-client: Remove ununsed functions from old client codeAmitay Isaacs1-218/+0
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13411 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>