1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

308 Commits

Author SHA1 Message Date
Amitay Isaacs
f9be4803cb db_wrap: Make sure tdb messages are logged correctly
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 60cb40d090e45ff6134c098a238fac7ad854f134)
2013-08-14 16:55:51 +10:00
Mathieu Parent
d82b9ae410 build: Fix tdb.h path to enable building with system TDB library
(This used to be ctdb commit f8bf99de3a5f56be67aaa67ed836458b1cf73e86)
2013-06-14 16:45:27 +10:00
Amitay Isaacs
2afa275a68 tevent: Sync to tevent 0.9.18 from upstream
(This used to be ctdb commit 82d61f77c01df0fbb42743593937b175ce22a445)
2013-05-29 17:47:16 +10:00
Amitay Isaacs
4c1dc871b9 replace: Sync to latest replace from upstream
The latest commits affecting lib/replace remove autoconf build from
Samba tree.  So using following commit as a sync point.

  commit 9ddfd7d878
  Author: Andrew Bartlett <abartlet@samba.org>
  Date:   Wed May 22 17:23:30 2013 +1000

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 506b27c944b4031e8a325816bd12abddd442a0bb)
2013-05-29 17:47:16 +10:00
Amitay Isaacs
fe1fc55c61 tdb: Sync to tdb 1.2.11 from upstream
(This used to be ctdb commit bb3a32ec055432afc7225c9fd7504fb187694bda)
2013-05-29 17:47:16 +10:00
Amitay Isaacs
803416d978 talloc: Sync to talloc 2.0.8 from upstream
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 3bffca8c17e441364525df115ee2ac16b5969e24)
2013-05-29 17:47:16 +10:00
Amitay Isaacs
e6208ea453 util: Do not stop build if backtracing is not supported
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit b091f09ea01482823bd850d1d4e2329e0a19c959)
2013-05-29 14:57:03 +10:00
Sumit Bose
d2ed7429b7 build: Fix for tevent autoconf check
The list of include files is the 4th argument of AC_CHECK_DECLS.

(This used to be ctdb commit 85b777196289646ca37e06ebbf1f7a684d0aabc5)
2013-03-27 12:20:17 +11:00
Amitay Isaacs
dd050cd4ba util: Add hex_decode_talloc() to decode hex string into a binary blob
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 307416afda707b687f5e89e8438e45c154a4c806)
2013-03-25 17:45:23 +11:00
Volker Lendecke
4c5852bf0f build: Fix the build with old system-installed tevent
We depend on the tracing callback mechanism in ctdb.

(This used to be ctdb commit 5f58c811127a89f162b6a41ddcd6e944801740a5)
2012-11-08 12:57:58 +11:00
Stefan Metzmacher
be2c9614ab tevent: change version to 0.9.16
This adds tevent_*_trace_*() and tevent_context_init_ops()

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jun  8 20:47:41 CEST 2012 on sn-devel-104

(This used to be ctdb commit 0dc204988eadff214dd149a756d756ab6e96e410)
2012-06-12 15:40:20 +10:00
Stefan Metzmacher
4e6686e186 tevent: expose tevent_context_init_ops
This can be used to implement wrapper backends,
while passing a private pointer to the backens init function
via ev->additional_data.

metze

(This used to be ctdb commit 7ebc00dc6a89043a971a720e7c21baf5f2a0233d)
2012-06-12 15:38:56 +10:00
Martin Schwenke
c1d7791578 lib/tevent: Add trace point callback
Set/get a single callback function to be invoked at various trace
points.  Define "before wait" and "after wait" trace points - more
trace points can be added later if required.

CTDB wants this to log long waits and events.

Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>

(This used to be ctdb commit cb2bbe93628c1ab932c2e1ad6e2ec199a98f74c6)
2012-06-12 15:37:47 +10:00
Martin Schwenke
6edf0ecb43 Revert "TEVENT: Add back tracking of long runnig events to the local copy of tevent library"
This reverts commit 5aba53e6adcfcd7edbdac9e30aa5fcba176aca00.

Do this using new tevent trace point callback.

(This used to be ctdb commit 88040778aace229d724de1ba7556aded12e22f86)
2012-06-12 15:34:53 +10:00
Martin Schwenke
6c83c0ae9c lib/tevent: In poll_event_context, add a pointer back to the tevent_context
This makes it consistent with the other backends.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>

(This used to be ctdb commit e0c9200c05b1f7a04e002f505ebb5ba9340c0ca1)
2012-06-12 11:39:57 +10:00
Stefan Metzmacher
46abaf6131 lib/tevent/testsuite: no longer use 'compat' symbols
metze

(This used to be ctdb commit 6559106b8b853920f325f2dba532f4008e931fa3)
2012-06-12 11:38:31 +10:00
Amitay Isaacs
7631830152 server: Replace BOOL datatype with bool, True/False with true/false
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 6e5cbe8fff71985e5a2fc16b7e9f2b868011ff5d)
2012-05-28 11:22:25 +10:00
Ronnie Sahlberg
dd647d45cb TEVENT: Add back tracking of long runnig events to the local copy of tevent library
(This used to be ctdb commit 5aba53e6adcfcd7edbdac9e30aa5fcba176aca00)
2012-05-21 09:17:37 +10:00
Ronnie Sahlberg
4426f9a531 Merge remote branch 'amitay/tdb-sync'
(This used to be ctdb commit 8052ee0a6bda3fa88501d77b2d53315be2b75ec1)
2012-04-26 08:09:34 +10:00
Ronnie Sahlberg
db411aaada Merge remote branch 'amitay/tevent-sync'
(This used to be ctdb commit 17ff3f240b0d72c72ed28d70fb9aeb3b20c80670)
2012-04-26 08:09:23 +10:00
Amitay Isaacs
8f643897bb lib/tdb: Sync tdb from samba git tree
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 0f40ea2386892ae10b30beeded0e00edf4c019c3)
2012-04-13 17:49:03 +10:00
Amitay Isaacs
d6383c3ca5 lib/tdb: Remove the files required to build tdb as a library
Since tdb library will never be built from ctdb sources, we don't need the build
related files.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit a7aace3d165e6cb7d63950107e584edaee12a357)
2012-04-13 17:44:56 +10:00
Amitay Isaacs
83015a11cc lib/talloc: Sync talloc from samba git tree
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 670ebada4bafe79bd535c9bb5cc2d5d49d646af3)
2012-04-13 17:28:51 +10:00
Amitay Isaacs
25a7c32930 lib/talloc: Remove the files required to build talloc as a library
Since talloc library will never be built from ctdb sources, we don't need the
build related files.

(This used to be ctdb commit 2cd6a7ce648c1d2cc4d5580c3809858c100fa930)
2012-04-13 17:28:51 +10:00
Amitay Isaacs
195cf3c87e lib/tevent: Sync tevent from samba git tree
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 483459c79884891b3639a8bb865d5e8318cde98c)
2012-04-13 17:28:15 +10:00
Amitay Isaacs
f16a180f6f lib/tevent: Remove the files required to build tevent as a library
Since we are not going to build tevent library from ctdb source, remote build
related files.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit efbb7e0b9dcde547b46efd8e3b26c571e4fcf893)
2012-04-13 17:28:15 +10:00
Amitay Isaacs
3381b597d6 lib/tevent: Remove local modifications to tevent
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit d1bc4a97ea649f5a07802178591688e438313ff8)
2012-04-13 17:28:14 +10:00
Amitay Isaacs
4392591555 Remove explicit include of lib/tevent/tevent.h.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 0681014ca5ed2a9b56f63fdace7f894beccf8a9a)
2012-04-13 17:28:14 +10:00
Amitay Isaacs
131d35d67d includes: Move special tevent defines from tevent.h to includes.h
This allows to build against system tevent library. Also include tevent header
along with other common headers.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 9ae4389c2c959c5dcd8395fdae2b25ed7e1e873a)
2012-04-13 17:28:14 +10:00
Amitay Isaacs
634bbc5469 build: Use system tdb library if available
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 10ab88a5c822ac403a70a9cd1a6c81020eb91d08)
2012-03-30 12:33:28 +11:00
Amitay Isaacs
13124e356e build: Use system tevent library if available
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 2ade83de4e1f318c91489ec9a7f90d1b26f77e1b)
2012-03-30 12:33:28 +11:00
Amitay Isaacs
89415a1f00 build: Use system talloc library if available
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 94f1e02406c353c3a0235685acdd107ee5a7f285)
2012-03-30 12:33:27 +11:00
Ronnie Sahlberg
94b7a84cb1 change TDB to be valgrind nice
(This used to be ctdb commit d306c3c9a53e012c412c96ab9743de6cd96826e0)
2012-02-22 16:07:17 +11:00
Michael Adam
b859e8874c add socket_wrapper from samba
(This used to be ctdb commit 99ce8a9de648babdfb1b1ea0219ee184c9718048)
2011-11-26 00:34:55 +01:00
Andreas Schneider
4b32457822 libutil: Remove obsolete signal type cast.
(This used to be ctdb commit 8dd377b6a4d188af086f9a5b41a1b48e44eda6f3)
2011-11-26 00:34:55 +01:00
Michael Adam
2c0abf2dcf update lib/replace to current upstream version (samba master)
(This used to be ctdb commit 17bcffab19fdbb435b4745ff90c327342bbbf0f8)
2011-11-26 00:34:54 +01:00
Martin Schwenke
52ff485958 Added some #ifndefs to stop files being included multiple times.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit fdca12c25e6fce6206135b994dedf44265e4eb09)
2011-11-11 14:31:50 +11:00
Martin Schwenke
8b6f898ee9 Fix lib/replace
Warnings are generated when compiling strptime.c.  Why is it being
compiled on Linux?  strptime(3) has been in glibc for 15 years!

It turns out that some of the test fragments were being looked for in
lib/replace/test/ and some in lib/replace/tests/.  In addition,
test*/strptime.c was missing.

Move the tests to lib/replace/test/ for consistency with upstream
(Samba) and copy in test/strptime.c from Samba.  Tweak repdir.m4 to
handle the directory rename.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit aaf1ddfc83cf2ede29288baf04a1aa1c69a5cab5)
2011-11-11 14:29:36 +11:00
Martin Schwenke
85a4024651 Clean up warnings: popt sure does some strange things
popt generates 4 compiler warnings with GCC 4.6.  There are 2
different types:

* 3 instances of:

    warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]

  One occurs in the _free() hack that is used to try and avoid a
  compiler warning.  I guess GCC got smarter?  ;-)

  The other is where an array of constant strings is passed to
  execvp(2), which arguably has the wrong type, since it has no need
  to modify the strings.

  Both of these can be worked around by casting to intptr_t before
  casting to the desired argument type.

  In poptReadConfigFile() the variable file is declared to be a
  constant string.  However, it is then passed to read(2) straight
  away and an attempt is made to cast away the "const".  However, to
  protect the value the of file is assigned to (const char *) chptr
  before it is passed to any other functions, so this protects the
  value anyway.  I'm not sure exactly what the thinking was
  here... but there seems to be no use having file be constant.

* 1 instance of:

    warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]

  for the result of an execvp(2) call.  Recast the return type to
  void.  However, due to some #if-fu in the function, that can make rc
  unused in this function.  So we also need to wrap the declaration of
  rc in some corresponding #if-fu to make it disappear if not used.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit ac9236e64bd0b61740cc787819a1222bc6a67d4a)
2011-11-11 14:28:30 +11:00
Martin Schwenke
954726568c Clean up warnings: -Wunused-but-set-variable in tevent_signal.c
Have sent this upstream to Samba.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 080edee3d053d770466ebcc976eb1135c80feef8)
2011-11-10 14:08:59 +11:00
Martin Schwenke
59b4d7bf9d Clean up warnings: ‘tevent_loop_allow_nesting’ is deprecated
CTDB wants to use these functions but Samba's tevent wants to mark
them deprecated.  This adds a #define to shut up the warnings and sets
it in CFLAGS.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 788cdbddbc902a5b076d23473450065b551d274d)
2011-11-09 14:41:17 +11:00
Mathieu Parent
df0dd8a3ab Fix broken readdir
Submited by Lorenzo De Liso on <http://bugs.debian.org/603155>
(originaly named 99-fix-broken-readdir-test.diff). Also reported as
<https://bugzilla.samba.org/show_bug.cgi?id=7032>.

(This used to be ctdb commit 29474420606e802c83b53ef5f8e372c8eeac83c1)
2011-10-12 20:06:13 +11:00
Ronnie Sahlberg
d78b0ff985 Drop loglevel for a tevent message from FATAL to ERROR
CQ S1028400

(This used to be ctdb commit 3ce1d3d6c8b8fd3097b8efd2c75797ed7682a562)
2011-09-08 11:23:16 +10:00
Rusty Russell
e68b97ffc9 tdb: expose transaction lock infrastructure for ctdb
tdb_traverse_read() grabs the transaction lock.  This can cause ctdbd
(which uses it) to block when it should not; expose mark and normal
variants of this lock, so ctdbd's child (the recovery daemon) can
acquire it and the ctdbd parent can mark it was held.

(This used to be ctdb commit d09fa845bd848d04507853809acf42e0471b44bf)
2011-01-18 14:07:41 +11:00
Ronnie Sahlberg
849ef2e39b change Christinas previous patch to only perform the check/logging
if we are the main ctdb daemon.
Other daemons/child processes are not guaranteed to get events on regular basis
so those should not be checked.

(This used to be ctdb commit ac2afe9c25753b837d5f6396020e0f3c65ef3628)
2011-01-17 12:01:28 +11:00
Christian Ambach
ad56f321c8 improve timing issue detections
the original "Time jumped" messages are too coarse to interpret
exactly what was going wrong inside of CTDB.

This patch removes the original logs and adds two other logs that
differentiate between the time it took to work on an event and
the time it took to get the next event.

(This used to be ctdb commit fd8d54292f10b35bc4960d64cfa6843ce9aba225)
2011-01-17 11:56:55 +11:00
Rusty Russell
4b9e5fbe46 idtree: fix overflow for v. large ids on allocation and removal
(Imported from SAMBA commit 09a6538969ac).

Chris Cowan tracked down a SEGV in sub_alloc: idp->level can actually
be equal to 7 (MAX_LEVEL) there, as it can be in sub_remove.

(We unfairly blamed a shift of a signed var for this crash in commit
 2db1987f5a).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

(This used to be ctdb commit 73764104356d3738d9d20a9d06ce51535f74f475)
2010-12-07 15:37:25 +11:00
Rusty Russell
c333126496 idtree: fix right shift of signed ints, crash on large ids on AIX
Right-shifting signed integers in undefined; indeed it seems that on
AIX with their compiler, doing a 30-bit shift on (INT_MAX-200) gives
0, not 1 as we might expect.

The obvious fix is to make id and oid unsigned: l (level count) is also
logically unsigned.

(Note: Samba doesn't generally get to ids > 1 billion, but ctdb does)

Reported-by: Chris Cowan <cc@us.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User: Rusty Russell <rusty@samba.org>
Autobuild-Date: Wed Oct  6 08:31:09 UTC 2010 on sn-devel-104

(This used to be ctdb commit 53d49df2d4519c35b270c30660e2504af2a5ed5c)
2010-10-07 15:24:46 +10:30
Jelmer Vernooij
f6e29e22f4 pytdb: Add __version__ attribute.
(This used to be ctdb commit 2b81314eb94d31f4efadd2a3dcf2f6e176338d3f)
2010-10-07 15:18:51 +10:30
Jelmer Vernooij
d8d8778aaf pytdb: Include Python.h first to prevent warning.
(This used to be ctdb commit 247dacde0d0de1358cc2c27d08914be605272023)
2010-10-07 15:18:30 +10:30