1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

51 Commits

Author SHA1 Message Date
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
Günther Deschner
8e16d6dbdf s3-build: only include ctdbd_conn.h where needed.
Guenther
2010-09-20 13:54:50 -07:00
Günther Deschner
5568ceda47 s3-ctdb: ctdbd_init_connection() is static to this file.
Guenther
2010-09-01 10:56:17 +02:00
Volker Lendecke
301bf22eab s3: Make ctdbd_init_connection static 2010-08-31 17:07:41 +02:00
Volker Lendecke
9e4ae600b7 s3: Remove procid_self() from ctdb_read_req() and ctdb_handle_message() 2010-07-05 11:06:32 +02:00
Volker Lendecke
1832e38425 s3: Remove some type-punned warnings 2010-07-05 11:06:32 +02:00
Günther Deschner
f6445d8f86 s3-build: fix the build.
Guenther
2010-05-18 12:27:31 +02:00
Michael Adam
e4af0bc5af s3:ctdb_conn: add ctdbd_conn_get_fd() to get the fd out of the ctdb connection
Michael
2010-02-12 23:12:12 +01:00
Volker Lendecke
12abab711b s3: Add ctdb_conn_msg_ctx() 2010-02-12 23:12:09 +01:00
Volker Lendecke
4c1c3f2549 s3: Implement global locks in a g_lock tdb
This is the basis to implement global locks in ctdb without depending on a
shared file system. The initial goal is to make ctdb persistent transactions
deterministic without too many timeouts.
2010-02-12 23:12:09 +01:00
Andrew Tridgell
74267d6524 s3-brlock: we don't need these MSG_SMB_UNLOCK calls now
These have been replaced with the min timeout in blocking.c
2010-02-05 22:17:26 -08:00
Volker Lendecke
d415d4d32f s3: Add parameter "ctdb timeout"
When something in the cluster blocks, it can happen that we wait indefinitely
long for ctdb, just adding to the blocking condition. In theory, nothing should
block, but as someone said "In practice the difference between theory and
practice is larger than in theory". This adds a timeout parameter in seconds,
after which we stop waiting for ctdb and panic.
2009-11-05 12:05:36 +01:00
Volker Lendecke
d9bdd17522 s3: Fix a 100% CPU loop when ctdbd dies during a traverse 2009-11-02 17:02:20 +01:00
Volker Lendecke
8300b255a5 Fix some nonempty blank lines 2009-08-07 13:02:15 +02:00
Jeremy Allison
d4a87ee966 Replace more long-lived contexts with talloc_autofree_context().
Jeremy.
2009-07-16 18:14:56 -07:00
Volker Lendecke
7070256f5e Do not crash in ctdbd_traverse if ctdbd is not around 2009-05-04 14:46:17 +02:00
Stefan Metzmacher
7540d13956 s3:ctdbd_conn: canonicalize ips before sending them to ctdbd
This makes samba work with older ctdb versions.

metze
2009-01-29 17:40:13 +01:00
Stefan Metzmacher
dc6edf1ab4 s3:cluster: fix ctdb ipv6 support
We need to use CTDB_CONTROL_TCP_CLIENT instead of CTDB_CONTROL_TCP_ADD.

CTDB_CONTROL_TCP_CLIENT has support for 2 modes in newer ctdb versions:

- with struct ctdb_control_tcp it only supports ipv4.
- with struct ctdb_control_tcp_addr it supports ipv4 and ipv6.

You need new header files which defines struct ctdb_control_tcp_addr,
but at runtime it should be fine to work against older
ctdb versions (<= 1.0.68).

metze
2009-01-16 15:16:59 +01:00
Stefan Metzmacher
c34d5f445a s3:events: change event_add_timed() prototype to match samba4
metze
2009-01-05 15:07:35 +01:00
Volker Lendecke
aed8c7bfcf packet.h API: The callback is now responsible to talloc_free() "buf" 2009-01-02 22:11:50 +01:00
Stefan Metzmacher
465176b7e2 s3:cluster: register the client connection via CTDB_CONTROL_TCP_ADD
This means we correctly pass IPv6 addresses too.
(CTDB_CONTROL_TCP_CLIENT was IPv4 only)

metze
2008-12-30 16:18:08 +01:00
Jelmer Vernooij
f6575a270f Use DATA_BLOB instead of "struct data_blob". 2008-10-13 05:31:01 +02:00
Michael Adam
4fa4a524de [s3]fix build --with-cluster-support after ndr_[pull|push]_struct blob changes.
Michael
2008-09-29 14:00:59 +02:00
Andrew Tridgell
b5f4373be5 fixed child exit handling and IP release handling
(This used to be commit 6fe27d296c)
2008-08-13 11:54:12 +02:00
Andrew Tridgell
2f09edb492 register the ctdbd reconfigure message
(This used to be commit 9d3217bb28)
2008-08-13 11:54:12 +02:00
Andrew Tridgell
5c306c67aa removed more unused code
(This used to be commit 30a697c82d)
2008-08-13 11:54:09 +02:00
Andrew Tridgell
9bf211db6d samba3 can't handle NOREPLY yet
(This used to be commit 21729256a5)
2008-08-13 11:54:08 +02:00
Andrew Tridgell
0f41961e4f first cut at adding full transactions for ctdb to samba3
(This used to be commit f91a3e0f7b)
2008-08-13 11:54:08 +02:00
Ronnie Sahlberg
fb97047a84 Use transaction start/cancel for persistent writes to avoid leaving the database in an inconsistent state if we crash during the operation
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
(This used to be commit 09329f1f91)
2008-08-13 11:54:06 +02:00
Michael Adam
a8a0dd4241 ctdbd_connect: bump debug level to 1 for "connect failed" message.
Leave level 0 message for higher level callers.

Michael
(This used to be commit fee770e5d0)
2008-06-26 12:31:11 +02:00
Volker Lendecke
3c02b180d0 Use right control to attach to persistent databases
This is a merge of 2a8f8b26f08ab09c34dff82417e541d8eb1ec91c and
4e6508dfee0d872a7fa42c9e58ba565137a27b3f from 3-0-ctdb
(This used to be commit 46e50da0d5)
2008-03-17 14:56:45 +01:00
Alexander Bokovoy
68694369fc Merge CTDB-related fixes from samba-ctdb 3.0 branch (http://samba.org/~tridge/3_0-ctdb)
Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit 0c8e23afbb)
2008-01-16 12:09:48 +03:00
James Peach
daba3f8b54 Fix connect(2) callers to use correct sockaddr size.
Some systems (eg Mac OSX 10.5) require the length passed to match
the socket address family. This introduces sys_connect() that does
the right thing, and replaces all uses oc connect(2) with sys_connect().

Note that there are some LGPL callers that still call connect(2)
directly.
(This used to be commit e1bfdc17c4)
2007-12-09 13:28:00 -08:00
Volker Lendecke
734025012f Fix an uninitialized variable
(This used to be commit e8b866ad87)
2007-11-22 16:00:13 +01:00
Volker Lendecke
f976f5e067 Convert ctdb_conn.c to enum ndr_error_code
Fix the build
(This used to be commit 432d0e9cb2)
2007-11-11 09:12:37 +01:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Volker Lendecke
33fd077575 r25323: Fix the build
(This used to be commit e55b30ab84)
2007-10-10 12:30:59 -05:00
Volker Lendecke
a116d7c7d9 r24773: Fix a ctdb connection lockup
The lockup could happen when packet_read_sync() gets two packets in a row, the
first one being an async message, and the second one being the response to a
ctdb request.

Also add some debug msg to ctdb_conn.c, and cut off the "locking key" messages
to only dump 20 hex chars at debug level 10. >10 will dump everything.
(This used to be commit 0a55880a24)
2007-10-10 12:30:20 -05:00
Volker Lendecke
7c257b2214 r24031: Fix some 64 bit warnings
(This used to be commit c0fd9a14cf)
2007-10-10 12:28:57 -05:00
Stefan Metzmacher
12324f017c r24025: packet_send() expects DATA_BLOB elements as vaargs
and not TDB_DATA

metze
(This used to be commit 3e4f552dbd)
2007-10-10 12:28:57 -05:00
Stefan Metzmacher
894a02ef4d r23863: handle NT_STATUS_RETRY and always print out the NTSTATUS string
before calling ctdb_fatal()

metze
(This used to be commit 48ece3c21e)
2007-10-10 12:28:35 -05:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00