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

93 Commits

Author SHA1 Message Date
Christian Ambach
764f2f99e0 s3-ctdb: return proper exit code
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
2012-08-03 14:49:01 +02:00
Christian Ambach
0a45e9c4d2 s3-ctdb: adjust a loglevel 2012-08-03 12:53:49 +02:00
Volker Lendecke
6cfe6e92a1 s3-ctdb: Fix ctdb_serverids_exist for target nodes that died
Signed-off-by: Christian Ambach <ambi@samba.org>
2012-08-03 12:53:49 +02:00
Volker Lendecke
6d83e35410 s3-ctdb: Add debugs to ctdb_serverids_exist
Signed-off-by: Christian Ambach <ambi@samba.org>
2012-08-03 12:53:49 +02:00
Michael Adam
9b9ef92701 s3:ctdbd_conn: use unitX_t types consistently throughout the module
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-08-01 12:30:26 +02:00
Volker Lendecke
7a2daf34f2 s3: Use string_term_tdb_data where appropriate
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-21 14:08:38 +02:00
Volker Lendecke
c6aa36c6c4 s3: Fix const warnings
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-21 14:08:38 +02:00
Volker Lendecke
0b501e823f s3: Make ctdbd_messaging_send_blob available in non-clustered mode
This will avoid the need for some #ifdefs
2012-04-17 10:21:02 +02:00
Volker Lendecke
05ff425c17 s3: Introduce ctdb_messaging_send_blob
Send a raw blob without the messaging.idl wrap
2012-04-17 10:21:01 +02:00
Volker Lendecke
a49ac23a10 s3: Return CTDB_PATH from lp_ctdbd_socket()
All callers had that fallback
2012-04-17 10:21:00 +02:00
Jelmer Vernooij
c0288e0612 lib/util: Remove obsolete sys_getpid() and sys_fork().
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
2012-03-24 21:55:40 +01:00
Jelmer Vernooij
eb3617c426 ctdb_conn: Avoid sys_connect. 2012-03-24 14:48:56 +01:00
Amitay Isaacs
5c5111ca03 s3-ctdb: Enable CTDB readonly support only if CTDB supports it
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Mon Mar  5 02:47:36 CET 2012 on sn-devel-104
2012-03-05 02:47:36 +01:00
Rusty Russell
5bda068773 dbwrap_ctdb: only fetch a read-only copy if we had a record already.
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>
2012-03-05 01:11:26 +01:00
Rusty Russell
67bb5abe81 ctdbd_conn: fetch read-only copies of records.
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>
2012-03-05 01:11:26 +01:00
Volker Lendecke
dd5868d41e s3: Add SERVERID_UNIQUE_ID_NOT_TO_VERIFY, bug 8760
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Feb 15 21:10:22 CET 2012 on sn-devel-104
2012-02-15 21:10:22 +01:00
Volker Lendecke
27f6421fa6 s3: Increase debug level of basic ctdb packet handling
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
2012-02-07 18:19:08 +01:00
Volker Lendecke
5fb578ee09 s3: FreeBSD does not define sin6_addr.s_addr32
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Feb  6 20:03:58 CET 2012 on sn-devel-104
2012-02-06 20:03:58 +01:00
Stefan Metzmacher
4a1895eb99 s3:lib/ctdbd_conn: try ctdbd_init_connection() as root
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
2011-12-23 18:19:13 +01:00
Günther Deschner
cf57fd44d7 s3-ctdb: fix the build w/o HAVE_CTDB_CONTROL_CHECK_SRVIDS_DECL
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
2011-12-12 17:42:29 +01:00
Volker Lendecke
99f2177e8f s3-ctdb: Make use of CTDB_CONTROL_CHECK_SRVIDS
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
2011-11-30 12:47:27 +01:00
Volker Lendecke
145f53e824 s3: server_id.pid has turned 64 (bits, that is)
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
2011-11-10 18:57:01 +01:00
Volker Lendecke
a29f7e632f s3-ctdb: Fix ctdb_read_req
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
2011-10-27 22:12:05 +02:00
Volker Lendecke
195ae03950 s3-ctdb: Add debug to ctdb_processes_exist 2011-10-27 20:28:31 +02:00
Volker Lendecke
c5cfc83a3e s3-ctdb: Make ctdbd_process_exists use ctdbd_processes_exist
Not strictly necessary, but more code exercise is good
2011-10-27 20:28:31 +02:00
Volker Lendecke
1c4fe39033 s3-ctdb: Add ctdb_processes_exist
This sends out a number of process_exists controls in parallel and collects the
replies as they come in.
2011-10-27 20:28:31 +02:00
Volker Lendecke
c2edecf6bd s3-ctdb: Allow ctdb_read_req to read any reqid 2011-10-27 20:28:31 +02:00
Volker Lendecke
2cf1347211 s3-ctdb: Don't hand out 0 as reqid
0 will be used as a wildcard reqid in ctdb_read_req
2011-10-27 20:28:31 +02:00
Volker Lendecke
4b9cc8f8f9 s3: Fix some type-punned warnings 2011-10-27 20:28:31 +02:00
Volker Lendecke
e52fa6298a s3: Silence some warnings
Rusty, please suggest a proper fix for this.

Thanks,

Volker Lendecke

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Aug 30 19:16:14 CEST 2011 on sn-devel-104
2011-08-30 19:16:14 +02:00
Volker Lendecke
77810431c9 s3: Remove a bogus comment 2011-08-25 21:36:19 +02:00
Andrew Bartlett
ad0a07c531 s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
d5e6a47f06 s3-talloc Change TALLOC_P() to talloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Christian Ambach
642c6ba2b9 Fix Bug 8152 - smbd crash in release_ip()
release_ip() needs the private_data, but it was never saved away
to feed it into release_ip() later

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Thu May 19 21:21:14 CEST 2011 on sn-devel-104
2011-05-19 21:21:14 +02:00
Günther Deschner
d8cfca3a9b s3: only include tdb headers where needed.
Guenther
2011-05-06 10:48:10 +02:00
Andrew Bartlett
f08250eb55 s3-ctdb Fix duplicate function name due to packet -> ctdb_packet rename.
Signed-off-by: Günther Deschner <gd@samba.org>
2011-05-03 14:38:29 +02:00
Andrew Bartlett
85fa87ea82 s3-ctdb Rename packet file and files to ctdb_packet
This avoids a conflicts with the Samba4 packet.c, as these is only
used in CTDB

Andrew Bartlett
2011-05-03 07:37:07 +02:00
Michael Adam
0e240bd6a9 s3:ctdb: pass the ctdb control flags to the ctdb daemon when sending the control
The only flag that is currently used is the NOREPLY flag to indicate that
the client expects no reply packet. This needs to get passed down to the
ctdb daemon so that it really does not send a reply.
2011-03-31 18:10:22 +02:00
Michael Adam
6cc8457cd5 s3:ctdb: samba can now handle the NOREPLY flag
Revert "samba3 can't handle NOREPLY yet"

This reverts commit 9bf211db6d.
2011-03-31 18:10:22 +02:00
Michael Adam
fd41b4f1a6 s3:ctdb: correctly handle cstatus if CTDB_CTRL_FLAG_NOREPLY is set. 2011-03-31 18:10:22 +02:00
Günther Deschner
ab36d597e7 s3-messages: make ndr_messaging.h part of messages.h.
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
b2af281e50 s3-messages: only include messages.h where needed.
Guenther
2011-03-30 01:13:09 +02:00
Günther Deschner
9f9e195124 s3-packet: only include packet.h where needed.
Guenther
2011-03-16 16:56:47 +01:00
Volker Lendecke
2b0057c2cb s3: Eliminate select from packet_fd_read_sync 2011-02-28 16:40:19 +01:00
Günther Deschner
50be0b2c1e s3: Remove superfluous ;
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Feb  2 15:44:21 CET 2011 on sn-devel-104
2011-02-02 15:44:21 +01:00
Volker Lendecke
46a3019d36 s3: Fix the code to immediately disconnect from a non-working ctdbd 2011-01-21 10:10:02 +01:00
Volker Lendecke
18e3b223c7 s3: Do not connect to ctdb if it is blocked for some reason 2010-11-02 15:59:05 +01:00
Martin Schwenke
27056d37e0 cluster_fatal() exit code should not indicate success.
cluster_fatal() logs a fatal event and then exits with 0.  This seems
wrong.  Sometimes command like "net" use this code and return
incorrect empty output but then exit with 0.

This simply changes the exit code to 1.

Signed-off-by: Martin Schwenke <martin@meltin.net>
2010-11-02 15:59:05 +01:00
Volker Lendecke
7aa45b06c0 s3: Pass tdb_flags to ctdbd when attaching to a db
This is required to make ctdb create databases with INCOMPATIBLE_HASH
2010-10-26 15:43:31 +02:00
Volker Lendecke
c4efae77fa s3: Remove talloc_autofree_context() from ctdb_read_req() 2010-09-26 03:29:28 +02:00