summaryrefslogtreecommitdiff
path: root/ctdb/include
Commit message (Collapse)AuthorAgeFilesLines
* ctdb-daemon: Fix format-nonliteral warningAmitay Isaacs2016-08-241-1/+2
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Uri Simchoni <uri@samba.org> (cherry picked from commit 5176354d1279f0e3c216c58ea8637579d9a6a389)
* ctdb-daemon: Fix format-nonliteral warningAmitay Isaacs2016-08-241-1/+1
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Uri Simchoni <uri@samba.org> (cherry picked from commit d682ee99810caac489c20d8b673ff4b12a17d75f)
* ctdb-daemon: Drop implementation of global transaction controlsAmitay Isaacs2016-07-281-4/+0
| | | | | | | | | These were used in serial recovery and for restoring databases using older ctdb tool. New code uses database specific transaction controls. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Deletion of IPs is deferred until the next takeover runMartin Schwenke2016-07-281-2/+1
| | | | | | | | | | | This drastically simplifies the code. "ctdb reloadips" behaves the same, since it causes a takeover run immediately after IPs are deleted. "ctdb delip" now needs to be followed with an explicit "ctdb ipreallocate". Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-daemon: Fix statistics update macroAmitay Isaacs2016-07-281-2/+2
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Move CTDB VNN structure to IP takeover codeMartin Schwenke2016-07-281-33/+0
| | | | | | | It is only used in this code. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-locking: Remove ctdb_db_prio_iterator functionAmitay Isaacs2016-07-251-2/+0
| | | | | | | It is not used anymore. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-freeze: Remove ctdb_db_prio_frozen() functionAmitay Isaacs2016-07-251-1/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-locking: Remove API for locking databases with priorityAmitay Isaacs2016-07-251-9/+0
| | | | | | | This is not used anymore. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-locking: Remove API for locking all databasesAmitay Isaacs2016-07-251-6/+0
| | | | | | | This has never been used. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Remove priority field from ctdb_db_contextAmitay Isaacs2016-07-251-1/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-client: Remove client code for set/get_db_priorityAmitay Isaacs2016-07-251-7/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Remove implementation of SET/GET_DB_PRIORITYAmitay Isaacs2016-07-251-3/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Drop priorites from freeze/thaw codeAmitay Isaacs2016-07-251-4/+3
| | | | | | | | | | | Parallel database recovery freezes databases in parallel and irrespective of database priority. So drop priority from freeze/thaw code. Database priority will be dropped completely soon. Now FREEZE and THAW controls operate on all the databases. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-client: Mark ctdb_ctrl_freeze_priority staticAmitay Isaacs2016-07-251-2/+0
| | | | | | | It is not used outside ctdb_client.c Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-client: Drop unused functions ctdb_ctrl_freeze_send/recvAmitay Isaacs2016-07-251-8/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-client: Remove functions ctdb_ctrl_thaw_priority() and ctdb_ctrl_thaw()Amitay Isaacs2016-07-251-5/+0
| | | | | | | These functions are not used anywhere. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-ipalloc: Don't build a global IP treeMartin Schwenke2016-07-041-3/+0
| | | | | | | | | It isn't used outside this function, so just use a local variable. This makes create_merged_ip_list() independent of the CTDB context. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-ipalloc: Drop code to update IP assignment treeMartin Schwenke2016-07-041-4/+0
| | | | | | | This code is not used. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-recoverd: Recovery lock handle should be in recovery deamon contextMartin Schwenke2016-06-081-1/+0
| | | | | | | This shouldn't be in the CTDB context. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-daemon: Rename recovery lock file to just recovery lockMartin Schwenke2016-06-081-1/+1
| | | | | | | | | It isn't necessarily a file. Don't bother changing the control, since it doesn't pervade the code. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-daemon: Drop function ctdb_set_recovery_lock_file()Martin Schwenke2016-06-081-3/+1
| | | | | | | Setting the recovery lock file at startup can be done more simply. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-client: Remove support for SET_RECLOCKMartin Schwenke2016-06-081-3/+0
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-takeover: Recovery daemon no longer passes fail callbackMartin Schwenke2016-05-131-2/+1
| | | | | | | | | | | | | Banning is now handled by the takeover code sending banning credit messages. This commit makes a change in behaviour quite obvious. Takeover runs were initiated from several locations in the code but banning was only done from one of these locations. Now banning can be done from any failed takeover run. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-recovery: Move recovery lock functions to recovery daemon codeMartin Schwenke2016-04-281-4/+0
| | | | | | | | | ctdb_recovery_have_lock(), ctdb_recovery_lock(), ctdb_recovery_unlock() are only used by recovery daemon, so move them there. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-recovery: Reimplement ctdb_recovery_lock() using ctdb_cluster_mutex()Martin Schwenke2016-04-281-1/+3
| | | | | | | | | | Replace the file descriptor for the recovery lock in the CTDB context with the cluster mutex handle, where non-NULL means locked. Attempting to take the recovery lock is now asynchronous and no longer blocks the recovery daemon. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-protocol: Remove data structures for obsolete server_id controlsAmitay Isaacs2016-04-231-5/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-client: Remove client functions related to server_idAmitay Isaacs2016-04-231-14/+0
| | | | | | | | | These functions were used in the transaction code. These controls did not use server_id structure defined in samba, so samba would not use them. Instead check if the process exists for conflicting g_lock entry. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Remove unused controls related to server_idAmitay Isaacs2016-04-231-1/+0
| | | | | | | | | These controls have never been used and also they do not use the server_id structure defined in samba. In future, similar controls can be added to register/unregister using proper server_id structure. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Drop --single-public-ip option and related codeMartin Schwenke2016-04-151-3/+0
| | | | | | | This has been replaced by scripts. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-daemon: Remove implementation of CTDB_CONTROL_KILL_TCPMartin Schwenke2016-04-011-3/+0
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-client: Drop killtcp client functionsMartin Schwenke2016-04-011-4/+0
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-daemon: Implement new controls DB_PULL and DB_PUSH_START/DB_PUSH_CONFIRMAmitay Isaacs2016-03-251-0/+11
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-client: Drop support for updating NAT gateway capabilityMartin Schwenke2016-01-271-3/+0
| | | | | | | This is no longer used. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-ipalloc: ctdb_takeover_run_core() takes ipalloc_stateMartin Schwenke2015-11-201-4/+0
| | | | | | | | | | | | | | | | | | As do the functions called below it. They no longer need a CTDB context. create_merged_ip_list() now takes both a CTDB context and an ipalloc_state. Drop ipalloc_state from CTDB context. So the substitution in the code is: ctdb->ipalloc_state -> ipalloc_state Tweak the test code to match. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-ipalloc: Move IP allocation state into its own structMartin Schwenke2015-11-201-6/+4
| | | | | | | | | | Most of the IP allocation code does not need a CTDB context. However, temporarily hang this off the CTDB context and make only the changes relating to known/available IP address. This makes those logic changes obvious without burying them in function type changes. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-daemon: Move script timeout count into monitor stateMartin Schwenke2015-11-161-1/+0
| | | | | | | It is only used by the monitoring code. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-daemon: Remove unused ctdb_logging.[ch]Amitay Isaacs2015-11-161-34/+0
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-logging: Remove duplicate definitionsAmitay Isaacs2015-11-161-11/+1
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-logging: Move debug_extra definition to server/ctdb_logging.cAmitay Isaacs2015-11-162-2/+2
| | | | | | | | | This variable is used for adding a prefix to log entries from various child processes. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-daemon: Move ctdb_fork.c to serverAmitay Isaacs2015-11-161-0/+12
| | | | | | | | These functions are only used in the ctdb daemon code. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-daemon: Move switch_from_server_to_client() to ctdb_daemon.cAmitay Isaacs2015-11-162-3/+3
| | | | | | | | This function can only called from ctdb daemon. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdb-recoverd: Reload remote IPs as part of takeover runMartin Schwenke2015-11-121-2/+0
| | | | | | | | | | | | | This is currently done before each IP takeover run, so just factor it in. ctdb_reload_remote_public_ips() becomes static. 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): Thu Nov 12 09:28:45 CET 2015 on sn-devel-104
* ctdb-recoverd: Move ctdb_reload_remote_public_ips() to ctdb_takeover.cMartin Schwenke2015-11-121-3/+2
| | | | | | | | | | This will help to untangle known and available public IP lists from the CTDB context. verify_remote_ip_allocation() needs a forward declaration. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-include: Use new protocol definitionsAmitay Isaacs2015-11-041-717/+2
| | | | | | | This gets rid of the duplicate definitions from ctdb_protocol.h. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-include: Remove unused definitionsAmitay Isaacs2015-11-041-6/+0
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Rename struct ctdb_control_get_ifaces to ctdb_iface_list_oldAmitay Isaacs2015-11-042-2/+2
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Rename struct ctdb_control_public_ip_info to ↵Amitay Isaacs2015-11-042-2/+2
| | | | | | | ctdb_public_ip_info_old Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Rename struct ctdb_control_iface_info to ctdb_ifaceAmitay Isaacs2015-11-042-4/+4
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
* ctdb-daemon: Rename struct ctdb_control_transdb to ctdb_transdbAmitay Isaacs2015-11-041-2/+2
| | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>