summaryrefslogtreecommitdiffstats
path: root/source3/lib/ctdbd_conn.c
Commit message (Collapse)AuthorAgeFilesLines
* messaging3: Add and use messaging_tevent_context()Volker Lendecke2014-05-311-3/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Exit with ctdb_fatal if serverids_exist failsVolker Lendecke2014-05-241-4/+4
| | | | | | | | | | | The only reason why this could fail is a severe ctdb communications problem. The normal way to deal with this is ctdb_fatal. This avoids a confusing panic in get_share_mode_lock when ctdb is shutdown while this call happens. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* messaging: Nobody uses G_LOCK_RETRY anymoreVolker Lendecke2014-05-061-9/+0
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue May 6 23:01:22 CEST 2014 on sn-devel-104
* s3:wscript: only build ctdb_dummy.c if we have no cluster supportStefan Metzmacher2014-03-241-4/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:param: move lp_ctdbd_socket() to ctdbd_conn.cStefan Metzmacher2014-03-241-0/+12
| | | | | | | This allows us to use CTDB_PATH only in ctdbd_conn.c Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:lib: move all ctdb related dummy functions to ctdb_dummy.cStefan Metzmacher2014-03-241-14/+0
| | | | | | | This gets all dummy functions for the build without CLUSTER_SUPPORT. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:ctdbd_conn: always provide ctdb_serverids_exist()Stefan Metzmacher2014-03-241-4/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:ctdbd_conn: add ctdb_serverids_exist_supported()Stefan Metzmacher2014-03-241-0/+9
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:lib/ctdbd_conn: let release_ip_handler return boolStefan Metzmacher2014-02-211-6/+30
| | | | | | | | If it returns true the passed ip address matched and we let a nested ctdb operation fail with NT_STATUS_ADDRESS_CLOSED. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* smbd/winbindd: Do an early check if ctdbd is functionalVolker Lendecke2013-10-171-0/+24
| | | | | | | | | This will avoid panic calls when smbd and winbind is started in cluster mode before ctdb is functional. It still logs something sane at debug level 0, but it does not panic and core anymore. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdbd_conn: Remove one call to cluster_fatalVolker Lendecke2013-10-171-1/+0
| | | | | | | | This is during startup of a ctdb connection, thus it is not as important as in other cases to immediately exit to free up resources Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdbd_conn: Remove one call to cluster_fatalVolker Lendecke2013-10-171-1/+2
| | | | | | | | This is during startup of a ctdb connection, thus it is not as important as in other cases to immediately exit to free up resources Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdbd_conn: Lift the cluster_fatal call in get_cluster_vnnVolker Lendecke2013-10-171-1/+3
| | | | | | | We have to report a proper error when ctdbd is not around Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* dbwrap_ctdb: Treat empty records as non-existingVolker Lendecke2013-08-281-0/+8
| | | | | | | | | This is a patch implementing the workaround Christian mentioned in https://bugzilla.samba.org/show_bug.cgi?id=10008#c5 Bug: https://bugzilla.samba.org/show_bug.cgi?id=10008 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christian Ambach <ambi@samba.org>
* libctdb: Avoid an explicit memsetVolker Lendecke2013-08-161-2/+1
| | | | | | | | | | Give the compiler a chance to use better code. Saves a few bytes of text. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Aug 16 01:51:55 CEST 2013 on sn-devel-104
* ctdb-conn: remove ctdbd_fetchVolker Lendecke2013-03-261-81/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ctdb-conn: Add ctdbd_parseVolker Lendecke2013-03-261-0/+71
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:lib: s/event_add_timed/tevent_add_timerStefan Metzmacher2013-02-191-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:lib: s/event_add_fd/tevent_add_fd and s/EVENT_FD_/TEVENT_FD_Stefan Metzmacher2013-02-191-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:lib: s/struct fd_event/struct tevent_fdStefan Metzmacher2013-02-191-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:lib: s/struct timed_event/struct tevent_timerStefan Metzmacher2013-02-191-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:lib: s/struct event_context/struct tevent_contextStefan Metzmacher2013-02-191-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3-ctdb: Make sure addr.sun_path is null terminated.Andreas Schneider2012-12-121-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* s3-ctdb: return proper exit codeChristian Ambach2012-08-031-1/+1
| | | | | | | do not loose the result from ctdbd_messaging_send_blob() Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Fri Aug 3 14:49:01 CEST 2012 on sn-devel-104
* s3-ctdb: adjust a loglevelChristian Ambach2012-08-031-2/+2
|
* s3-ctdb: Fix ctdb_serverids_exist for target nodes that diedVolker Lendecke2012-08-031-4/+20
| | | | Signed-off-by: Christian Ambach <ambi@samba.org>
* s3-ctdb: Add debugs to ctdb_serverids_existVolker Lendecke2012-08-031-10/+20
| | | | Signed-off-by: Christian Ambach <ambi@samba.org>
* s3:ctdbd_conn: use unitX_t types consistently throughout the moduleMichael Adam2012-08-011-22/+22
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Use string_term_tdb_data where appropriateVolker Lendecke2012-06-211-2/+1
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3: Fix const warningsVolker Lendecke2012-06-211-2/+3
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* s3: Make ctdbd_messaging_send_blob available in non-clustered modeVolker Lendecke2012-04-171-1/+10
| | | | This will avoid the need for some #ifdefs
* s3: Introduce ctdb_messaging_send_blobVolker Lendecke2012-04-171-20/+20
| | | | Send a raw blob without the messaging.idl wrap
* s3: Return CTDB_PATH from lp_ctdbd_socket()Volker Lendecke2012-04-171-4/+0
| | | | All callers had that fallback
* lib/util: Remove obsolete sys_getpid() and sys_fork().Jelmer Vernooij2012-03-241-2/+2
| | | | | | | | | The performance of these is minimal (these days) and they can return invalid results when used as part of applications that do not use sys_fork(). Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Mar 24 21:55:41 CET 2012 on sn-devel-104
* ctdb_conn: Avoid sys_connect.Jelmer Vernooij2012-03-241-1/+3
|
* s3-ctdb: Enable CTDB readonly support only if CTDB supports itAmitay Isaacs2012-03-051-1/+8
| | | | | Autobuild-User: Amitay Isaacs <amitay@samba.org> Autobuild-Date: Mon Mar 5 02:47:36 CET 2012 on sn-devel-104
* dbwrap_ctdb: only fetch a read-only copy if we had a record already.Rusty Russell2012-03-051-2/+3
| | | | | | | | | | | | | Because revoking read-only copies of records is expensive, we only want ctdbd to do it for high-turnover records. A basic heuristic is that if we don't find a local copy of the record, don't ask for a read-only copy. The fetch itself will cause ctdbd to migrate the record, so eventually we will have a local copy. Next time it gets migrated away, we'll call ctdbd_fetch() with local_copy = true. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* ctdbd_conn: fetch read-only copies of records.Rusty Russell2012-03-051-2/+2
| | | | | | | This means we try to get a read-only copy of a record, which we can then place in the local tdb. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s3: Add SERVERID_UNIQUE_ID_NOT_TO_VERIFY, bug 8760Volker Lendecke2012-02-151-2/+9
| | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Feb 15 21:10:22 CET 2012 on sn-devel-104
* s3: Increase debug level of basic ctdb packet handlingVolker Lendecke2012-02-071-6/+6
| | | | | | | | This clutters the debug level 10 output significantly without much value Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Tue Feb 7 18:19:08 CET 2012 on sn-devel-104
* s3: FreeBSD does not define sin6_addr.s_addr32Volker Lendecke2012-02-061-1/+1
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Mon Feb 6 20:03:58 CET 2012 on sn-devel-104
* s3:lib/ctdbd_conn: try ctdbd_init_connection() as rootStefan Metzmacher2011-12-231-0/+2
| | | | | | | | | | | ctdbd_traverse is only called if the main db_context is already open. So if we could get to information via dbwrap_fetch, we should also be able to traverse. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Dec 23 18:19:14 CET 2011 on sn-devel-104
* s3-ctdb: fix the build w/o HAVE_CTDB_CONTROL_CHECK_SRVIDS_DECLGünther Deschner2011-12-121-0/+4
| | | | | | | | | Volker, please check. Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Mon Dec 12 17:42:29 CET 2011 on sn-devel-104
* s3-ctdb: Make use of CTDB_CONTROL_CHECK_SRVIDSVolker Lendecke2011-11-301-2/+210
| | | | | | | | This should be a lot quicker than PROCESS_EXISTS followed by looking at serverid.tdb Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Wed Nov 30 12:47:27 CET 2011 on sn-devel-104
* s3: server_id.pid has turned 64 (bits, that is)Volker Lendecke2011-11-101-4/+11
| | | | | | | | Fix ctdb_processes_exist protocol. The socket expects pid_t which is 32 bits on 32 bit machines. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu Nov 10 18:57:01 CET 2011 on sn-devel-104
* s3-ctdb: Fix ctdb_read_reqVolker Lendecke2011-10-271-23/+17
| | | | | | | | | If a complete request has come in already before we consumed it, the ctdb_packet_fd_read_sync will block indefinitely. So always try packet_handler first and only if that fails due to insufficient data, read from the socket. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu Oct 27 22:12:05 CEST 2011 on sn-devel-104
* s3-ctdb: Add debug to ctdb_processes_existVolker Lendecke2011-10-271-0/+6
|
* s3-ctdb: Make ctdbd_process_exists use ctdbd_processes_existVolker Lendecke2011-10-271-13/+8
| | | | Not strictly necessary, but more code exercise is good
* s3-ctdb: Add ctdb_processes_existVolker Lendecke2011-10-271-0/+98
| | | | | This sends out a number of process_exists controls in parallel and collects the replies as they come in.
* s3-ctdb: Allow ctdb_read_req to read any reqidVolker Lendecke2011-10-271-1/+1
|