summaryrefslogtreecommitdiffstats
path: root/ctdb/lib/util
Commit message (Collapse)AuthorAgeFilesLines
* db_wrap: Make sure tdb messages are logged correctlyAmitay Isaacs2013-08-141-0/+1
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 60cb40d090e45ff6134c098a238fac7ad854f134)
* build: Fix tdb.h path to enable building with system TDB libraryMathieu Parent2013-06-141-1/+1
| | | | (This used to be ctdb commit f8bf99de3a5f56be67aaa67ed836458b1cf73e86)
* util: Do not stop build if backtracing is not supportedAmitay Isaacs2013-05-291-2/+1
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit b091f09ea01482823bd850d1d4e2329e0a19c959)
* util: Add hex_decode_talloc() to decode hex string into a binary blobAmitay Isaacs2013-03-251-0/+16
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 307416afda707b687f5e89e8438e45c154a4c806)
* server: Replace BOOL datatype with bool, True/False with true/falseAmitay Isaacs2012-05-281-1/+1
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 6e5cbe8fff71985e5a2fc16b7e9f2b868011ff5d)
* Remove explicit include of lib/tevent/tevent.h.Amitay Isaacs2012-04-131-1/+0
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 0681014ca5ed2a9b56f63fdace7f894beccf8a9a)
* libutil: Remove obsolete signal type cast.Andreas Schneider2011-11-261-5/+5
| | | | (This used to be ctdb commit 8dd377b6a4d188af086f9a5b41a1b48e44eda6f3)
* Added some #ifndefs to stop files being included multiple times.Martin Schwenke2011-11-111-0/+4
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit fdca12c25e6fce6206135b994dedf44265e4eb09)
* idtree: fix overflow for v. large ids on allocation and removalRusty Russell2010-12-071-1/+1
| | | | | | | | | | | | | | (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 2db1987f5a3a). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit 73764104356d3738d9d20a9d06ce51535f74f475)
* idtree: fix right shift of signed ints, crash on large ids on AIXRusty Russell2010-10-081-1/+1
| | | | | | | | | | | | | | | | | | | 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 90b7e79446f06990f82c0128b2581e15497094fe)
* Merge commit 'rusty/ports-from-1.0.112' into fooRonnie Sahlberg2010-08-192-1/+4
|\ | | | | | | (This used to be ctdb commit 13e58d92f5f1723e850a82ae030d0ca57e89b1ee)
| * logging: give a unique logging name to each forked child.Rusty Russell2010-08-182-1/+4
| | | | | | | | | | | | | | | | This means we can distinguish which child is logging, esp. via syslog where we have no pid. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit 68b3761a0874429b90731741f0531f76dcfbb081)
* | event: Update events to latest Samba version 0.9.8Rusty Russell2010-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In Samba this is now called "tevent", and while we use the backwards compatibility wrappers they don't offer EVENT_FD_AUTOCLOSE: that is now a separate tevent_fd_set_auto_close() function. This is based on Samba version 7f29f817fa939ef1bbb740584f09e76e2ecd5b06. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit 85e5e760cc91eb3157d3a88996ce474491646726)
* | talloc: update to 2.0.3 version from SAMBARusty Russell2010-08-181-7/+0
|/ | | | | | | | | This is based on SAMBA as at revision 2de63aa2801a907905b3e05557074af5b896d486. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit cecd93be0a0aab868430dd43f8276bfb4e35f02e)
* tdb: improve loggingRusty Russell2010-07-011-2/+3
| | | | | | | | When tdb throws an error, we didn't report the name of the tdb; we should. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit cfea357c9b2142c8cd8cac1ee712d40b188793e1)
* idtree: fix handling of large ids (eg INT_MAX)Rusty Russell2010-06-101-2/+4
| | | | | | | | | | | | | Since idtree assigns sequentially, it rarely reaches high numbers. But such numbers can be forced with idr_get_new_above(), and that reveals two bugs: 1) Crash in sub_remove() caused by pa array being too short. 2) Shift by more than 32 in _idr_find(), which is undefined, causing the "outside the current tree" optimization to misfire and return NULL. Signed-off-by: Rusty Russell <rusty@rustorp.com.au> (This used to be ctdb commit 32c04e11ebbcf8239e47016302c6ce802a8b0a6f)
* ctdb: migrate to new dlinklist.h from SambaAndrew Tridgell2010-02-091-86/+108
| | | | (This used to be ctdb commit f63c091f12f8d582e9518673365c7c52479c470c)
* util: added TLIST_*() macrosAndrew Tridgell2010-02-041-0/+46
| | | | | | | | | | | | The TLIST_*() macros are like the DLIST_*() macros, but take both a head and tail pointer for the list. This means that adding an element to the end of the list is efficient (it doesn't need to walk the list). We should move all uses of the DLIST_*() macros which use DLIST_ADD_END() to use the TLIST_*() macros instead. (This used to be ctdb commit 2d05a71349e9ade869b62cf261c2a9a21818a474)
* lib/util: add pre and post panic action hooksStefan Metzmacher2010-01-202-0/+13
| | | | | | metze (This used to be ctdb commit e366e77ba170d2c27110c56004ae1adf97abef9e)
* lib/util: import fault/backtrace handling from samba.Stefan Metzmacher2010-01-206-0/+1211
| | | | | | metze (This used to be ctdb commit 8171d66f0061fe23ed6dfef87ffe63bfc19596eb)
* move DEBUG* macros to one placeStefan Metzmacher2010-01-202-4/+2
| | | | | | metze (This used to be ctdb commit 4b4dd5d7f81bf226e05c7f3d40087043da1517a2)
* Dont store debug level DEBUG_DEBUG in the in-memory ringbuffer.Ronnie Sahlberg2009-12-041-1/+1
| | | | | | | | It is unlikely we will need something this verbose for normal troubleshooting. This allows us to keep a significantly longer time interval of log messages in the 500k slots available in the ringbuffer. (This used to be ctdb commit cc99c05c0c6484ad574039a454e6133852cb41fa)
* add an in memory ringbuffer where we store the last 500000 log entries ↵Ronnie Sahlberg2009-11-182-1/+2
| | | | | | | | regardless of log level. add commandt to extract this in memory buffer and to clear it (This used to be ctdb commit 29d2ee8d9c6c6f36b2334480f646d6db209f370e)
* debug: add debug_add and dump_data functionsMichael Adam2009-08-042-1/+80
| | | | | | Michael (This used to be ctdb commit 64405bdbebb2ddf0ae980e958ede77df79139000)
* Whitespace changes and using the CTDB_NO_MEMORY() macro changes toRonnie Sahlberg2009-05-211-1/+1
| | | | | | the previous patch. (This used to be ctdb commit d623ea7c04daa6349b42d50862843c9f86115488)
* add missing checks on so far ignored return valuesSumit Bose2009-05-212-2/+12
| | | | | | Most of these were found during a review by Jim Meyering <meyering@redhat.com> (This used to be ctdb commit 3aee5ee1deb4a19be3bd3a4ce3abbe09de763344)
* The author of the upstream code asked for this code to be GPLv2+ not GPLv3Andrew Tridgell2008-09-301-1/+1
| | | | (This used to be ctdb commit 000018f2f4fb9f2452f56731b027dd6a7beda111)
* merged a bugfix for the idtree code from the Linux kernel. ThisAndrew Tridgell2008-09-301-2/+14
| | | | | | | | matches commit 7aae6dd80e265aa9402ed507caaff4a5dba55069 in the kernel. Many thanks to Jim Houston for pointing out this fix to us (This used to be ctdb commit 85f6032cbdb197f3a003d86f086afa2cee898a4d)
* track both when we last started and ended a recovery.Ronnie Sahlberg2008-07-021-0/+6
| | | | | | | | | | | | make ctdb uptime print how long the recovery took in the recovery daemon when we check that the public ip address allocation on the local node is correct (we have the ips we should have and we dont have any we shouldnt have) use ctdb uptime and check the recovery start/stop times and make sure we dont check for ip allocation inconsistencies during a recovery where the ip address allocation is in flux. (This used to be ctdb commit f86551580349b7f662f9a07e4eb0c1189e38e429)
* added syslog support, and use a pipe to catch logging from child processes ↵Andrew Tridgell2008-01-162-2/+6
| | | | | | to the ctdbd logging functions (This used to be ctdb commit 1306b04cd01e996fd1aa1159a9521f2ff7b06165)
* ensure tdb log messages appear in ctdbd logsAndrew Tridgell2008-01-063-6/+29
| | | | (This used to be ctdb commit b2439487832230e7b738c0f89eeaa2c0c4ba0951)
* merge from ronnieAndrew Tridgell2007-08-071-2/+2
| | | | (This used to be ctdb commit e06f70f064e39f1a4a394f00b81b6b1d215534d4)
* minor back-merge from samba4Andrew Tridgell2007-07-101-1/+1
| | | | (This used to be ctdb commit c591f9b2d2847f440702e7264c7da2fd6d69f4be)
* update lib/replace from samba4Andrew Tridgell2007-07-108-24/+16
| | | | (This used to be ctdb commit f0555484105668c01c21f56322992e752e831109)
* move more util code to lib/utilAndrew Tridgell2007-06-072-0/+218
| | | | (This used to be ctdb commit de5ab0584c978a6be4afeacd80c84015b206a3c6)
* fixed some debug messagesAndrew Tridgell2007-05-291-1/+1
| | | | (This used to be ctdb commit 037f0149c0c0e65af0a1669b9a52586129e4b48f)
* nicer date formattingAndrew Tridgell2007-05-191-4/+9
| | | | (This used to be ctdb commit 78c256caa738593e335de65df752ff015f3a38e1)
* new files for updated events systemAndrew Tridgell2007-05-022-0/+106
| | | | (This used to be ctdb commit 15d8308e5a0ce04351d70ac3dd25c7698931ebba)
* fixed ctdb/ib bug at reject eventPeter Somogyi2007-04-231-2/+2
| | | | | | reverted my suggestion in debug.c (based on my false error detection) (This used to be ctdb commit 5c52c9f37639c65b551c10d1706c49653cd99742)
* use talloc_vasprintfPeter Somogyi2007-04-201-17/+2
| | | | (This used to be ctdb commit e259620d416497fba5ac43a87f3be7b280c21409)
* - ctdb/ib minor bugfixes (error case)Peter Somogyi2007-04-201-1/+17
| | | | | | | - make ctdb capable of alternative connection (like ib) again, solved the fork problem - do_debug memory overwrite bugfix (occured using ibwrapper_test with wrong address given) (This used to be ctdb commit da0b84cda26d544f63841dfd770ed7ebad401944)
* Add timestamps to debug output.Volker Lendecke2007-04-172-0/+61
| | | | (This used to be ctdb commit 197a02384bd2ca42dfff4c0357175424d2321e9c)
* merge db wrap code from samba4Andrew Tridgell2007-01-252-0/+116
| | | | (This used to be ctdb commit 2f3c299c76ce463cd866dfb1900ff45928f32ba6)
* - added in idtree for efficient reqid handlingAndrew Tridgell2006-11-281-0/+374
| | | | | | | | - started adding ctdb_call() code - added ctdb_call_local() implementation (This used to be ctdb commit 97b1fdf7fa0e230f36add3f1770ecb3a9faee0a1)
* initial versionAndrew Tridgell2006-11-181-0/+114
(This used to be ctdb commit 5bba7deef9b03a68d336c138e83d6d4fac35bfce)