[SCM] CTDB repository - branch master updated - ctdb-1.0.108-177-gb436504

Ronnie Sahlberg sahlberg at samba.org
Wed Dec 16 14:19:43 MST 2009


The branch, master has been updated
       via  b4365045797f520a7914afdb69ebd1a8dacfa0d9 (commit)
       via  82f778e85440bc713d3f87c08ddc955d3cfce926 (commit)
       via  482c302d46e2162d0cf552f8456bc49573ae729d (commit)
       via  2ee86cc1f311d7b7504c7b14d142b9c4f6f4b469 (commit)
       via  82421f20dcad4b0e25f109583879a26c0ee9c465 (commit)
       via  1717836f4f36c4e2b6bd82b6b78e2325b2a458ab (commit)
       via  e3825407a509110c786d618efcdfa56ba93380a5 (commit)
       via  0d1300aa2325c94d8fb1c3cf8d454e5eee43dde9 (commit)
       via  33ec6943fb2d01b6df0ce4515d37c671b18d237f (commit)
       via  9b4c76973a8cf03ddc1a9b3777a350f739c00892 (commit)
       via  a90f3dd25a22f9b8777ff6946ce1721859e9479a (commit)
       via  bf48ae41ef5fb8e4675be448d13db522465d8d72 (commit)
       via  8e6b8be51fd1bda789675650a94df0115ee9e238 (commit)
       via  c09acd0896089a612ee3a1e78711abd98bd9cc99 (commit)
       via  3cdb8be02acc23074c8137a54faea62fee4567a0 (commit)
       via  fce390194dadb4961b46c706a1826442eef8c63d (commit)
       via  fc5f556d488488040303438aefecb5ae2a8e54bc (commit)
       via  52e6d81f4d8a4035272d9256d01bafb8ed593027 (commit)
       via  504cf78d00d1120b556124340b9312f890b8b8b9 (commit)
       via  45cfcd44093c7d2681e2ffd5cfb402823e8809f4 (commit)
       via  ecf799093c1989f5499c9d61ce8cc8a98d759160 (commit)
       via  c63a0368d9d4b526ac1e49d891d3a1b7b8d20320 (commit)
       via  1cdc8dbb9cb971cf6dd6cd22b1adaf70ddc77e65 (commit)
       via  d1b10b0c0c323c39742a18e98a1dab7e82ddc7be (commit)
       via  910c19f12448d293a755d1eb46d20f9591f8da7a (commit)
       via  c34535ff4dc6a44909283641596e0ed7c2316fbd (commit)
       via  5abe44d0113839d3a45c9a31d30856aa70c2ea1f (commit)
       via  7332d900538f0cbcd953a723417a0fe31dc9807c (commit)
       via  15f133d5150ed1badb4fef7d644f10cd08a25cb5 (commit)
       via  d874463235fa299e83fe562291c688aca3b85cf3 (commit)
       via  49d2dca9ad837e1b397294fb0e966bf0b77f751c (commit)
       via  cbda4666be88c11a810a192a70667b57f773ace1 (commit)
       via  21677ed6fb8c589f348321533c608cad58c4ec93 (commit)
       via  1db17f312558fe59983a3465680e56c9f0c19e36 (commit)
       via  92e05282d6c4f16e55d914cc3bde3738ea2d44ad (commit)
       via  f30f33685db50860b6cd6fd1b6bdc3066620a78f (commit)
       via  656a6ec5ed81ccfbb86144156a3158e48f105ee4 (commit)
       via  6529a1328b9ec304ad306674651b2a67e4426e23 (commit)
       via  10d95581fb90bfdf58ec32345c4e36c27acf4f37 (commit)
       via  1635e931b909c66eb3b1f5357e3a549b1a0da70d (commit)
       via  093f57a2c00f2d629a3b58e58202f1a7e1bbd406 (commit)
       via  d1873bd81bfc9f486b88f3a38c65c7de8f5a0909 (commit)
       via  04aeac728f56c65b973762f09977de1b1b99099e (commit)
       via  c1c0ede32dc00ed619d1cf5fda40a9de43995f3a (commit)
       via  855391c1e37012b0d6c673a304bb8da8a1efcd72 (commit)
       via  6126f04bd4982b66564dcccd92a15baf9cb856f3 (commit)
       via  7a88f1df9190674deaf5dcbedad02ae4120a5263 (commit)
       via  03372b4ea8ba2938468a5c0fc234d604966ce070 (commit)
       via  f5c992bdaeb73ef726ff4728a9922721474cd6f5 (commit)
       via  76aacdd8e1106f26565e25903091a757b59cd7e2 (commit)
       via  470750fa2e3cf987f10de48451b1ee13aab03907 (commit)
       via  03b3682e3fa53c9f5fdf2c4beac8b5d030fd2630 (commit)
       via  6ac7ef8bf4d384f880c7f483ace70f8e08c15a8b (commit)
       via  df1a3ce0380fa9d8722b2f9b16f65557095e4c83 (commit)
       via  27611d6a0c313732e438cb24c82b9de126e50156 (commit)
       via  1d5c5a221c28f1dc652a80ed516a0f18ba588d9f (commit)
       via  c40d14b1b7ba7c9ae40c0306a2e552504e0f92a6 (commit)
       via  5652e403be099f35cdd29fda8ba4fe2c35de8035 (commit)
       via  da47169c4d3bc1b446b49610d892df05638e912c (commit)
       via  4130c5dd10869b071124e2bf04d6807bbb11ab1f (commit)
       via  e7242221c3318a5c312e17ff4074bef80b639ca8 (commit)
       via  52f78e040749d24058ee1f575d949b57d15f5987 (commit)
       via  3a671b11770057c91e0ae646499d4714f52bc5c0 (commit)
       via  2231ee0aa163d68383dd9636f25f033fe7c1f3e7 (commit)
       via  363c34d4bb488609317794cd3153d85c12643110 (commit)
       via  236dc2fa29b3c0caec51859dbd469f0a13f5917e (commit)
       via  5aa0ab328c36ecd4d7ec03f921e6027340c2ef13 (commit)
       via  b02bf7659f04f1fa203834bd75a2392b48e56c16 (commit)
       via  5d4cc4b018a538dc3f1d79fe091f3e6e67003daf (commit)
       via  923b61fe722c0aec8a5b6ac8dd1df74957dc102b (commit)
       via  cd23d36ada9631095ca68663516de0c8d8c3bbed (commit)
       via  3d44412593b8748a5158e15b83cd9eb548231194 (commit)
       via  f7278a277ed91587cae5b5e3660dad7124bdb73f (commit)
       via  a6620f6e74aadc708395b21b42303d1082192fcc (commit)
       via  b01b756cb577f32a1ec4597efb00017241e01685 (commit)
       via  43c97b259b19c42b4edc7f83dbfc5e486568b4e3 (commit)
       via  c1b8d32b4ef87b9d8f37b451f47fcee2ea753d21 (commit)
       via  e4d49c182e12c2d429d0414209cc2c8ccc19dc91 (commit)
       via  94f5728a77b8c772fb16c4744c24b45de8016e52 (commit)
       via  5830a2427b84e1cce74390b58fe12c45b5a056a6 (commit)
       via  463279c972fa4538919bdd1dff48ca6b2fb8d49c (commit)
       via  35a5b874b925380f7c227e47aebb590c9db4739e (commit)
       via  dc287a7d7420cca0b104049e689a73202bc535f8 (commit)
       via  02b35ba77672727c96ad004be37c7f6f1d3fe474 (commit)
       via  5ef5ddb8369e5e76173285fe9a08498dc8dc73ab (commit)
       via  ef1dc585d869a9e48164cd65bafc92c1da245007 (commit)
       via  0ae735b7a2096a40e5e47086ec41d9d45ef6d36b (commit)
       via  2e69647404c87c438ae7c180277ac3b532941efd (commit)
       via  37225f1ed3f70d7259c2af2c51c671105c34476a (commit)
       via  66fffa577e051212ac7541be906b6c80f4a7c0c9 (commit)
       via  310d673b7cb9000d76437d78e43bc2bf133e4e14 (commit)
       via  f70e371d70e334a7254649b2bb09aa382e6f09bb (commit)
       via  9d5015e6fc68d3eb9e7b7178dbaf8c129dc79471 (commit)
       via  efa4a795db7fb2bddaab3969850d1554fc5f4da1 (commit)
       via  724d71dc838750fff91a45359feeb6e71bf0a4c7 (commit)
       via  141422d9dc24b15b7b8bc7831adab90367a729f7 (commit)
       via  aed864dceaf6ec1e6e6066a587c708b485901200 (commit)
       via  eebd467961dad6cfb38c2a5d6e4b4dbf86e55e63 (commit)
       via  6f8614de0f20d4c507aecd744d9c3f6545078127 (commit)
       via  2d768f664e6db65b3b7e0c732f33ee2b806892f9 (commit)
      from  b883d19a495a41a22db37f9c2cf6250fee529de0 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit b4365045797f520a7914afdb69ebd1a8dacfa0d9
Merge: 82421f20dcad4b0e25f109583879a26c0ee9c465 82f778e85440bc713d3f87c08ddc955d3cfce926
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Dec 17 08:18:04 2009 +1100

    fix a conflict in the merge from rusty
    
    Merge commit 'rusty/ctdb-no-setsched'
    
    Conflicts:
    
    	server/ctdb_vacuum.c

commit 82f778e85440bc713d3f87c08ddc955d3cfce926
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Wed Dec 16 20:57:20 2009 +1030

    ctdb: use mlockall, cautiously
    
    We don't want ctdb stalling due to paging; this can be far worse than
    scheduling delays.  But if we simply do mlockall(MCL_FUTURE), it
    increases the risk that mmap (ie. tdb open) or malloc will fail,
    causing us to abort.
    
    This patch is a compromise: we mlock all current pages (including
    10k of future stack for expansion) and then relock when a client
    asks us to open a TDB.  We warn, but don't exit, if it fails.
    
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 482c302d46e2162d0cf552f8456bc49573ae729d
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Wed Dec 16 19:26:22 2009 +1030

    Remove RT priority, use niceness.
    
    1) It's buggy.  Code needs to be carefully written (ie. no busy
       loops) to handle running with it, and we fork and run scripts.[1]
    
    2) It makes debugging harder.  If ctdbd loops (as has happened recently)
       it can be extremely hard to get in and see what's happening.  We've already
       seen the valgrind hacks.
    
    3) We have seen recent scheduler problems.  Perhaps they are unrelated,
       but removing this very unusual setup is unlikely to hurt.
    
    4) It doesn't make anything faster.  Under all but the most perverse of
       circumstances, 99% of the cpu gives the same performance as 100%, and
       we will always preempt normal processes anyway.
    
    [1] I made this worse in 0fafdcb8d353 "eventscript: fork() a child for
        each script" by removing the switch_from_server_to_client() which
        restored it, but even that was only for monitor scripts.  Others were
        run with RT priority.
    
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 2ee86cc1f311d7b7504c7b14d142b9c4f6f4b469
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Wed Dec 16 20:59:15 2009 +1030

    Add --valgringing flag instead of --nosetsched
    
    The do_setsched was being tested for whether to mmap tdbs: let's make it
    explicit.  We can also happily move the kill-child eventscript hack under
    this flag.
    
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>

commit 82421f20dcad4b0e25f109583879a26c0ee9c465
Merge: 1717836f4f36c4e2b6bd82b6b78e2325b2a458ab e3825407a509110c786d618efcdfa56ba93380a5
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Dec 16 18:34:40 2009 +1100

    fix conflict in merge from metze
    
    Merge commit 'metze/master-tdb-check'
    
    Conflicts:
    
    	server/ctdb_vacuum.c

commit 1717836f4f36c4e2b6bd82b6b78e2325b2a458ab
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Nov 20 21:17:59 2009 +0100

    ctdb: pass TDB_DISALLOW_NESTING to all tdb_open/tdb_wrap_open calls
    
    metze
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit e3825407a509110c786d618efcdfa56ba93380a5
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 7 13:02:59 2009 +0100

    doc: regenerate manpages
    
    metze

commit 0d1300aa2325c94d8fb1c3cf8d454e5eee43dde9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Dec 8 12:28:38 2009 +0100

    doc: fix docbook warnings for ctdb.1 and onnode.1 manpages
    
    metze

commit 33ec6943fb2d01b6df0ce4515d37c671b18d237f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Dec 9 11:29:52 2009 +0100

    doc/ctdb.1: update example "ctdb listvars" output
    
    metze

commit 9b4c76973a8cf03ddc1a9b3777a350f739c00892
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Dec 8 12:44:13 2009 +0100

    doc/ctdb.1: make clear the database is specified by name for "ctdb backupdb"
    
    metze

commit a90f3dd25a22f9b8777ff6946ce1721859e9479a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Dec 8 12:43:33 2009 +0100

    doc/ctdb.1: document "ctdb getdbstatus <dbname>"
    
    metze

commit bf48ae41ef5fb8e4675be448d13db522465d8d72
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 7 10:19:20 2009 +0100

    doc/ctdb.1: add "See also" for ctdb getdbmap
    
    metze

commit 8e6b8be51fd1bda789675650a94df0115ee9e238
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Dec 8 12:08:27 2009 +0100

    doc/ctdb.1: document "ctdb dumpdbbackup <file>"
    
    metze

commit c09acd0896089a612ee3a1e78711abd98bd9cc99
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 7 10:18:39 2009 +0100

    doc/ctdb.1: document -Y output fot ctdb getdbmap
    
    metze

commit 3cdb8be02acc23074c8137a54faea62fee4567a0
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 7 10:10:05 2009 +0100

    doc/ctdb.1: document UNHEALTHY for "ctdb getdbmap"
    
    metze

commit fce390194dadb4961b46c706a1826442eef8c63d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 7 10:00:52 2009 +0100

    doc/ctdb.1: document "ctdb wipedb"
    
    metze

commit fc5f556d488488040303438aefecb5ae2a8e54bc
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 7 10:53:31 2009 +0100

    config: add CTDB_MAX_PERSISTENT_CHECK_ERRORS option
    
    metze

commit 52e6d81f4d8a4035272d9256d01bafb8ed593027
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 7 10:46:10 2009 +0100

    config: try to use tdbtool <tdb> check instead of tdbdump for persistent db checks
    
    metze

commit 504cf78d00d1120b556124340b9312f890b8b8b9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 7 09:57:45 2009 +0100

    ctdb: print out some hints how to debug a "ctdb catdb" failure
    
    metze

commit 45cfcd44093c7d2681e2ffd5cfb402823e8809f4
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 7 09:23:02 2009 +0100

    ctdb: add machinereadable output fot "ctdb -Y getdbmap"
    
    metze

commit ecf799093c1989f5499c9d61ce8cc8a98d759160
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 7 09:22:02 2009 +0100

    ctdb: disallow "ctdb backupdb" on unhealthy databases
    
    metze

commit c63a0368d9d4b526ac1e49d891d3a1b7b8d20320
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Dec 4 15:24:23 2009 +0100

    client: add "ctdb dumpdbbackup <filename>"
    
    metze

commit 1cdc8dbb9cb971cf6dd6cd22b1adaf70ddc77e65
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Dec 4 15:23:56 2009 +0100

    client: make ctdb_dumpdb_record() public
    
    metze

commit d1b10b0c0c323c39742a18e98a1dab7e82ddc7be
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Dec 2 12:58:03 2009 +0100

    tools/ctdb: let "ctdb restoredb" and "ctdb wipedb" mark the db as healthy on all
    nodes
    
    metze

commit 910c19f12448d293a755d1eb46d20f9591f8da7a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Dec 2 12:57:29 2009 +0100

    tools/ctdb: add "ctdb getdbstatus <dbname>"
    
    metze

commit c34535ff4dc6a44909283641596e0ed7c2316fbd
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Dec 2 12:54:29 2009 +0100

    tools/ctdb: display db health in "ctdb getdbmap"
    
    metze

commit 5abe44d0113839d3a45c9a31d30856aa70c2ea1f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Dec 2 12:51:37 2009 +0100

    client: add ctdb_ctrl_getdbhealth()
    
    metze

commit 7332d900538f0cbcd953a723417a0fe31dc9807c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Dec 2 12:48:22 2009 +0100

    server: add CTDB_CONTROL_DB_SET_HEALTHY and CTDB_CONTROL_DB_GET_HEALTH
    
    metze

commit 15f133d5150ed1badb4fef7d644f10cd08a25cb5
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 7 13:28:11 2009 +0100

    server: Use tdb_check to verify persistent tdbs on startup
    
    Depending on --max-persistent-check-errors we allow ctdb
    to start with unhealthy persistent databases.
    
    The default is 0 which means to reject a startup with
    unhealthy dbs.
    
    The health of the persistent databases is checked after each
    recovery. Node monitoring and the "startup" is deferred
    until all persistent databases are healthy.
    
    Databases can become healthy automaticly by a completely
    HEALTHY node joining the cluster. Or by an administrator
    with "ctdb backupdb/restoredb" or "ctdb wipedb".
    
    metze

commit d874463235fa299e83fe562291c688aca3b85cf3
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 7 13:19:33 2009 +0100

    server: move error handling to a 'fail' label in ctdb_control_transaction_commit()
    
    metze

commit 49d2dca9ad837e1b397294fb0e966bf0b77f751c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Nov 27 16:36:05 2009 +0100

    server/recovery: update flags on nodes before syncing dbs
    
    metze

commit cbda4666be88c11a810a192a70667b57f773ace1
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sun Nov 29 12:39:37 2009 +0100

    server: open /var/ctdb/state/persistent_health.tdb.X on startup
    
    This node internal tdb will store the HEALTH state of persistent
    tdbs.
    
    metze

commit 21677ed6fb8c589f348321533c608cad58c4ec93
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Nov 23 15:39:19 2009 +0100

    server: create vactune.tdb.X with 0600 permissions
    
    metze

commit 1db17f312558fe59983a3465680e56c9f0c19e36
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Nov 23 15:38:31 2009 +0100

    server: create vactun.tdb.X under /var/ctdb/state
    
    metze

commit 92e05282d6c4f16e55d914cc3bde3738ea2d44ad
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Nov 23 15:36:45 2009 +0100

    server: create recdb.tdb.X in /var/ctdb/state/
    
    metze

commit f30f33685db50860b6cd6fd1b6bdc3066620a78f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sun Nov 29 12:39:23 2009 +0100

    server: only do the mkdir() calls for db_directory* once at the start
    
    metze

commit 656a6ec5ed81ccfbb86144156a3158e48f105ee4
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Nov 23 14:38:03 2009 +0100

    server: add db_directory_state to ctdb_context
    
    metze

commit 6529a1328b9ec304ad306674651b2a67e4426e23
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Nov 23 14:40:17 2009 +0100

    server: create tdbs with 0600 permissions in ctdb_local_attach()
    
    metze

commit 10d95581fb90bfdf58ec32345c4e36c27acf4f37
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Nov 9 15:06:59 2009 +0100

    config: load 'ctdb' config before 'nfs' config in statd-callout
    
    All other scripts do 'loadconfig ctdb' before any other 'loadconfig foo'
    call. I think we should do the same in statd-callout.
    
    Otherwise it's very confusing, if you have configured some Options
    in /etc/sysconfig/ctdb, but /etc/ctdb/statd-callout doesn't notice
    them.
    
    metze

commit 1635e931b909c66eb3b1f5357e3a549b1a0da70d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Nov 20 21:17:59 2009 +0100

    ctdb: pass TDB_DISALLOW_NESTING to all tdb_open/tdb_wrap_open calls
    
    metze
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 093f57a2c00f2d629a3b58e58202f1a7e1bbd406
Author: Simo Sorce <idra at samba.org>
Date:   Mon Dec 7 09:25:03 2009 -0500

    Fix release script with newer versins of git
    (cherry picked from commit 4334092cbae28181ba0d1cf2ac026961f2192972)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit d1873bd81bfc9f486b88f3a38c65c7de8f5a0909
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Fri Oct 16 19:02:02 2009 +0200

    tdb tools: Mostly cosmetic adaptions
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    (cherry picked from samba commit 9776cb03450d21da5d454e683bdba29793ba3f67)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 04aeac728f56c65b973762f09977de1b1b99099e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 19 09:49:03 2009 +0100

    tdb: change version to 1.2.0 after adding TDB_*ALLOW_NESTING
    
    metze
    (cherry picked from samba commit 5ca0a4bfd6fdbb515835682a12f715283b46cb3e)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit c1c0ede32dc00ed619d1cf5fda40a9de43995f3a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 19 09:34:05 2009 +0100

    tdb: add TDB_DISALLOW_NESTING and make TDB_ALLOW_NESTING the default behavior
    
    We need to keep TDB_ALLOW_NESTING as default behavior,
    so that existing code continues to work.
    
    However we may change the default together with a major version
    number change in future.
    
    metze
    (cherry picked from samba commit 3b9f19ed919fef2e88b2f92ae541e07bc7379cd1)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 855391c1e37012b0d6c673a304bb8da8a1efcd72
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 19 09:38:48 2009 +0100

    tdb: always set tdb->tracefd to -1 to be safe on goto fail
    
    metze
    (cherry picked from samba commit 85449b7bcc4bd7948bea38b5514a02357950a002)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 6126f04bd4982b66564dcccd92a15baf9cb856f3
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Nov 6 14:04:49 2009 +0100

    tdb: Fix a C++ warning (cherry picked from samba commit be88a126ea50ea7e41583f402013c63234305e48)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 7a88f1df9190674deaf5dcbedad02ae4120a5263
Author: Kirill Smelkov <kirr at mns.spb.ru>
Date:   Wed Oct 21 21:18:58 2009 +0400

    tdb: update README a bit
    
    While studying tdb, I've noticed a couple of mismatches between readme
    and actual code:
    
    - tdb_open_ex changed it's log_fn argument to log_ctx
    - there is now no tdb_update(), which it seems was transformed into
      non-exported tdb_update_hash()
    
    There were other mismatches, but I don't remember them now, sorry.
    
    Signed-off-by: Kirill Smelkov <kirr at mns.spb.ru>
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
    (cherry picked from samba commit 83de5c826313aa09c76131ae70550bd81b3521c5)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 03372b4ea8ba2938468a5c0fc234d604966ce070
Author: Kirill Smelkov <kirr at mns.spb.ru>
Date:   Wed Oct 21 21:18:57 2009 +0400

    tdb: add tests for double .close() in pytdb
    
    The reason I do it is that when using older python-tdb as shipped in
    Debian Lenny, python interpreter crashes on this test:
    
        (gdb) bt
        #0  0xb7f8c424 in __kernel_vsyscall ()
        #1  0xb7df5640 in raise () from /lib/i686/cmov/libc.so.6
        #2  0xb7df7018 in abort () from /lib/i686/cmov/libc.so.6
        #3  0xb7e3234d in __libc_message () from /lib/i686/cmov/libc.so.6
        #4  0xb7e38624 in malloc_printerr () from /lib/i686/cmov/libc.so.6
        #5  0xb7e3a826 in free () from /lib/i686/cmov/libc.so.6
        #6  0xb7b39c84 in tdb_close () from /usr/lib/libtdb.so.1
        #7  0xb7b43e14 in ?? () from /var/lib/python-support/python2.5/_tdb.so
        #8  0x0a038d08 in ?? ()
        #9  0x00000000 in ?? ()
    
    master's pytdb does not (we have a check for self->closed in obj_close()),
    but still...
    
    Signed-off-by: Kirill Smelkov <kirr at mns.spb.ru>
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
    (cherry picked from samba commit 71a21393dd1bb61bded82b1581ac6d5bd3b0153c)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit f5c992bdaeb73ef726ff4728a9922721474cd6f5
Author: Kirill Smelkov <kirr at mns.spb.ru>
Date:   Wed Oct 21 21:18:56 2009 +0400

    tdb: reset tdb->fd to -1 in tdb_close()
    
    So that erroneous double tdb_close() calls do not try to close() same
    fd again. This is like SAFE_FREE() but for fd.
    
    Signed-off-by: Kirill Smelkov <kirr at mns.spb.ru>
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
    (cherry picked from samba commit b4424f8234a78a79fb2d71d46ca208b4f12e0f9e)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 76aacdd8e1106f26565e25903091a757b59cd7e2
Author: Kirill Smelkov <kirr at mns.spb.ru>
Date:   Wed Oct 21 21:18:55 2009 +0400

    tdb: fix typo in python's Tdb.get() docstring
    
    It's Tdb.get(), not Tdb.fetch().
    
    Signed-off-by: Kirill Smelkov <kirr at mns.spb.ru>
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
    (cherry picked from samba commit cfed5f946de0992a594c189ee3c19cf98e59d380)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 470750fa2e3cf987f10de48451b1ee13aab03907
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Oct 23 22:45:03 2009 +1100

    tdb: detect tdb store of identical records and skip
    
    This can help with ldb where we rewrite the index records
    (cherry picked from samba commit d4c0e8fdf063f88032c32de7ece60d502b322089)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 03b3682e3fa53c9f5fdf2c4beac8b5d030fd2630
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Oct 23 13:51:03 2009 +0200

    tdb: rename 'struct list_struct' into 'struct tdb_record'
    
    metze
    (cherry picked from samba commit 3b62e250c066f44d0ab08a7db037b6b4f74a914b)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 6ac7ef8bf4d384f880c7f483ace70f8e08c15a8b
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Thu Nov 19 22:15:59 2009 +0100

    lib/tdb: make tdbtool use tdb_check() for "check" command
    
    Also, set logging function so we get more informative messages.
    
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
    
    (cherry picked from samba commit 094493115971cf3d5a3138ff10ebe02335824723)
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit df1a3ce0380fa9d8722b2f9b16f65557095e4c83
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Thu Oct 22 00:10:34 2009 +1030

    lib/tdb: add tdb_check()
    
    ctdb wants a quick way to detect corrupt tdbs; particularly, tdbs with
    loops in their hash chains.  tdb_check() provides this.
    
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
    
    (cherry picked from samba commit 022b4d4aa6861c1e3e6d76484d92555221cb6d14)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 27611d6a0c313732e438cb24c82b9de126e50156
Author: Kirill Smelkov <kirr at mns.spb.ru>
Date:   Wed Oct 21 21:18:54 2009 +0400

    tdb: kill last bits from swig
    
    We no longer use swig for pytdb, so there is no need for swig make
    rules. Also pytdb.c header should be updated.
    
    Signed-off-by: Kirill Smelkov <kirr at mns.spb.ru>
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
    (cherry picked from samba commit ecbe5ebd8d1c44a478c613eb1cace0521142d0d3)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 1d5c5a221c28f1dc652a80ed516a0f18ba588d9f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 19 15:44:10 2009 +0100

    lib/tdb: sync build files from samba master
    
    metze
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit c40d14b1b7ba7c9ae40c0306a2e552504e0f92a6
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 19 16:52:46 2009 +0100

    s3 build: Remove unused fstat check to fix a bunch of HAVE_FSTAT warnings (cherry picked from samba commit 2c2545d45af9c7479bf032fff1263e102926a495)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 5652e403be099f35cdd29fda8ba4fe2c35de8035
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Jan 30 19:38:59 2009 +0100

    lib/tdb: include replace.h and system/filesys.h in pytdb.c
    
    This fixes the build on Tru64.
    
    metze
    (cherry picked from samba commit 3718cf294ad1f3e00178cb34b2c914c9aecf2016)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit da47169c4d3bc1b446b49610d892df05638e912c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 19 16:50:50 2009 +0100

    Avoid using a utility header for Python replacements included in Samba, since this will not be shipped with talloc/tdb/tevent/etc. (cherry picked from samba commit ba5d6e6d706ebf07640ee24d701255cbb4803525)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 4130c5dd10869b071124e2bf04d6807bbb11ab1f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 19 16:49:13 2009 +0100

    s3/s4 build: Fix Py_RETURN_NONE to work with python versions < 2.4 (cherry picked from samba commit 61a23c5eea2203721a70a4ad41bfdc6cd1d6a2a7)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit e7242221c3318a5c312e17ff4074bef80b639ca8
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 19 16:31:29 2009 +0100

    py: Properly increase the reference counter of Py_None. (cherry picked from samba commit d2c70d24e12293d9b4272eb310a6a4c4582b2d92)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 52f78e040749d24058ee1f575d949b57d15f5987
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Thu Dec 18 20:42:50 2008 +0000

    Make sure to not close tdb database more than once. (cherry picked from samba commit 6fe6983e4c960abc69d5fa80cbef534ae515209a)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 3a671b11770057c91e0ae646499d4714f52bc5c0
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Thu Dec 18 19:41:02 2008 +0000

    Implement missing functions in pytdb. (cherry picked from samba commit 2da551bbcc6cab296769c193b0b82aaa6256cece)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 2231ee0aa163d68383dd9636f25f033fe7c1f3e7
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 19 16:25:49 2009 +0100

    Add simple manually written replacement for the tdb module. (cherry picked from samba commit 2a61fd41e9d4d2e3d7b47a816544c88bb369bc03)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 363c34d4bb488609317794cd3153d85c12643110
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Thu Jan 10 21:44:38 2008 +0100

    tdb: Add simple reimplementation of tdbdump in Python as an example of the tdb Python bindings. (This used to be commit 47d797f7885b1e7bcff724496ecb1990e8440eea) (cherry picked from samba commit 6bdd1425b75c8931965f0e5627f5a63dc6820a7c)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 236dc2fa29b3c0caec51859dbd469f0a13f5917e
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Sep 5 15:32:22 2008 -0700

    Remove unecessary msync. Jeremy. (cherry picked from samba commit 0bae1ef3de8fda5e1e2d641b14a408e627396912) (This used to be commit db2acaf46fdc38078b6b28b68909e289f6c9e0ec) (cherry picked from samba commit a1cf3ad5d655cf5a847df6d6299b3af1a30ec1e3)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 5aa0ab328c36ecd4d7ec03f921e6027340c2ef13
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 19 15:35:38 2009 +0100

    The msync manpage reports that msync *must* be called before munmap. Failure to do so may result in lost data. Fix an ifdef check, I really think we meant to check HAVE_MMAP here. (cherry picked from samba commit 74c8575b3f3b90ea21ae6aa7ccd95947838af956) (This used to be commit 8fd54bb55f0c23bd025d1719abcbe75c6a2ea8ac) (cherry picked from samba commit b39e332bd7803dd4ce8267f750c497b5deb837ee)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit b02bf7659f04f1fa203834bd75a2392b48e56c16
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Aug 12 22:31:52 2008 +0200

    Attempt to fix bug 5684
    
    With the ctdb checkin dde9f3f006 tdb optimized out write lock checks for
    write-enabled transaction. Sadly, this also removed the possibility to ever
    remove dead records left over from tdb_delete calls within a transaction.
    
    Tridge, please check this! Did dde9f3f006 have any reason beyond performance
    optimizations?
    
    Thanks,
    
    Volker
    (cherry picked from samba commit 3f884c4ae36f3260e63626bdd4989d9258ae6497)
    (This used to be commit 1d85e0647e287d269b3f6b534da88f497d6f76c3)
    (cherry picked from samba commit 8c88209c6f4b57b0dbe1459bd5bc583c5d321758)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 5d4cc4b018a538dc3f1d79fe091f3e6e67003daf
Author: Slava Semushin <php-coder at altlinux.ru>
Date:   Sun Jun 7 00:06:04 2009 +0700

    lib/tdb/tools/tdbtorture.c: fixed memory leak.
    
    Found by cppcheck:
    [lib/tdb/tools/tdbtorture.c:326]: (error) Memory leak: pids
    (cherry picked from samba commit 497b9e460b5defd60de89b9c5bed890f83ca86a1)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 923b61fe722c0aec8a5b6ac8dd1df74957dc102b
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Mar 31 13:59:03 2009 +1100

    added basic testing of tdb_transaction_prepare_commit() in tdbtorture (cherry picked from samba commit 84547b8dba3c0cf4e20b3c50d9386081d475df6b)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit cd23d36ada9631095ca68663516de0c8d8c3bbed
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Dec 16 14:36:56 2008 +1100

    make tdbbackup use transactions
    
    tdbbackup was originally written before we had transactions, and it
    attempted to use its own fsync() calls to make it safe. Now that we
    have transactions we can do it in a much safer (and faster!) fashion
    (cherry picked from samba commit 2e4247782bd5812bc8e7ea24194c8436748bb2fa)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 3d44412593b8748a5158e15b83cd9eb548231194
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu May 28 17:35:12 2009 +1000

    fixed tdbbackup to give tdb error messages (cherry picked from samba commit 08be1420ba52ef9bba90d0f811c7810841ee8568)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit f7278a277ed91587cae5b5e3660dad7124bdb73f
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Thu Oct 22 00:10:54 2009 +1030

    lib/tdb: add -t (always use transactions) option to tdbtorture
    
    This means you can kill it at any time and expect no corruption.
    
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
    
    (cherry picked from samba commit 0fc6800005ffb532a5e5699c97f13f1de138d51f)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit a6620f6e74aadc708395b21b42303d1082192fcc
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Thu Oct 22 00:09:43 2009 +1030

    lib/tdb: wean off TDB_ERRCODE.
    
    It was a regrettable hack which I used to reduce line count in tdb; in fact it caused confusion as can be seen in this patch.
    In particular, ecode now needs to be set before TDB_LOG anyway, and having it exposed in
    the header is useless (the struct tdb_context isn't defined, so it's doubly useless).
    Also, we should never set errno, as io.c was doing.
    
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
    
    (cherry picked from samba commit b77f41d58b05101e02d8ac0e54cb0e30807d89c2)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit b01b756cb577f32a1ec4597efb00017241e01685
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Tue Oct 20 12:19:41 2009 +1030

    lib/tdb: TDB_TRACE support (for developers)
    
    When TDB_TRACE is defined (in tdb_private.h), verbose tracing of tdb operations is enabled.
    This can be replayed using "replay_trace" from http://ccan.ozlabs.org/info/tdb.
    
    The majority of this patch comes from moving internal functions to _<funcname> to
    avoid double-tracing.  There should be no additional overhead for the normal (!TDB_TRACE)
    case.
    
    Note that the verbose traces compress really well with rzip.
    
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
    (cherry picked from samba commit 703004340c3e0f43f741bd368d2525cfd187d590)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 43c97b259b19c42b4edc7f83dbfc5e486568b4e3
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Oct 20 10:59:40 2009 +1100

    tdb: fixed the intermittent failure of tdbtorture in the build farm
    
    There was a race condition that caused the torture.tdb to be left in a
    state that needed recovery. The torture code thought that any message
    from the tdb code was an error, so the "recovered" message, which is a
    TDB_DEBUG_TRACE message, marked the run as being an error when it
    isn't.
    (cherry picked from samba commit 5dcf0069b68149575fe6166019dd90b73885926b)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit c1b8d32b4ef87b9d8f37b451f47fcee2ea753d21
Author: Michael Adam <obnox at samba.org>
Date:   Mon Sep 21 00:08:34 2009 +0200

    tdb:tdbtool: fix indentation.
    
    Michael
    (cherry picked from samba commit e440a2e11e78a562f97971c0dfe0cf3f694996ff)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit e4d49c182e12c2d429d0414209cc2c8ccc19dc91
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 19 14:31:29 2009 +0100

    Fix all warnings in source3 with gcc4.3. Jeremy. (cherry picked from samba commit 07e0094365e8dc360a83eec2e7cf9b1d5d8d6d00)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 94f5728a77b8c772fb16c4744c24b45de8016e52
Author: Tim Prouty <tprouty at samba.org>
Date:   Tue Dec 16 08:33:58 2008 -0800

    s3/s4: Fix "shadows a global declaration" warning (cherry picked from samba commit e48a5cd5d4fc2626b09af16a0ac68c638d081437)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 5830a2427b84e1cce74390b58fe12c45b5a056a6
Author: Tim Prouty <tprouty at samba.org>
Date:   Wed May 27 12:52:37 2009 -0700

    tdb: Fix some recently introduced warnings in tdbtool (cherry picked from samba commit c299833bf8e6506c793d6e8283743949aaac9ef4)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 463279c972fa4538919bdd1dff48ca6b2fb8d49c
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue May 26 09:24:37 2009 +1000

    added some more speed tests to tdbtool
    
    This adds 3 simple speed tests to tdbtool, for transaction store,
    store and fetch.
    
    On my laptop this shows transactions costing about 10ms
    (cherry picked from samba commit e15027155d3d880abde83124e252b3dd10a9aae4)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 35a5b874b925380f7c227e47aebb590c9db4739e
Author: Michael Adam <obnox at samba.org>
Date:   Sun Sep 20 23:58:27 2009 +0200

    tdb:tdbtool: add transaction_start/_commit/_cancel commands.
    
    So one can perform tdbtool operations protected by transactions.
    
    Michael
    (cherry picked from samba commit 91e1bab2e9a3f33151061554f2dcf05bcb728312)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit dc287a7d7420cca0b104049e689a73202bc535f8
Author: Michael Adam <obnox at samba.org>
Date:   Sun Sep 20 23:58:05 2009 +0200

    tdb:tdbtool: add the "speed" command to the help text.
    
    Michael
    (cherry picked from samba commit 817383d88d820e7be5b5dd3d2da350d4a03a94de)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 02b35ba77672727c96ad004be37c7f6f1d3fe474
Author: Holger Hetterich <hhetter at novell.com>
Date:   Sun Nov 2 00:12:32 2008 +0100

    Added a simple tdb integrity check to tdbtool. The command "check" runs traverse on the currently open tdb, and returns the number of entries if the integrity check is successful. (cherry picked from samba commit 42366bcbbdd42bb9d5821dfcc9dbe71a1eafa330)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 5ef5ddb8369e5e76173285fe9a08498dc8dc73ab
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue Sep 15 14:04:22 2009 -0700

    tdb: allow reads after prepare commit
    
    We previously only allowed a commit to happen after a prepare
    commit. It is in fact safe to allow reads between a prepare and a
    commit, and the s4 replication code can make use of that, so allow it.
    (cherry picked from samba commit 46c99ec2a3781d53138245182345c6c2ddd9a258)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit ef1dc585d869a9e48164cd65bafc92c1da245007
Author: Michael Adam <obnox at samba.org>
Date:   Fri Sep 11 15:20:34 2009 +0200

    tdb:mksigs: allow PRINTF_ATTRIBUTE(..) macros function types as funcion args
    
    Michael
    (cherry picked from samba commit 55dcf928eb6ce603c5e95a9a80856a4deb33d0c6)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 0ae735b7a2096a40e5e47086ec41d9d45ef6d36b
Author: Michael Adam <obnox at samba.org>
Date:   Fri Sep 11 15:16:03 2009 +0200

    tdb:mksigs: normalize bool -> _Bool
    
    Michael
    (cherry picked from samba commit cfa4e7ec7540d1100649839a10968303189fe929)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 2e69647404c87c438ae7c180277ac3b532941efd
Author: Michael Adam <obnox at samba.org>
Date:   Fri Sep 11 15:11:16 2009 +0200

    tdb:mksigs: ignore symbols (like _DEPRECATED_) after closing function parentheses
    
    Michael
    (cherry picked from samba commit 25939a627f15b7a21110767d47be0f50f32d3943)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 37225f1ed3f70d7259c2af2c51c671105c34476a
Author: Michael Adam <obnox at samba.org>
Date:   Fri Sep 11 15:01:46 2009 +0200

    tdb:mksigs: correctly ignode multiline function typedefs
    
    by first concatenating multilint parentheses and removing typefes afterwards.
    
    Michael
    (cherry picked from samba commit 13bfcd5a93c47c9db8b644560a1bcc398facb136)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 66fffa577e051212ac7541be906b6c80f4a7c0c9
Author: Michael Adam <obnox at samba.org>
Date:   Fri Sep 11 14:55:52 2009 +0200

    tdb:mksigs: ignore struct forward declarations.
    
    Michael
    (cherry picked from samba commit ecd12bfb382da072595391d5bf11a893d39a0479)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 310d673b7cb9000d76437d78e43bc2bf133e4e14
Author: Michael Adam <obnox at samba.org>
Date:   Fri Sep 11 14:54:30 2009 +0200

    tdb:mksyms: allow characters after closing functions parenthesis.
    
    Michael
    (cherry picked from samba commit 400f08450b26f38a7dafd1d458542b4d9a8cb19e)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit f70e371d70e334a7254649b2bb09aa382e6f09bb
Author: Michael Adam <obnox at samba.org>
Date:   Fri Sep 11 14:54:02 2009 +0200

    tdb:mksyms: allow double pointer return value of functions.
    
    Michael
    (cherry picked from samba commit 907e05595fdcc4ef77ad627bc0f3732faa59de68)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 9d5015e6fc68d3eb9e7b7178dbaf8c129dc79471
Author: Günther Deschner <gd at samba.org>
Date:   Mon Sep 7 11:56:10 2009 +0200

    tdb: fix c++ build warning.
    
    Guenther
    (cherry picked from samba commit 1c2f4919abe99d07540b7380ad16d475d62aa50b)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit efa4a795db7fb2bddaab3969850d1554fc5f4da1
Author: Michael Adam <obnox at samba.org>
Date:   Sun Aug 30 00:55:28 2009 +0200

    One would expect I could spell my name... (cherry picked from samba commit 0d120be36bfc561e3f679d081993ccc6bea2a401)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 724d71dc838750fff91a45359feeb6e71bf0a4c7
Author: Michael Adam <obnox at samba.org>
Date:   Fri Aug 28 15:53:12 2009 +0200

    tdb: add script/abi_checks.sh. check for abi changes without gcc magic.
    
    USAGE: abi_checks.sh LIBRARY_NAME header1 [header2 ...]
    
    This creates symbol signature lists using the mksyms and mksigs scripts
    and compares them with the checked in lists.
    
    Michael
    (cherry picked from samba commit 9636e0d373e75cce7063b710227eaaf53f447c1b)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 141422d9dc24b15b7b8bc7831adab90367a729f7
Author: Michael Adam <obnox at samba.org>
Date:   Fri Aug 28 15:08:19 2009 +0200

    tdb: add script to extract signatures from header files.
    
    This produces output like the output gcc produces when
    invoked with the -aux-info switch.
    
    Run like this: cat include/tdb.h | ./script/mksigs.pl
    
    This simple parser is probably too coarse to handle all
    possible header files, but it treats tdb.h correctly...
    
    Michael
    (cherry picked from samba commit 0760a04ef9f7d2f3d966017295712769d02b8b9f)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit aed864dceaf6ec1e6e6066a587c708b485901200
Author: Michael Adam <obnox at samba.org>
Date:   Fri Aug 28 15:01:17 2009 +0200

    tdb: add scripts to extract library symbols (exports file) from headers
    
    Michael
    (cherry picked from samba commit 006fd0c43c7c403b8671dfc46e5ee31e92480e1f)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit eebd467961dad6cfb38c2a5d6e4b4dbf86e55e63
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Fri Aug 28 11:56:34 2009 +0930

    lib/tdb: don't overwrite TDBs with different version numbers.
    
    In future, this may happen, and we don't want to clobber them.
    
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
    (cherry picked from samba commit 398d0c2929026fccb3409316720a4dcad225ab05)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 6f8614de0f20d4c507aecd744d9c3f6545078127
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Aug 6 11:47:08 2009 -0700

    Add define guards around otherwise unused variable. Jeremy. (cherry picked from samba commit 4fc9f9c3f943cdeb27e37f0ee068cdd0da7cb00c)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 2d768f664e6db65b3b7e0c732f33ee2b806892f9
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Thu Aug 6 13:13:42 2009 +1000

    There is one signedness issue in tdb which prevents traverses of TDB records over the 2G offset on systems which support 64 bit file offsets. This fixes that case.
    
    On systems with 32 bit offsets, expansion and fcntl locking on these records
    will fail anyway.  SAMBA already does '#define _FILE_OFFSET_BITS 64' in
    config.h (on my 32-bit x86 Linux system at least) to get 64 bit file offsets.
    
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
    (cherry picked from samba commit 252f7da702fd0409f7bfff05ef594911ededa32f)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 client/ctdb_client.c                   |   50 ++-
 common/ctdb_util.c                     |   72 ++--
 config/ctdb.init                       |   37 ++-
 config/ctdb.sysconfig                  |    8 +
 config/statd-callout                   |    1 +
 configure.ac                           |    1 +
 doc/ctdb.1                             |  573 +++++++++++++++++---------
 doc/ctdb.1.html                        |  224 +++++++----
 doc/ctdb.1.xml                         |  116 +++++-
 doc/onnode.1                           |   10 +-
 doc/onnode.1.html                      |   16 +-
 doc/onnode.1.xml                       |    2 +
 include/ctdb.h                         |    7 +
 include/ctdb_private.h                 |   31 ++-
 lib/tdb/Makefile.in                    |  129 ++-----
 lib/tdb/autogen.sh                     |    2 -
 lib/tdb/build_macros.m4                |   14 +
 lib/tdb/common/check.c                 |  423 +++++++++++++++++++
 lib/tdb/common/dump.c                  |    4 +-
 lib/tdb/common/freelist.c              |   23 +-
 lib/tdb/common/freelistcheck.c         |    8 +-
 lib/tdb/common/io.c                    |   47 ++-
 lib/tdb/common/lock.c                  |   64 +++-
 lib/tdb/common/open.c                  |   72 +++-
 lib/tdb/common/tdb.c                   |  327 +++++++++++++--
 lib/tdb/common/tdb_private.h           |   54 ++-
 lib/tdb/common/transaction.c           |   94 +++--
 lib/tdb/common/traverse.c              |   60 ++-
 lib/tdb/config.guess                   |   58 ++-
 lib/tdb/config.mk                      |   32 +-
 lib/tdb/config.sub                     |   15 +-
 lib/tdb/configure.ac                   |   31 ++-
 lib/tdb/docs/README                    |   24 +-
 lib/tdb/docs/tracing.txt               |   46 ++
 lib/tdb/include/config.h.in            |  708 --------------------------------
 lib/tdb/include/tdb.h                  |    7 +-
 lib/tdb/libtdb.m4                      |   11 +-
 lib/tdb/pytdb.c                        |  516 +++++++++++++++++++++++
 lib/tdb/python.mk                      |    6 +
 lib/tdb/python/tdbdump.py              |   12 +
 lib/tdb/python/tests/simple.py         |  133 ++++++
 lib/tdb/release-script.sh              |   48 +++
 lib/tdb/rules.mk                       |   16 +
 lib/tdb/script/abi_checks.sh           |   91 ++++
 lib/tdb/script/abi_checks_gcc.sh       |   35 ++
 lib/tdb/script/mksigs.pl               |  183 ++++++++
 lib/tdb/script/mksyms.awk              |   76 ++++
 lib/tdb/script/mksyms.sh               |   45 ++
 lib/tdb/swig/Tdb.py                    |  116 ------
 lib/tdb/swig/tdb.i                     |  167 --------
 lib/tdb/swig/tdb.py                    |   95 -----
 lib/tdb/tdb.exports                    |   65 +++
 lib/tdb/tdb.mk                         |   89 ++++
 lib/tdb/tdb.pc                         |   12 -
 lib/tdb/tdb.pc.in                      |    1 +
 lib/tdb/tdb.signatures                 |   60 +++
 lib/tdb/tools/tdbbackup.c              |   63 +++-
 lib/tdb/tools/tdbdump.c                |    4 +-
 lib/tdb/tools/tdbtool.c                |  462 +++++++++++++--------
 lib/tdb/tools/tdbtorture.c             |   56 ++-
 lib/tdb/web/index.html                 |   48 +++
 server/ctdb_control.c                  |    8 +
 server/ctdb_daemon.c                   |   22 +-
 server/ctdb_freeze.c                   |   54 ++-
 server/ctdb_ltdb_server.c              |  632 +++++++++++++++++++++++++++-
 server/ctdb_monitor.c                  |   54 +++
 server/ctdb_persistent.c               |   12 +
 server/ctdb_recover.c                  |    6 +
 server/ctdb_recoverd.c                 |   24 +-
 server/ctdb_server.c                   |   12 +
 server/ctdb_traverse.c                 |   20 +
 server/ctdb_tunables.c                 |    3 +-
 server/ctdb_vacuum.c                   |   22 +-
 server/ctdbd.c                         |   26 +-
 server/eventscript.c                   |    5 +-
 tests/scripts/ctdb_test_functions.bash |    2 +-
 tools/ctdb.c                           |  211 ++++++++++-
 tools/ctdb_vacuum.c                    |    4 +-
 78 files changed, 4884 insertions(+), 2033 deletions(-)
 create mode 100644 lib/tdb/build_macros.m4
 create mode 100644 lib/tdb/common/check.c
 create mode 100644 lib/tdb/docs/tracing.txt
 delete mode 100644 lib/tdb/include/config.h.in
 create mode 100644 lib/tdb/pytdb.c
 create mode 100644 lib/tdb/python.mk
 create mode 100644 lib/tdb/python/tdbdump.py
 create mode 100644 lib/tdb/python/tests/simple.py
 create mode 100755 lib/tdb/release-script.sh
 create mode 100644 lib/tdb/rules.mk
 create mode 100755 lib/tdb/script/abi_checks.sh
 create mode 100755 lib/tdb/script/abi_checks_gcc.sh
 create mode 100755 lib/tdb/script/mksigs.pl
 create mode 100644 lib/tdb/script/mksyms.awk
 create mode 100755 lib/tdb/script/mksyms.sh
 delete mode 100644 lib/tdb/swig/Tdb.py
 delete mode 100644 lib/tdb/swig/tdb.i
 delete mode 100644 lib/tdb/swig/tdb.py
 create mode 100644 lib/tdb/tdb.exports
 create mode 100644 lib/tdb/tdb.mk
 delete mode 100644 lib/tdb/tdb.pc
 create mode 100644 lib/tdb/tdb.signatures
 create mode 100644 lib/tdb/web/index.html


Changeset truncated at 500 lines:

diff --git a/client/ctdb_client.c b/client/ctdb_client.c
index 0469ba7..4aad400 100644
--- a/client/ctdb_client.c
+++ b/client/ctdb_client.c
@@ -1498,6 +1498,44 @@ int ctdb_ctrl_getdbname(struct ctdb_context *ctdb, struct timeval timeout, uint3
 }
 
 /*
+  get the health status of a db
+ */
+int ctdb_ctrl_getdbhealth(struct ctdb_context *ctdb,
+			  struct timeval timeout,
+			  uint32_t destnode,
+			  uint32_t dbid, TALLOC_CTX *mem_ctx,
+			  const char **reason)
+{
+	int ret;
+	int32_t res;
+	TDB_DATA data;
+
+	data.dptr = (uint8_t *)&dbid;
+	data.dsize = sizeof(dbid);
+
+	ret = ctdb_control(ctdb, destnode, 0,
+			   CTDB_CONTROL_DB_GET_HEALTH, 0, data,
+			   mem_ctx, &data, &res, &timeout, NULL);
+	if (ret != 0 || res != 0) {
+		return -1;
+	}
+
+	if (data.dsize == 0) {
+		(*reason) = NULL;
+		return 0;
+	}
+
+	(*reason) = talloc_strndup(mem_ctx, (const char *)data.dptr, data.dsize);
+	if ((*reason) == NULL) {
+		return -1;
+	}
+
+	talloc_free(data.dptr);
+
+	return 0;
+}
+
+/*
   create a database
  */
 int ctdb_ctrl_createdb(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode, 
@@ -1683,9 +1721,10 @@ struct ctdb_db_context *ctdb_attach(struct ctdb_context *ctdb, const char *name,
 	}
 
 	tdb_flags = persistent?TDB_DEFAULT:TDB_NOSYNC;
-	if (!ctdb->do_setsched) {
+	if (ctdb->valgrinding) {
 		tdb_flags |= TDB_NOMMAP;
 	}
+	tdb_flags |= TDB_DISALLOW_NESTING;
 
 	ctdb_db->ltdb = tdb_wrap_open(ctdb, ctdb_db->db_path, 0, tdb_flags, O_RDWR, 0);
 	if (ctdb_db->ltdb == NULL) {
@@ -1848,7 +1887,7 @@ int ctdb_traverse(struct ctdb_db_context *ctdb_db, ctdb_traverse_func fn, void *
 /*
   called on each key during a catdb
  */
-static int dumpdb_fn(struct ctdb_context *ctdb, TDB_DATA key, TDB_DATA data, void *p)
+int ctdb_dumpdb_record(struct ctdb_context *ctdb, TDB_DATA key, TDB_DATA data, void *p)
 {
 	int i;
 	FILE *f = (FILE *)p;
@@ -1887,7 +1926,7 @@ static int dumpdb_fn(struct ctdb_context *ctdb, TDB_DATA key, TDB_DATA data, voi
  */
 int ctdb_dump_db(struct ctdb_db_context *ctdb_db, FILE *f)
 {
-	return ctdb_traverse(ctdb_db, dumpdb_fn, f);
+	return ctdb_traverse(ctdb_db, ctdb_dumpdb_record, f);
 }
 
 /*
@@ -3627,11 +3666,6 @@ int switch_from_server_to_client(struct ctdb_context *ctdb)
 	close(ctdb->daemon.sd);
 	ctdb->daemon.sd = -1;
 
-	/* the client does not need to be realtime */
-	if (ctdb->do_setsched) {
-		ctdb_restore_scheduler(ctdb);
-	}
-
 	/* initialise ctdb */
 	ret = ctdb_socket_connect(ctdb);
 	if (ret != 0) {
diff --git a/common/ctdb_util.c b/common/ctdb_util.c
index 787d8d7..0b34f2a 100644
--- a/common/ctdb_util.c
+++ b/common/ctdb_util.c
@@ -23,6 +23,7 @@
 #include "system/network.h"
 #include "system/filesys.h"
 #include "system/wait.h"
+#include "system/shmem.h"
 #include "../include/ctdb_private.h"
 
 int LogLevel = DEBUG_NOTICE;
@@ -323,52 +324,19 @@ struct ctdb_rec_data *ctdb_marshall_loop_next(struct ctdb_marshall_buffer *m, st
 	return r;
 }
 
-
-#if HAVE_SCHED_H
-#include <sched.h>
-#endif
-
 /*
-  if possible, make this task real time
+  if possible, make this task very high priority
  */
-void ctdb_set_scheduler(struct ctdb_context *ctdb)
+void ctdb_high_priority(struct ctdb_context *ctdb)
 {
-#if HAVE_SCHED_SETSCHEDULER	
-	struct sched_param p;
-	if (ctdb->saved_scheduler_param == NULL) {
-		ctdb->saved_scheduler_param = talloc_size(ctdb, sizeof(p));
-	}
-	
-	if (sched_getparam(0, (struct sched_param *)ctdb->saved_scheduler_param) == -1) {
-		DEBUG(DEBUG_ERR,("Unable to get old scheduler params\n"));
-		return;
-	}
-
-	p = *(struct sched_param *)ctdb->saved_scheduler_param;
-	p.sched_priority = 1;
-
-	if (sched_setscheduler(0, SCHED_FIFO, &p) == -1) {
-		DEBUG(DEBUG_CRIT,("Unable to set scheduler to SCHED_FIFO (%s)\n", 
-			 strerror(errno)));
+	errno = 0;
+	if (nice(-20) == -1 && errno != 0) {
+		DEBUG(DEBUG_WARNING,("Unable to renice self: %s\n",
+				     strerror(errno)));
 	} else {
-		DEBUG(DEBUG_NOTICE,("Set scheduler to SCHED_FIFO\n"));
+		DEBUG(DEBUG_NOTICE,("Scheduler says I'm nice: %i\n",
+				    getpriority(PRIO_PROCESS, getpid())));
 	}
-#endif
-}
-
-/*
-  restore previous scheduler parameters
- */
-void ctdb_restore_scheduler(struct ctdb_context *ctdb)
-{
-#if HAVE_SCHED_SETSCHEDULER	
-	if (ctdb->saved_scheduler_param == NULL) {
-		ctdb_fatal(ctdb, "No saved scheduler parameters\n");
-	}
-	if (sched_setscheduler(0, SCHED_OTHER, (struct sched_param *)ctdb->saved_scheduler_param) == -1) {
-		ctdb_fatal(ctdb, "Unable to restore old scheduler parameters\n");
-	}
-#endif
 }
 
 void set_nonblocking(int fd)
@@ -662,6 +630,28 @@ int32_t get_debug_by_desc(const char *desc)
 	return DEBUG_ERR;
 }
 
+/* we don't lock future pages here; it would increase the chance that
+ * we'd fail to mmap later on. */
+void ctdb_lockdown_memory(struct ctdb_context *ctdb)
+{
+#ifdef HAVE_MLOCKALL
+	/* Extra stack, please! */
+	char dummy[10000];
+	memset(dummy, 0, sizeof(dummy));
+
+	if (ctdb->valgrinding) {
+		return;
+	}
+
+	/* Avoid compiler optimizing out dummy. */
+	mlock(dummy, sizeof(dummy));
+	if (mlockall(MCL_CURRENT) != 0) {
+		DEBUG(DEBUG_WARNING,("Failed to lock memory: %s'\n",
+				     strerror(errno)));
+	}
+#endif
+}
+
 const char *ctdb_eventscript_call_names[] = {
 	"startup",
 	"startrecovery",
diff --git a/config/ctdb.init b/config/ctdb.init
index 67747fd..2e25cf1 100755
--- a/config/ctdb.init
+++ b/config/ctdb.init
@@ -103,13 +103,46 @@ build_ctdb_options () {
     maybe_set "--lvs --single-public-ip" "$CTDB_LVS_PUBLIC_IP"
     maybe_set "--script-log-level"       "$CTDB_SCRIPT_LOG_LEVEL"
     maybe_set "--syslog"                 "$CTDB_SYSLOG"               "yes"
+    maybe_set "--max-persistent-check-errors" "$CTDB_MAX_PERSISTENT_CHECK_ERRORS"
+}
+
+check_tdb () {
+	local PDBASE=$1
+
+	local TDBTOOL_HAS_CHECK=`echo "help" | /usr/bin/tdbtool | grep check | wc -l`
+
+	test x"$TDBTOOL_HAS_CHECK" = x"1" && {
+		#
+		# Note tdbtool always exits with 0
+		#
+		local OK=`/usr/bin/tdbtool $PDBASE check | grep "Database integrity is OK" | wc -l`
+		test x"$OK" = x"1" || {
+			return 1;
+		}
+
+		return 0;
+	}
+
+	/usr/bin/tdbdump $PDBASE >/dev/null 2>/dev/null || {
+		return $?;
+	}
+
+	return 0;
 }
 
 check_persistent_databases () {
     PERSISTENT_DB_DIR="${CTDB_DBDIR:-/var/ctdb}/persistent"
     mkdir -p $PERSISTENT_DB_DIR 2>/dev/null
+    local ERRCOUNT=$CTDB_MAX_PERSISTENT_CHECK_ERRORS
+
+    test -z "$ERRCOUNT" && {
+	ERRCOUNT="0"
+    }
+    test x"$ERRCOUNT" != x"0" && {
+	return 0;
+    }
     for PDBASE in `ls $PERSISTENT_DB_DIR/*.tdb.[0-9] 2>/dev/null`; do
-	/usr/bin/tdbdump $PDBASE >/dev/null 2>/dev/null || {
+	check_tdb $PDBASE || {
 	    echo "Persistent database $PDBASE is corrupted! CTDB will not start."
 	    return 1
 	}
@@ -153,7 +186,7 @@ start() {
     case $init_style in
 	valgrind)
 	    valgrind -q --log-file=/var/log/ctdb_valgrind \
-		$ctdbd --nosetsched $CTDB_OPTIONS 
+		$ctdbd --valgrinding $CTDB_OPTIONS
 	    RETVAL=$?
 	    echo
 	    ;;
diff --git a/config/ctdb.sysconfig b/config/ctdb.sysconfig
index e6c7b4f..bc31001 100644
--- a/config/ctdb.sysconfig
+++ b/config/ctdb.sysconfig
@@ -200,6 +200,14 @@ CTDB_DEBUGLEVEL=ERR
 # The default is "no".
 # CTDB_RUN_TIMEOUT_MONITOR=no
 
+# Should ctdbd start with corrupted/unhealthy persistent databases?
+# This parameter specifies the max error count for persistent health
+# checks before the "startup" event. The value must be a positive
+# interger value, "0" or "-1".
+# The default is "0", which means ctdbd will not start.
+# "-1" means wait forever.
+# CTDB_MAX_PERSISTENT_CHECK_ERRORS=0
+
 # set any default tuning options for ctdb
 # use CTDB_SET_XXXX=value where XXXX is the name of the tuning
 # variable
diff --git a/config/statd-callout b/config/statd-callout
index e31530a..168975c 100755
--- a/config/statd-callout
+++ b/config/statd-callout
@@ -10,6 +10,7 @@
 }
 
 . $CTDB_BASE/functions
+loadconfig ctdb
 loadconfig nfs
 
 [ -z "$STATD_SHARED_DIRECTORY" ] && {
diff --git a/configure.ac b/configure.ac
index aaec420..d4098a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,6 +71,7 @@ m4_include(ib/config.m4)
 
 AC_CHECK_HEADERS(sched.h)
 AC_CHECK_FUNCS(sched_setscheduler)
+AC_CHECK_FUNCS(mlockall)
 
 AC_CACHE_CHECK([for sin_len in sock],ctdb_cv_HAVE_SOCK_SIN_LEN,[
 AC_TRY_COMPILE([#include <sys/types.h>
diff --git a/doc/ctdb.1 b/doc/ctdb.1
index fa9482f..b539d28 100644
--- a/doc/ctdb.1
+++ b/doc/ctdb.1
@@ -1,167 +1,182 @@
+'\" t
 .\"     Title: ctdb
-.\"    Author: 
-.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
-.\"      Date: 10/29/2009
-.\"    Manual: 
-.\"    Source: 
+.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
+.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
+.\"      Date: 12/09/2009
+.\"    Manual:  
+.\"    Source:  
+.\"  Language: English
 .\"
-.TH "CTDB" "1" "10/29/2009" "" ""
+.TH "CTDB" "1" "12/09/2009" "" ""
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
 .ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
 .SH "NAME"
-ctdb - clustered tdb database management utility
+ctdb \- clustered tdb database management utility
 .SH "SYNOPSIS"
-.HP 29
-\fBctdb [ OPTIONS ] COMMAND \.\.\.\fR
-.HP 5
+.HP \w'\fBctdb\ [\ OPTIONS\ ]\ COMMAND\ \&.\&.\&.\fR\ 'u
+\fBctdb [ OPTIONS ] COMMAND \&.\&.\&.\fR
+.HP \w'\fBctdb\fR\ 'u
 \fBctdb\fR [\-n\ <node>] [\-Y] [\-t\ <timeout>] [\-T\ <timelimit>] [\-?\ \-\-help] [\-\-usage] [\-d\ \-\-debug=<INTEGER>] [\-\-socket=<filename>]
 .SH "DESCRIPTION"
 .PP
-ctdb is a utility to view and manage a ctdb cluster\.
+ctdb is a utility to view and manage a ctdb cluster\&.
 .SH "OPTIONS"
 .PP
 \-n <pnn>
 .RS 4
-This specifies the physical node number on which to execute the command\. Default is to run the command on the deamon running on the local host\.
+This specifies the physical node number on which to execute the command\&. Default is to run the command on the deamon running on the local host\&.
 .sp
-The physical node number is an integer that describes the node in the cluster\. The first node has physical node number 0\.
+The physical node number is an integer that describes the node in the cluster\&. The first node has physical node number 0\&.
 .RE
 .PP
 \-Y
 .RS 4
-Produce output in machine readable form for easier parsing by scripts\. Not all commands support this option\.
+Produce output in machine readable form for easier parsing by scripts\&. Not all commands support this option\&.
 .RE
 .PP
 \-t <timeout>
 .RS 4
-How long should ctdb wait for the local ctdb daemon to respond to a command before timing out\. Default is 3 seconds\.
+How long should ctdb wait for the local ctdb daemon to respond to a command before timing out\&. Default is 3 seconds\&.
 .RE
 .PP
 \-T <timelimit>
 .RS 4
-A limit on how long the ctdb command will run for before it will be aborted\. When this timelimit has been exceeded the ctdb command will terminate\.
+A limit on how long the ctdb command will run for before it will be aborted\&. When this timelimit has been exceeded the ctdb command will terminate\&.
 .RE
 .PP
 \-? \-\-help
 .RS 4
-Print some help text to the screen\.
+Print some help text to the screen\&.
 .RE
 .PP
 \-\-usage
 .RS 4
-Print useage information to the screen\.
+Print useage information to the screen\&.
 .RE
 .PP
 \-d \-\-debug=<debuglevel>
 .RS 4
-Change the debug level for the command\. Default is 0\.
+Change the debug level for the command\&. Default is 0\&.
 .RE
 .PP
 \-\-socket=<filename>
 .RS 4
-Specify the socketname to use when connecting to the local ctdb daemon\. The default is /tmp/ctdb\.socket \.
+Specify the socketname to use when connecting to the local ctdb daemon\&. The default is /tmp/ctdb\&.socket \&.
 .sp
-You only need to specify this parameter if you run multiple ctdb daemons on the same physical host and thus can not use the default name for the domain socket\.
+You only need to specify this parameter if you run multiple ctdb daemons on the same physical host and thus can not use the default name for the domain socket\&.
 .RE
 .SH "ADMINISTRATIVE COMMANDS"
 .PP
-These are commands used to monitor and administrate a CTDB cluster\.
+These are commands used to monitor and administrate a CTDB cluster\&.
 .SS "pnn"
 .PP
-This command displays the pnn of the current node\.
+This command displays the pnn of the current node\&.
 .SS "status"
 .PP
-This command shows the current status of the ctdb node\.
+This command shows the current status of the ctdb node\&.
 .sp
 .it 1 an-trap
 .nr an-no-space-flag 1
 .nr an-break-flag 1
 .br
-node status
-.RS
+.ps +1
+\fBnode status\fR
+.RS 4
 .PP
-Node status reflects the current status of the node\. There are five possible states:
+Node status reflects the current status of the node\&. There are five possible states:
 .PP
-OK \- This node is fully functional\.
+OK \- This node is fully functional\&.
 .PP
-DISCONNECTED \- This node could not be connected through the network and is currently not participating in the cluster\. If there is a public IP address associated with this node it should have been taken over by a different node\. No services are running on this node\.
+DISCONNECTED \- This node could not be connected through the network and is currently not participating in the cluster\&. If there is a public IP address associated with this node it should have been taken over by a different node\&. No services are running on this node\&.
 .PP
-DISABLED \- This node has been administratively disabled\. This node is still functional and participates in the CTDB cluster but its IP addresses have been taken over by a different node and no services are currently being hosted\.
+DISABLED \- This node has been administratively disabled\&. This node is still functional and participates in the CTDB cluster but its IP addresses have been taken over by a different node and no services are currently being hosted\&.
 .PP
-UNHEALTHY \- A service provided by this node is malfunctioning and should be investigated\. The CTDB daemon itself is operational and participates in the cluster\. Its public IP address has been taken over by a different node and no services are currnetly being hosted\. All unhealthy nodes should be investigated and require an administrative action to rectify\.
+UNHEALTHY \- A service provided by this node is malfunctioning and should be investigated\&. The CTDB daemon itself is operational and participates in the cluster\&. Its public IP address has been taken over by a different node and no services are currnetly being hosted\&. All unhealthy nodes should be investigated and require an administrative action to rectify\&.
 .PP
-BANNED \- This node failed too many recovery attempts and has been banned from participating in the cluster for a period of RecoveryBanPeriod seconds\. Any public IP address has been taken over by other nodes\. This node does not provide any services\. All banned nodes should be investigated and require an administrative action to rectify\. This node does not perticipate in the CTDB cluster but can still be communicated with\. I\.e\. ctdb commands can be sent to it\.
+BANNED \- This node failed too many recovery attempts and has been banned from participating in the cluster for a period of RecoveryBanPeriod seconds\&. Any public IP address has been taken over by other nodes\&. This node does not provide any services\&. All banned nodes should be investigated and require an administrative action to rectify\&. This node does not perticipate in the CTDB cluster but can still be communicated with\&. I\&.e\&. ctdb commands can be sent to it\&.
 .PP
-STOPPED \- A node that is stopped does not host any public ip addresses, nor is it part of the VNNMAP\. A stopped node can not become LVSMASTER, RECMASTER or NATGW\. This node does not perticipate in the CTDB cluster but can still be communicated with\. I\.e\. ctdb commands can be sent to it\.
+STOPPED \- A node that is stopped does not host any public ip addresses, nor is it part of the VNNMAP\&. A stopped node can not become LVSMASTER, RECMASTER or NATGW\&. This node does not perticipate in the CTDB cluster but can still be communicated with\&. I\&.e\&. ctdb commands can be sent to it\&.
 .RE
 .sp
 .it 1 an-trap
 .nr an-no-space-flag 1
 .nr an-break-flag 1
 .br
-generation
-.RS
+.ps +1
+\fBgeneration\fR
+.RS 4
 .PP
-The generation id is a number that indicates the current generation of a cluster instance\. Each time a cluster goes through a reconfiguration or a recovery its generation id will be changed\.
+The generation id is a number that indicates the current generation of a cluster instance\&. Each time a cluster goes through a reconfiguration or a recovery its generation id will be changed\&.
 .PP
-This number does not have any particular meaning other than to keep track of when a cluster has gone through a recovery\. It is a random number that represents the current instance of a ctdb cluster and its databases\. CTDBD uses this number internally to be able to tell when commands to operate on the cluster and the databases was issued in a different generation of the cluster, to ensure that commands that operate on the databases will not survive across a cluster database recovery\. After a recovery, all old outstanding commands will automatically become invalid\.
+This number does not have any particular meaning other than to keep track of when a cluster has gone through a recovery\&. It is a random number that represents the current instance of a ctdb cluster and its databases\&. CTDBD uses this number internally to be able to tell when commands to operate on the cluster and the databases was issued in a different generation of the cluster, to ensure that commands that operate on the databases will not survive across a cluster database recovery\&. After a recovery, all old outstanding commands will automatically become invalid\&.
 .PP
-Sometimes this number will be shown as "INVALID"\. This only means that the ctdbd daemon has started but it has not yet merged with the cluster through a recovery\. All nodes start with generation "INVALID" and are not assigned a real generation id until they have successfully been merged with a cluster through a recovery\.
+Sometimes this number will be shown as "INVALID"\&. This only means that the ctdbd daemon has started but it has not yet merged with the cluster through a recovery\&. All nodes start with generation "INVALID" and are not assigned a real generation id until they have successfully been merged with a cluster through a recovery\&.
 .RE
 .sp
 .it 1 an-trap
 .nr an-no-space-flag 1
 .nr an-break-flag 1
 .br
-VNNMAP
-.RS
+.ps +1
+\fBVNNMAP\fR
+.RS 4
 .PP
-The list of Virtual Node Numbers\. This is a list of all nodes that actively participates in the cluster and that share the workload of hosting the Clustered TDB database records\. Only nodes that are participating in the vnnmap can become lmaster or dmaster for a database record\.
+The list of Virtual Node Numbers\&. This is a list of all nodes that actively participates in the cluster and that share the workload of hosting the Clustered TDB database records\&. Only nodes that are participating in the vnnmap can become lmaster or dmaster for a database record\&.
 .RE
 .sp
 .it 1 an-trap
 .nr an-no-space-flag 1
 .nr an-break-flag 1
 .br
-Recovery mode
-.RS
+.ps +1
+\fBRecovery mode\fR
+.RS 4
 .PP
-This is the current recovery mode of the cluster\. There are two possible modes:
+This is the current recovery mode of the cluster\&. There are two possible modes:
 .PP
-NORMAL \- The cluster is fully operational\.
+NORMAL \- The cluster is fully operational\&.
 .PP
-RECOVERY \- The cluster databases have all been frozen, pausing all services while the cluster awaits a recovery process to complete\. A recovery process should finish within seconds\. If a cluster is stuck in the RECOVERY state this would indicate a cluster malfunction which needs to be investigated\.
+RECOVERY \- The cluster databases have all been frozen, pausing all services while the cluster awaits a recovery process to complete\&. A recovery process should finish within seconds\&. If a cluster is stuck in the RECOVERY state this would indicate a cluster malfunction which needs to be investigated\&.
 .PP
-Once the recovery master detects an inconsistency, for example a node becomes disconnected/connected, the recovery daemon will trigger a cluster recovery process, where all databases are remerged across the cluster\. When this process starts, the recovery master will first "freeze" all databases to prevent applications such as samba from accessing the databases and it will also mark the recovery mode as RECOVERY\.
+Once the recovery master detects an inconsistency, for example a node becomes disconnected/connected, the recovery daemon will trigger a cluster recovery process, where all databases are remerged across the cluster\&. When this process starts, the recovery master will first "freeze" all databases to prevent applications such as samba from accessing the databases and it will also mark the recovery mode as RECOVERY\&.
 .PP
-When CTDBD starts up, it will start in RECOVERY mode\. Once the node has been merged into a cluster and all databases have been recovered, the node mode will change into NORMAL mode and the databases will be "thawed", allowing samba to access the databases again\.


-- 
CTDB repository


More information about the samba-cvs mailing list