[SCM] CTDB repository - branch master updated - 32a69b0efa078b069802470be6488a4efe32961d

Andrew Tridgell tridge at samba.org
Tue Aug 4 00:47:39 MDT 2009


The branch, master has been updated
  discards  9fc1b49dddf7f7c5b6a7562c293cb22bc7d5f3b9 (commit)
  discards  11b11e00d00d1bc587e18283861664d73f287b41 (commit)
  discards  de559946b20cfd7560a205b9c4ae73688341d1b5 (commit)
  discards  ba1f6c310d41c97fdef60ddbad60aece869cabc2 (commit)
  discards  2eedaa8f4fd4afc0564387a93cd0f9186ae7d0a1 (commit)
  discards  08e6c100971e1d72edd050f7f502145363f3c1ab (commit)
  discards  c62e71fa8b6170245dbb66057b441b94c10e2c5d (commit)
  discards  8ae93da7f6341f1cddb15786df67644f29648b9b (commit)
  discards  b06d4c6ee7da97aaa810aa4c95952b6505cf720f (commit)
  discards  d26d522fd0a1df7f06be056e7458ed5349a00658 (commit)
  discards  d02c0e9371981bc6830f792d65e9f08832656cf0 (commit)
  discards  87e674f93728fb20209b6473f07ca323530ddbdc (commit)
  discards  478f43bc3c970edc7c8db3e34095774261a48056 (commit)
  discards  a63c79318678abe99d2a36fe4465e63eafc008b7 (commit)
  discards  8628402d4cad4b9ef580151b85e36b6a5909e56c (commit)
  discards  c61c4f7a7628232e9094d463275ba6abf7b79941 (commit)
  discards  460e6b2402fc9bca9e9835e3a203278ac0bcaf8f (commit)
  discards  fb582515c674b76e06aed28d04f24ae3a849cfe2 (commit)
  discards  b5ef99f14fb02deb128b4b0956508fc980886407 (commit)
  discards  ac5557659e667da5f3a33cc612e06a21396fce2d (commit)
  discards  968739ea9af2aaba90e6bb4569ae4d9fb60b79aa (commit)
  discards  2031fd8b83bd832d1104128c3faddf209e6bb23e (commit)
  discards  0563b3c6d9787164475538fbc1342f8c6be62eac (commit)
  discards  3aba067b7fa7d77836901f82deee441a07b3a15d (commit)
  discards  0a7dbe56d1b4545e9f45c29ea719d24b3b3ada3e (commit)
  discards  767e92f64b63a6bcaa36efe633e8a3e55a803e79 (commit)
  discards  7b6bada79b4e0534b261440438b4256bc446191f (commit)
       via  32a69b0efa078b069802470be6488a4efe32961d (commit)
       via  52f21f5a92eb14df7540a2ae9e212d936e646c06 (commit)
       via  7f67f7395e2233f0bba2e9662404aad49e13f645 (commit)
       via  67c5bfb5f02c9d45a32d976021ede4fb2174dfe9 (commit)
       via  2aa5d18bb42dca4ef9cb049b4fa9d7bc999ce4ad (commit)
       via  a2768b0732f2ab2e3fafda55587bd2e99eedf0fa (commit)
       via  dd334caa98882fc59765b7c84eca8e86de785487 (commit)
       via  78466364f22d6a183710338f138b8c808c6b7753 (commit)
       via  30cdad97706a9e9bb210120699aa939f6b16e8ca (commit)
       via  3a8e7d36cc42aedf4b7665364224140dcbfb3efa (commit)
       via  4d9a53f142deba6ab578af2fc35bfa99c29c3a99 (commit)
       via  9dea71cf72ef79a9aadf8ee7cf1a1899527459ff (commit)
       via  c07d6d90f7afd19213ad44624c3e2b9c85f4eea8 (commit)
       via  f88103516e5ad723062fb95fcb07a128f1069d69 (commit)
       via  e9194a130327d6b05a8ab90bd976475b0e93b06d (commit)
       via  d7ff60a74595dcb4ae41f5a8193de5b898d61227 (commit)
       via  20e82e0c48e07d1012549f5277f1f5a3f4bd10d1 (commit)
       via  bfc926c866e361ab28330747544b268ba130bf30 (commit)
       via  1d7d7dd515e7ef62cacf2a712a2f4c4d62a38fa5 (commit)
       via  51aaed0e9e42e901451292e8dd545297ab725a62 (commit)
       via  9b395986962909a5b0548eaea7e45215df72a08e (commit)
       via  fb337c151bd16ad5ad0c99431224451979d8c651 (commit)
       via  89a9bb29a60a6fb1fba55987e6cf0a4baa695e50 (commit)
       via  b6c8011024ce4574f945d5a470075c6779b34a43 (commit)
       via  d187eb8507f35a650ff3ffc50fa49110eebca0bd (commit)
       via  febf3d6d3f2bdf187c042f560aefc54b8ac72454 (commit)
       via  70603d9a79c80379bf65d9d703c399a65c109c52 (commit)
       via  65e9309564611bf937ded3c74a79abff895d7c59 (commit)
       via  ca4982c40d81db528fe915d5ecc01fcf7df0b522 (commit)
       via  7f273ee769d671d8c8be87c9187302fb77e814f3 (commit)
       via  8bbd96cfbbe98f3fc19e432797cbf4478f753a0b (commit)
       via  4505ea15408ad40dd8deb4041fd75a65a0ad9336 (commit)
       via  34e6f8a04b12f8879eb42d417f9741502ccccf0f (commit)
       via  b75ac1185481060ab71bd743e1e48d333d716eba (commit)
       via  1e007c833098b03dd81797c081da1ae1b10c971c (commit)
       via  99f239f8b96c8c0a06ac8ca8b8083be96265865a (commit)
       via  d6ddea4167ccdad05e88378ee3f22b6125969562 (commit)
       via  501a2747d839ca291b70c761098549cf6d47a158 (commit)
       via  54b4a02053a0f98f8c424e7f658890254023d39a (commit)
       via  866aa995dc029db6e510060e9e95a8ca149094ac (commit)
       via  049271c83a09afb8d6c3e5212cf9ca782956b0c6 (commit)
       via  d47dab1026deba0554f21282a59bd172209ea066 (commit)
       via  2ff6ee042080ba1c2bea76bbef3742997d84c9a8 (commit)
       via  823019870c0831258b96654646f71e9dd69317ec (commit)
       via  de0b58e18fcc0f90075fca74077ab62ae8dab5da (commit)
       via  b67946a6f6b185a7920bf1e560988417c8c4d87d (commit)
       via  3f7a4afa0fcc5825beb89267973939df8cde4999 (commit)
       via  8d12fe61eb59a4a611dd5950506d14bd4891075d (commit)
       via  aa9f79e4b3e077b48a8a16903d2236c284617e49 (commit)
       via  52e1cd7e9217cfa521850a9a9a9daddcce011f27 (commit)
       via  7c27c493a6de92544754e42f2a8f227b3d663c73 (commit)
       via  da87914ab47fe5786b620587464b58853e98dd7e (commit)
       via  56ece515e047a54f33e8b07726e52ba21a1d67e1 (commit)
       via  bebb21f18e3026cb78a306104e92ee005d1077b2 (commit)
       via  5e3b590e384bacfbebab1dd85e89cd87b63c620e (commit)
       via  5664da36943b4901a807a9594b0f45e859aafbf3 (commit)
       via  ee7caae3a55a64fb50cd28fa2fd4663c5dd83b4f (commit)
       via  1cac8a0ad429f29d1508158c7f7c42a2f1a22945 (commit)
       via  bdb856ee22816ae1f6b8d15856555f488054f489 (commit)
       via  6e1f60d8d780c1240aaabb78ecc8550d0480cd7e (commit)
       via  49e7584679c7467a367888c5b14529c8e338f032 (commit)
       via  92011cc05bbdb517ec6a4573f5cb9f6f21c3059e (commit)
       via  8e2a89935a969340bfead8ed040d74703947cb81 (commit)
       via  c2bdb77d91761c003e2f0e6918a27c54150f6030 (commit)
       via  e309cb3f95efcf6cff7d7c19713d7b161a138383 (commit)
       via  b6fa044a1364cbb3008085041453ee4885f7ced1 (commit)
       via  abad7b97fe0c066b33f6e75d0953bbed892a3216 (commit)
       via  c69f5fe1db5b6ed4a009f0c10ab82c6f32b2e0bc (commit)
       via  6baaf5bec3ba0094c71d83315170acb5dc729711 (commit)
       via  b99afc98bedf1a51d315e311f27c3fc55fd940e7 (commit)
       via  964530d70ba2ca949380d30a0e3d622963a6206c (commit)
       via  421c0566094b91221fab2ea68f2c9bd35d5dfbcb (commit)
       via  daec49cea1790bcc64599959faf2159dec2c5929 (commit)
       via  f4b0825d9da34578b9f90dc9bd7f99fcc2519ddf (commit)
       via  5cdc04669db8c2ddbbff5af82307a16e8d807b83 (commit)
       via  cb8dd896914d4e44ad7b8bb000176a7c78f394ae (commit)
       via  c17dafc79bec25bbb796478c33f503503d382a20 (commit)
       via  75dea671f68ac6649095357c36b3697a927721e9 (commit)
       via  65b94d280731df3245b26d69f39acfaf5bccf0d8 (commit)
       via  9a2c4c3ed09ac9ea781d06999d11e5c3b5b4a97a (commit)
       via  945f04f06a425fd3940a2e4b832c63223a3f26b3 (commit)
       via  a73f316cb9cec877dc0bc3f7baa21be1b1454273 (commit)
       via  841a2d9635341baa1a6dd9ec558fc7cadb4e3af4 (commit)
       via  3db8b1d7425ed5bd41e58b43c55fdac517d71baf (commit)
       via  5334e40978350b6b597ee020bac52e37c8f9a8ba (commit)
       via  d973cb6e83b2f7cc37bd39c1219dcfbd4911a8ee (commit)
       via  36cc2e586f03fa497ee9b06f3e6afc80219c4aaa (commit)
       via  31acc11a6389d4dd9f7b71b7cfa2f2450076f1f7 (commit)
       via  6755f89f81aba63bfe00ee16d44a0201cbfa90ca (commit)
       via  ed6a4cbcdcbb4e0df83bec8be67c30288bf9bd41 (commit)
       via  33895d217ee096b356f02b5292ba27a840c4f559 (commit)
       via  07855ff5eba71e7d607d52e234a42553d9b93605 (commit)
       via  a25f4888689a0725971606163d87c39a41669292 (commit)
       via  553a244fc8d7814634330bf4829ac127d63886be (commit)
       via  a4b682e3b2657abeca3e387d96949f83bdbd7b2f (commit)
       via  9bc8e7eec7ffa8969f0f170a77b13cd0033790f1 (commit)
       via  937b029fd47d6af162c27d9dce6da0e22b36b79a (commit)
       via  16ec9ca56a9f5b88d7a5ed4f89a28a53f5c9c081 (commit)
       via  867f57d166395c92949e480ca725249b0ca8950b (commit)
       via  070305adfe636c2580776e6bf24bb8be06622b86 (commit)
       via  fc69b6a66282d5be6edeb286bf72aeafb252e6dd (commit)
       via  5d320099025b6835eda3a1e431708f7e0a6b0ba6 (commit)
       via  fdf50f3e774e3980af81c0b6f4ff81d085f4f697 (commit)
       via  fc8a364eb095ec11ca01246a583bf1dc53510141 (commit)
       via  268c3e4b269a92741a02280c84384178e73de10e (commit)
       via  d177b08f1dc79534491f27726b05405d47e12e20 (commit)
       via  6d1e4321b63973c2e53c63d386e8cc0bd9605cae (commit)
       via  c97d56d93d9c1007a4e85affb19ed0c2d0e11b6d (commit)
       via  d440e83bb4f0c19c085915d0f0e87cc0dabbc569 (commit)
       via  facddcacb4a961cddb117818fa38a3e97770b2fa (commit)
       via  1205673499618f90f413fad9e96a88733b5ce359 (commit)
       via  5d188af387a2a1d68d66f47edb7a9ca546ed357c (commit)
       via  be3e23c9fcb9c716e492af102830a4f6ad8bda7b (commit)
       via  8ddd5165f573fc6beaae589b86a6afa4bc17f32a (commit)
       via  10531b50e2d306a5e62b8d488a1acc9e75b0ad4b (commit)
       via  31cc46eb157ca1301312f14879e4fb4da7d81088 (commit)
       via  d5ca4ab325fce1f81361a4d79810cb543979ce57 (commit)
       via  d6e6909ac629212b3028e13b958e1a17c64bee8c (commit)
       via  46e8c3737e6ff54fc80de8e962e922924c27bc35 (commit)
       via  2a52336ec021dfe8d56ba72726feb7b2dbd41f68 (commit)
       via  d350c631850377c09968d2978ef57d2bd0d50116 (commit)
       via  0ca28d7336463ecd2ff65620d8dbcbb496991531 (commit)
       via  6318ea13464e2fe630084c40802d8e697c2cb999 (commit)
       via  4d5d22e64270cfb31be6acd71f4f97ec43df5b2c (commit)
       via  7eb137aa4c24c69bd93b98fb3c7108e5f3288ebd (commit)
       via  4a55cacc4f5526abd2124460b669e633deeda408 (commit)
       via  06b33a826e71e1dd2f9e02ad614be55535d42045 (commit)
       via  92be87b5bfed7882b48f4034c82dfdb031f3afdc (commit)
       via  135b72828fc76856fa8f6d7f9c820120de05596b (commit)
       via  951dbcb29fd53cf51a08958efe185db4954d24f3 (commit)
       via  1ea6af7007fe3b5a48d48440a0924c71d7a6000a (commit)
       via  af1b3de978089a9819716b33c13c941b5558cb17 (commit)
       via  03d304e72a5839dc8d8d2e2312b346c21dca5774 (commit)
       via  f236fa289f3115b1f4eb108eb668392dc520f61a (commit)
       via  e3d9722e332f132bd47dc41621d4e1d2b5c9c62a (commit)
       via  ee5d49324155e3e51371f6f8e5ed9eef4179f08d (commit)
       via  91fdfee371d6be83af60cd38ac34afb295b9987a (commit)
       via  c265df3c7950aab51b8b6ef17040229b97345c35 (commit)
       via  1b7c88ae7643f9bcc52b1d33095f97de88fc2316 (commit)
       via  0cd66c744cd9533ce8d4c4374bcee3bf49b66dae (commit)
       via  df20cd9b05ad9ca72e32ccc42354eafc12b68c04 (commit)
       via  6a5e4fd7fa391206b463bb4e976502f3ac5bd343 (commit)
       via  b18356764cd49d934eab901e596bb75c6e3ecdf8 (commit)
       via  3e49e41c21eb8c53084aa8cc7fd3557bdd8eb7b6 (commit)
       via  87292029cb444ffab130ff7dae47a629c2d15787 (commit)
       via  9762a3408f10409b629637d237ec513a825a6059 (commit)
       via  f1c6f7dd47bb1081781c0a0d567a92bbbc0aa5d5 (commit)
       via  dca41ec04788922ce5f4c52d346872b3e35f8cbb (commit)
       via  b0c32a96f4176747ca772be664888f5c3c483b98 (commit)
       via  e57c47b75fa501223c57040eac73392b42ae549d (commit)
       via  bfc6ac07f8b7b326e75d8c9bf73051a440ee0011 (commit)
       via  bb4ef6c4d2bc3578bdf4432517e98f85ec94e3b6 (commit)
       via  5fc14f98902ae98abed35eaab3b3495226dcac38 (commit)
       via  39539a2d1784f04245ed7abc84c4f39e1601afa4 (commit)
       via  ba44aae7307b4fa56f7b2da2cd9d4a7ccd0a135e (commit)
       via  2c4c20d7803f4449f8d463314c40d4734ec80e2f (commit)
       via  d623ea7c04daa6349b42d50862843c9f86115488 (commit)
       via  3aee5ee1deb4a19be3bd3a4ce3abbe09de763344 (commit)
       via  0e84ea23d1d998d4d4ac7d8a858b3d8294f056cb (commit)
       via  4f86c991812c2d0bddbe3de9a9906cf5df118cd4 (commit)
       via  fa5afee8e9a8fba6017bc58f87bc040de7206e63 (commit)
       via  1d833163b57853b84f098dffdb3c5f50164fcc73 (commit)
       via  92b5580c38c23b99c1692708540983b0c0fcd6cf (commit)
       via  025a836ab3be3c078fccd8c10b10dfffbfdd94d0 (commit)
       via  177295ba400fcaf47f026653f27a42a8ff798d36 (commit)
       via  afdbf3c0df02decd823615134294abf2c8a8a5f3 (commit)
       via  722171fc94a36ffe9e0a5c64502b916fde0a13a4 (commit)
       via  042377ed803bb8f7ca9d6ea1a387427b7b8ba45a (commit)
       via  82ee458329968001bb03b2aec42e65f532f007b3 (commit)
       via  fcd6226a6c00cf657532aa76804bfe029df21ba6 (commit)
       via  b7ed7fd4a5fbd344d41caa1afa100b1f24506173 (commit)
       via  0c88fa41bc3c629052bc137ed30c473ed10522fd (commit)
       via  13270a011016bf20bbf721f6d083b2f113fdbc79 (commit)
       via  7498e176817719eadd91201bbd0d9ceb91eefdae (commit)
       via  b321dfd1d23492169ac25ed901d49d7c69ad5340 (commit)
       via  c967b234f59e5998bc8f2250062f4b0d1f39d820 (commit)
       via  2bd796b8a098074502fe20e3ab69098b2109c133 (commit)
       via  5b0067a4e335cbbf6e606646e612d4bfcfdb7441 (commit)
       via  4467b5f88d749d455854512f60a5d313cafa828b (commit)
       via  723413f246399b25166462d2018237920515655f (commit)
       via  3c67e164eb92591f8763883430490805c1dfa9ed (commit)
       via  ea2ca769e1d1068fbbad843750b19acfd87360e0 (commit)
       via  1c31fea7432b870169fb839c1fbba5a33dec8e8a (commit)
       via  e781ff61e17d733349021bb036514f823c7cbfbb (commit)
       via  cdf092d69a710310d82d1d67baa0ffb19f676927 (commit)
       via  29559f5dd099bec210e98909c9b2e048461b7c81 (commit)
       via  a0f5148ac749758e2dfbd6099e829c5bf1d900e6 (commit)
       via  5f3d2e29a446972ac244e20a08e48f4c2f4ffef4 (commit)
       via  2d3fbbbb63f443686f9fec42c0bc2058d115806e (commit)
       via  bbae698656d5da9a4a5b0fbfc3003844f246d54b (commit)
       via  ce6afbdef36e3c386b75709f73ef55efe0bd1987 (commit)
       via  a8019f20cd42a1965410fef5bac2c5b73657b38e (commit)
       via  f7f64f92e26a0757af210d33288162eefcd07d79 (commit)
       via  a87ef6a9206820d5110a7117240f743af010ff19 (commit)
       via  96c79bddf7895e57ccf90f0d250bd08b7c4daf40 (commit)
       via  fce851621fe2099c9692acfbfaade24c3d69727a (commit)
       via  300e84f7023e9194b313e96db943e4050bd64e68 (commit)
       via  200de8f299c8fa44d6dc696532f1a947132e7ec4 (commit)
       via  fe59ecb697fb4686ad8ea2fe4ec1cc7b4629e74f (commit)
       via  8a86f65826b58c2ee3f07f221a4fc82193beec81 (commit)
       via  48c011188c624f10c9a754d4ead27db558088fd4 (commit)
       via  68da42c4ee92fcdfe65baf04c1a2d6446583858b (commit)
       via  9ce9a500543de4f0aef5e8c28cda9bbc3c9d1b77 (commit)
       via  a152fdc79e3360049aee66c3e628237a91df181f (commit)
       via  919b29850671b59bcf748aec25658ea09d8b4f1c (commit)
       via  f2fb2df4619a14f7f6c11f9132ee7d793028042c (commit)
      from  9fc1b49dddf7f7c5b6a7562c293cb22bc7d5f3b9 (commit)

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


- Log -----------------------------------------------------------------
commit 32a69b0efa078b069802470be6488a4efe32961d
Merge: 2aa5d18bb42dca4ef9cb049b4fa9d7bc999ce4ad 52f21f5a92eb14df7540a2ae9e212d936e646c06
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jul 30 10:55:56 2009 +1000

    Merge commit 'martins/master'

commit 52f21f5a92eb14df7540a2ae9e212d936e646c06
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Jul 30 10:47:36 2009 +1000

    Test suite: fix test file permissions in complex/44_failover_nfs_oneway.sh.
    
    Something, perhaps root_squash, causing permission denied on the test
    file after we copy it over with scp.  This sets the initial
    permissions to be friendly and adds -p to the scp command to maintain
    those friendly permissions.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 7f67f7395e2233f0bba2e9662404aad49e13f645
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Jul 29 18:10:05 2009 +1000

    Test suite: fix the test suite's generic event script.
    
    Add a "stopped" case to log events and stop the event script from
    failing with an unknown event.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 67c5bfb5f02c9d45a32d976021ede4fb2174dfe9
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Jul 29 18:01:07 2009 +1000

    Test suite: Fixes for node state parsing plus new stop/continue tests.
    
    The parsing of "ctdb status -Y" output to determine various node
    states was implemented very strictly.  Therefore, the parsing broke
    due to the addition of the new "stopped" state to the output of "ctdb
    status -Y".  This relaxes the parsing so that it should work for
    versions prior to the introduction of the "stopped" state, as well as
    future versions that add new states to the end of the list of bits in
    output of "ctdb status -Y".
    
    Similarly the check for cluster unhealthy (in _cluster_is_healthy())
    now just checks for a single 1 in any bit in the "ctdb status -Y"
    output, rather than checking for a particular number of 0s.
    
    New tests
    tests/simple/{41_ctdb_stop.sh,42_ctdb_continue.sh,43_stop_recmaster_yield.sh}
    do rudimentary testing of the stop and continue functions.
    
    Remove tests tests/simple/41_ctdb_ban.sh and
    tests/simple/42_ctdb_unban.sh.  They were both unreliable.
    
    tests/simple/21_ctdb_disablemonitor.sh now schedules a restart, since
    one will be required.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 2aa5d18bb42dca4ef9cb049b4fa9d7bc999ce4ad
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Jul 29 13:31:12 2009 +1000

    change the defaults for repacking to repack once every 120 seconds and letting it work for 30 second before timing out.

commit a2768b0732f2ab2e3fafda55587bd2e99eedf0fa
Author: Wolfgang Mueller-Friedt <wolfmuel at de.ibm.com>
Date:   Tue Jul 28 23:09:28 2009 +0300

    repack limit tunable
    
    Signed-off-by: Wolfgang Mueller-Friedt <wolfmuel at de.ibm.com>

commit dd334caa98882fc59765b7c84eca8e86de785487
Author: Wolfgang Mueller-Friedt <wolfmuel at de.ibm.com>
Date:   Tue Jul 28 17:49:41 2009 +0300

    remove repack from eventscript
    
    Signed-off-by: Wolfgang Mueller-Friedt <wolfmuel at de.ibm.com>

commit 78466364f22d6a183710338f138b8c808c6b7753
Author: Wolfgang Mueller-Friedt <wolfmuel at de.ibm.com>
Date:   Tue Jul 28 17:45:31 2009 +0300

    added event repacking
    
    Signed-off-by: Wolfgang Mueller-Friedt <wolfmuel at de.ibm.com>

commit 30cdad97706a9e9bb210120699aa939f6b16e8ca
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jul 23 16:03:39 2009 +1000

    vacuum event framework
    
    Signed-off-by: Ronnie Sahlberg <ronniesahlberg at gmail.com>
    Signed-off-by: Wolfgang Mueller-Friedt <wolfmuel at de.ibm.com>

commit 3a8e7d36cc42aedf4b7665364224140dcbfb3efa
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Jul 29 13:25:43 2009 +1000

    initial part of new vacuuming patch.
    
    create some new fields for ctdb_db and tunables

commit 4d9a53f142deba6ab578af2fc35bfa99c29c3a99
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Jul 29 11:18:02 2009 +1000

    From Michael Adam:
    
    Update the transaction test tool to the new api for transactions

commit 9dea71cf72ef79a9aadf8ee7cf1a1899527459ff
Author: Michael Adam <obnox at samba.org>
Date:   Mon Jul 20 16:34:56 2009 +0200

    client: refuse to do record_store() on a persistent tdb.
    
    Only allow stores wrapped in transactions on persistent dbs.
    
    Michael

commit c07d6d90f7afd19213ad44624c3e2b9c85f4eea8
Author: Michael Adam <obnox at samba.org>
Date:   Mon Jul 20 16:33:53 2009 +0200

    ctdbd: refuse PERSISTENT_STORE if transaction is running.
    
    Michael

commit f88103516e5ad723062fb95fcb07a128f1069d69
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jul 21 11:30:38 2009 +0200

    Fix persistent transaction commit race condition.
    
    In ctdb_client.c:ctdb_transaction_commit(), after a failed
    TRANS2_COMMIT control call (for instance due to the 1-second
    being exceeded waiting for a busy node's reply), there is a
    1-second gap between the transaction_cancel() and
    replay_transaction() calls in which there is no lock on the
    persistent db. And due to the lack of global state
    indicating that a transaction is in progress in ctdbd, other nodes
    may succeed to start transactions on the db in this gap and
    even worse work on top of the possibly already pushed changes.
    So the data diverges on the several nodes.
    
    This change fixes this by introducing global state for a transaction
    commit being active in the ctdb_db_context struct and in a db_id field
    in the client so that a client keeps track of _which_ tdb it as
    transaction commit running on. These data are set by ctdb upon
    entering the trans2_commit control and they are cleared in the
    trans2_error or trans2_finished controls. This makes it impossible
    to start a nother transaction or migrate a record to a different
    node while a transaction is active on a persistent tdb, including
    the retry loop.
    
    This approach is dead lock free and still allows recovery process
    to be started in the retry-gap between cancel and replay.
    Also note, that this solution does not require any change in the
    client side.
    
    This was debugged and developed together with
    Stefan Metzmacher <metze at samba.org> - thanks!
    
    Michael

commit e9194a130327d6b05a8ab90bd976475b0e93b06d
Author: Michael Adam <obnox at samba.org>
Date:   Thu Jul 16 22:00:10 2009 +0200

    client: set dmaster in ctdb_transaction_store() also when updating an existing record
    
    Michael

commit d7ff60a74595dcb4ae41f5a8193de5b898d61227
Merge: bfc926c866e361ab28330747544b268ba130bf30 20e82e0c48e07d1012549f5277f1f5a3f4bd10d1
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Jul 29 10:08:56 2009 +1000

    Merge commit 'origin/master'

commit 20e82e0c48e07d1012549f5277f1f5a3f4bd10d1
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Jul 29 09:58:40 2009 +1000

    When processing the stop node control reply in the client code we should
    also check the returned status code in case the _stop() command failed
    due to the eventscripts failing.
    
    If this happens, make "ctdb stop" log an error to the console and try
    the operation again.

commit bfc926c866e361ab28330747544b268ba130bf30
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Jul 28 16:00:11 2009 +1000

    onnode: update tests for healthy and connected to cope with new stopped bit.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 1d7d7dd515e7ef62cacf2a712a2f4c4d62a38fa5
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jul 28 13:54:08 2009 +1000

    document the two new commands setlmasterrole and setrecmasterrole

commit 51aaed0e9e42e901451292e8dd545297ab725a62
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jul 28 13:45:13 2009 +1000

    add two commands : setlmasterrole and setrecmasterrole to enable/disable these capabilities at runtime

commit 9b395986962909a5b0548eaea7e45215df72a08e
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jul 28 10:02:39 2009 +1000

    Document the natgw flag and how this changes the output of "ctdb
    getcapabilities"

commit fb337c151bd16ad5ad0c99431224451979d8c651
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jul 28 10:00:33 2009 +1000

    update the natgw eventscript to set the NATGW capability when this feature is used
    This does not modify any behaviour of the daemon itself other than showing this flag as ON in the ctdeb getcapabilities output

commit 89a9bb29a60a6fb1fba55987e6cf0a4baa695e50
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jul 28 09:58:11 2009 +1000

    add a command "setnatgwstate {on|off}" that can be used to indicate if this node is using natgw functionality or not.

commit b6c8011024ce4574f945d5a470075c6779b34a43
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jul 28 09:27:00 2009 +1000

    describe how to activate NATGW without restarting the nodes on a running
    cluster

commit d187eb8507f35a650ff3ffc50fa49110eebca0bd
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Jul 17 13:01:11 2009 +1000

     new version 1.0.87

commit febf3d6d3f2bdf187c042f560aefc54b8ac72454
Merge: 70603d9a79c80379bf65d9d703c399a65c109c52 34e6f8a04b12f8879eb42d417f9741502ccccf0f
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Jul 17 12:45:08 2009 +1000

    Merge commit 'martins/master'

commit 70603d9a79c80379bf65d9d703c399a65c109c52
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Jul 17 12:30:05 2009 +1000

    document the new stopped event

commit 65e9309564611bf937ded3c74a79abff895d7c59
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Jul 17 12:26:16 2009 +1000

    create a new event : stopped.
    This event is called when a node is stopped and is used by eventscripts that need to do certain cleanup and removal of configuration or ip addresses or routing ...
    
    Note that a STOPPED node is considered "inactive" and as such will not be running the "recovered" event when the rest of the cluster has recovered.

commit ca4982c40d81db528fe915d5ecc01fcf7df0b522
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Jul 17 11:37:03 2009 +1000

    When we create new election data to send during elections, we must re-read the node flags from the main daemon to catch when the STOPPED flag is changed.

commit 7f273ee769d671d8c8be87c9187302fb77e814f3
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Jul 17 09:45:05 2009 +1000

    update the eventscript to ensure that stopped nodes can not become the natgw master
    also verify that we actually do have a natgw master available if this is configured and make the node unhealthy if not.

commit 8bbd96cfbbe98f3fc19e432797cbf4478f753a0b
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Jul 17 09:36:22 2009 +1000

    if all nodes are STOPPED, pick one of the STOPPED nodes as natgw master

commit 4505ea15408ad40dd8deb4041fd75a65a0ad9336
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Jul 17 09:29:58 2009 +1000

    Do not allow STOPPED or DELETED nodes to become the NATGW master

commit 34e6f8a04b12f8879eb42d417f9741502ccccf0f
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Jul 16 14:04:06 2009 +1000

    Test suite: Fix debug code for unexpectedly unhealthy cluster.
    
    The debug code should run "ctdb status" on a cluster node, not on the
    test client.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit b75ac1185481060ab71bd743e1e48d333d716eba
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jul 9 14:44:03 2009 +1000

    stopped nodes can not win a recmaster election
    
    stopped nodes must yield the recmaster role

commit 1e007c833098b03dd81797c081da1ae1b10c971c
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jul 9 14:34:12 2009 +1000

    change the infolevel when logging stop/continue commands

commit 99f239f8b96c8c0a06ac8ca8b8083be96265865a
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jul 9 14:19:32 2009 +1000

    recovery daemon needs to monitor when the local ctdb daemon is stopped and ensure that the databases gets frozen and the node enters recovery mode

commit d6ddea4167ccdad05e88378ee3f22b6125969562
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jul 9 13:07:15 2009 +1000

    document the new commands ctdb stop/continue

commit 501a2747d839ca291b70c761098549cf6d47a158
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jul 9 13:20:14 2009 +1000

    dont let other nodes modify the STOPPED flag for the local process when pushing out flags changes

commit 54b4a02053a0f98f8c424e7f658890254023d39a
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jul 9 12:22:46 2009 +1000

    add two new controls, CTOP_NODE and CONTINUE_NODE
    that are used to stop/continue a node instead of using modflags messages

commit 866aa995dc029db6e510060e9e95a8ca149094ac
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jul 9 11:57:20 2009 +1000

    make it possible to start the daemon in STOPPED mode

commit 049271c83a09afb8d6c3e5212cf9ca782956b0c6
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jul 9 11:43:37 2009 +1000

    remove the header printed for the machinereadable output for natgwlist

commit d47dab1026deba0554f21282a59bd172209ea066
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jul 9 11:38:18 2009 +1000

    Add a new node flag : STOPPED
    This node flag means the node is DISABLED and that all its public ip addresses
    are failed over, but also that it has been removed from the VNNmap.
    
    A STOPPED node should be in recovery mode active untill restarted using the continue command.
    
    Adding two new commands "ctdb stop" "ctdb continue"

commit 2ff6ee042080ba1c2bea76bbef3742997d84c9a8
Merge: de0b58e18fcc0f90075fca74077ab62ae8dab5da 823019870c0831258b96654646f71e9dd69317ec
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Jul 8 14:21:36 2009 +1000

    Merge branch 'ronnie_merge'

commit 823019870c0831258b96654646f71e9dd69317ec
Merge: ee7caae3a55a64fb50cd28fa2fd4663c5dd83b4f b67946a6f6b185a7920bf1e560988417c8c4d87d
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Jul 8 14:21:05 2009 +1000

    Merge commit 'origin/master' into ronnie_merge
    
    Conflicts:
    	config/ctdb.init
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit de0b58e18fcc0f90075fca74077ab62ae8dab5da
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Jul 8 13:37:52 2009 +1000

    Test suite: new tests and code factoring.
    
    * 2 new tests for NFS failover.
    
    * Factor repeated code from tests into new functions
      select_test_node_and_ips(), gratarp_sniff_start() and
      gratarp_sniff_wait_show().  Use these new functions in existing and
      new tests.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit b67946a6f6b185a7920bf1e560988417c8c4d87d
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Jul 6 17:52:11 2009 +1000

    Test suite: better debug info when the cluster is unexpectedly unhealthy.
    
    cluster_is_healthy() is now run locally in tests and internally causes
    _cluster_is_healthy() to be run on node 0.  When it detects that the
    cluster is unhealthy and $ctdb_test_restart_scheduled is not true,
    debug information is printed.  This replaces the previous use of
    $CTDB_TEST_CLEANING_UP.
    
    To avoid spurious debug on expected restarts, added scheduled
    restarts to several tests.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 3f7a4afa0fcc5825beb89267973939df8cde4999
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Jul 6 16:40:31 2009 +1000

    Make ctdbd restarts in tests more reliable.
    
    This works around potential race conditions in the init script where
    the restart operation is not necessarily reliable.  It just wraps the
    actual restart in a loop and tries for a successful restart up to 5
    times.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 8d12fe61eb59a4a611dd5950506d14bd4891075d
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Jul 6 16:39:08 2009 +1000

    When testing make the time taken for some operations more obvious.
    
    If wait_until() does not timeout, print the time taken for the command
    to succeed.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit aa9f79e4b3e077b48a8a16903d2236c284617e49
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jul 3 20:55:02 2009 +1000

    New tests for different aspects of failover.
    
    3 separate tests:
    
    * Check that gratuitous ARPs are received and take effect.
    
    * Check that ping still works after failover.
    
    * Check, via SSH, that the hostname changes after failover.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 52e1cd7e9217cfa521850a9a9a9daddcce011f27
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jul 3 20:44:55 2009 +1000

    Updates to TCP tickle tests and supporting functions.
    
    * Removed a race from tpcdump_start().  It seems impossible to tell
      when tcpdump is actually ready to capture packets.  So this function
      now generates some dummy ping packets and waits until it sees them
      in the output file.
    
    * tcpdump_start() sets $tcpdump_filter.  This is the default filter
      for tcpdump_wait() and tcpdump_show(), but other filters may be
      passed to those functions.
    
    * New functions tcptickle_sniff_start() and
      tcptickle_sniff_wait_show() handle capturing TCP tickle packets.
      These are used by complex/31_nfs_tickle.sh and
      complex/32_cifs_tickle.sh.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 7c27c493a6de92544754e42f2a8f227b3d663c73
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jul 3 18:01:29 2009 +1000

    Add an extra ctdb recovery to test function restart_ctdb().
    
    There are still very rare cases where IPs haven't been reallocated
    before the beginning of the next test, so this adds a sleep and an
    extra call to "ctdb recover" to restart_ctdb().
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit da87914ab47fe5786b620587464b58853e98dd7e
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jul 3 17:58:38 2009 +1000

    Fix the run_tests script so that the number of columns is never 0.
    
    Sometimes "stty size" reports 0, for example when running in a shell
    under Emacs.  In this case, we just change it to 80.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 56ece515e047a54f33e8b07726e52ba21a1d67e1
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jul 3 17:40:16 2009 +1000

    Separate test cleanup code in output and clean up ctdb restart code.
    
    * ctdb_restart_when_done() now schedules a restart by setting an
      explicit variable that is respected in ctdb_test_exit(), rather than
      adding a restart to $ctdb_test_exit_hook.  This means that restarts
      are all done in one place.
    
    * ctdb_test_exit() turns off "set -e" to make sure that all cleanup
      happens.
    
    * ctdb_test_exit() now prints a clear message indicating where the
      test ends and the cleanup begins.  This message also includes the
      return code of the test.
    
    * Add debug in cluster_is_healthy to try to capture information about
      unexpected unhealthiness when a test starts.
    
    * Simplify simple/07_ctdb_process_exists.sh so that the exit code is
      generated more obviously.
    
    * Remove redundant calls to ctdb_test_exit at the end of tests, since
      they're done automatically via a trap.  Also remove any preceding
      warnings of restarts or final hints about test success/failure.
    
    * Allow multi-digit debug levels in simple/12_ctdb_getdebug.sh and
      simple/13_ctdb_setdebug.sh.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit bebb21f18e3026cb78a306104e92ee005d1077b2
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jul 7 13:45:19 2009 +1000

    Initscript cleanups.
    
    * Move building of CTDB_OPTIONS to new function build_ctdb_options()
      and have it use a helper function for readability.
    
    * New functions check_persistent_databases() and set_ctdb_variables().
    
    * Remove valgrind-specific stop code, since the general pkill should
      kill ctdbd when running under valgrind.
    
    * Remove some bash-isms (e.g. >& /dev/null) since the script is /bin/sh.
    
    * Make indentation consistent.
    
    * Minor clean-ups.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    
    Conflicts:
    
    	config/ctdb.init

commit 5e3b590e384bacfbebab1dd85e89cd87b63c620e
Merge: 49e7584679c7467a367888c5b14529c8e338f032 5664da36943b4901a807a9594b0f45e859aafbf3
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jul 7 11:19:44 2009 +1000

    Merge root at 10.1.1.27:/shared/ctdb/ctdb-git

commit 5664da36943b4901a807a9594b0f45e859aafbf3
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jul 7 11:40:01 2009 +1000

    send ARPs with an interval of 1.1 seconds during ip takeover.
    
    this is to better handle linux clients which often default to ignore grat arps that arrive within 1 second of eachother.

commit ee7caae3a55a64fb50cd28fa2fd4663c5dd83b4f
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Jul 6 17:52:11 2009 +1000

    Test suite: better debug info when the cluster is unexpectedly unhealthy.
    
    cluster_is_healthy() is now run locally in tests and internally causes
    _cluster_is_healthy() to be run on node 0.  When it detects that the
    cluster is unhealthy and $ctdb_test_restart_scheduled is not true,
    debug information is printed.  This replaces the previous use of
    $CTDB_TEST_CLEANING_UP.
    
    To avoid spurious debug on expected restarts, added scheduled
    restarts to several tests.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 1cac8a0ad429f29d1508158c7f7c42a2f1a22945
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Jul 6 16:40:31 2009 +1000

    Make ctdbd restarts in tests more reliable.
    
    This works around potential race conditions in the init script where
    the restart operation is not necessarily reliable.  It just wraps the
    actual restart in a loop and tries for a successful restart up to 5
    times.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit bdb856ee22816ae1f6b8d15856555f488054f489
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Jul 6 16:39:08 2009 +1000

    When testing make the time taken for some operations more obvious.
    
    If wait_until() does not timeout, print the time taken for the command
    to succeed.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 6e1f60d8d780c1240aaabb78ecc8550d0480cd7e
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon Jul 6 11:49:55 2009 +1000

    Perform an ipreallocate efter each enable/disable.
    
    This will force a wait until the ip addresses have been reallocated after a disable/enable command and will make scripting of enable/disable more predictable.
    
    This will cause the command enable/disable to wait until the ip realocation that normally follows shortly after a enable/disable to finish before the command returns to the prompt.

commit 49e7584679c7467a367888c5b14529c8e338f032
Merge: 6baaf5bec3ba0094c71d83315170acb5dc729711 6e1f60d8d780c1240aaabb78ecc8550d0480cd7e
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon Jul 6 11:28:10 2009 +1000

    Merge root at 10.1.1.27:/shared/ctdb/ctdb-git

commit 92011cc05bbdb517ec6a4573f5cb9f6f21c3059e
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jul 3 20:55:02 2009 +1000

    New tests for different aspects of failover.
    
    3 separate tests:
    
    * Check that gratuitous ARPs are received and take effect.
    
    * Check that ping still works after failover.
    
    * Check, via SSH, that the hostname changes after failover.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 8e2a89935a969340bfead8ed040d74703947cb81
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jul 3 20:44:55 2009 +1000

    Updates to TCP tickle tests and supporting functions.
    
    * Removed a race from tpcdump_start().  It seems impossible to tell
      when tcpdump is actually ready to capture packets.  So this function
      now generates some dummy ping packets and waits until it sees them
      in the output file.
    
    * tcpdump_start() sets $tcpdump_filter.  This is the default filter
      for tcpdump_wait() and tcpdump_show(), but other filters may be
      passed to those functions.
    
    * New functions tcptickle_sniff_start() and
      tcptickle_sniff_wait_show() handle capturing TCP tickle packets.
      These are used by complex/31_nfs_tickle.sh and
      complex/32_cifs_tickle.sh.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit c2bdb77d91761c003e2f0e6918a27c54150f6030
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jul 3 18:01:29 2009 +1000

    Add an extra ctdb recovery to test function restart_ctdb().
    
    There are still very rare cases where IPs haven't been reallocated
    before the beginning of the next test, so this adds a sleep and an
    extra call to "ctdb recover" to restart_ctdb().
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit e309cb3f95efcf6cff7d7c19713d7b161a138383
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jul 3 17:58:38 2009 +1000

    Fix the run_tests script so that the number of columns is never 0.
    
    Sometimes "stty size" reports 0, for example when running in a shell
    under Emacs.  In this case, we just change it to 80.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit b6fa044a1364cbb3008085041453ee4885f7ced1
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jul 3 17:40:16 2009 +1000

    Separate test cleanup code in output and clean up ctdb restart code.
    
    * ctdb_restart_when_done() now schedules a restart by setting an
      explicit variable that is respected in ctdb_test_exit(), rather than
      adding a restart to $ctdb_test_exit_hook.  This means that restarts
      are all done in one place.
    
    * ctdb_test_exit() turns off "set -e" to make sure that all cleanup
      happens.
    
    * ctdb_test_exit() now prints a clear message indicating where the
      test ends and the cleanup begins.  This message also includes the
      return code of the test.
    
    * Add debug in cluster_is_healthy to try to capture information about
      unexpected unhealthiness when a test starts.
    
    * Simplify simple/07_ctdb_process_exists.sh so that the exit code is
      generated more obviously.
    
    * Remove redundant calls to ctdb_test_exit at the end of tests, since
      they're done automatically via a trap.  Also remove any preceding
      warnings of restarts or final hints about test success/failure.
    
    * Allow multi-digit debug levels in simple/12_ctdb_getdebug.sh and
      simple/13_ctdb_setdebug.sh.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit abad7b97fe0c066b33f6e75d0953bbed892a3216
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jul 2 13:00:26 2009 +1000

    add a new command "ctdb ipreallocate", this command will force the recovery master to perform a full ip reallocation process.
    the ctdb command will block until the ip reallocation has comleted

commit c69f5fe1db5b6ed4a009f0c10ab82c6f32b2e0bc
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jul 2 12:58:49 2009 +1000

    When we dispatch a message to a handler, pass the data as a real talloc object so that the handler can talloc_steal() the message content.

commit 6baaf5bec3ba0094c71d83315170acb5dc729711
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jul 2 12:45:14 2009 +1000

    document the ipreallocate command

commit b99afc98bedf1a51d315e311f27c3fc55fd940e7
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Jul 1 09:33:08 2009 +1000

    update enable/disable

commit 964530d70ba2ca949380d30a0e3d622963a6206c
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Jul 1 09:23:52 2009 +1000

    update the sysconfig to show setting the debuglevel using a string literal instead of a numeric value

commit 421c0566094b91221fab2ea68f2c9bd35d5dfbcb
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Jul 1 09:21:07 2009 +1000

    show the valid debuglevels that can be used in the error text when an invalid level was specified to ctdb setdebug

commit daec49cea1790bcc64599959faf2159dec2c5929
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Jul 1 09:17:13 2009 +1000

    update the handling of debug levels so that we always can use a literal instead of a numeric value.
    
    validate the input values used and refuse setting the debug level to an unknown value

commit f4b0825d9da34578b9f90dc9bd7f99fcc2519ddf
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Jul 1 08:26:00 2009 +1000

    when no debuglevel is specified, make 'ctdb setdebug' show the available options

commit 5cdc04669db8c2ddbbff5af82307a16e8d807b83
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 30 12:17:05 2009 +1000

    dont try sending a keepalive if the transport is down

commit cb8dd896914d4e44ad7b8bb000176a7c78f394ae
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 30 12:16:13 2009 +1000

    Dont even try allocating and sending a CALL packet if the transport is down

commit c17dafc79bec25bbb796478c33f503503d382a20
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 30 12:14:58 2009 +1000

    failing a dmaster send due to the transport being down is fatal

commit 75dea671f68ac6649095357c36b3697a927721e9
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 30 12:13:15 2009 +1000

    if we fail a dmaster migration due to the transport being down, then that is a fatal condition.

commit 65b94d280731df3245b26d69f39acfaf5bccf0d8
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 30 12:10:27 2009 +1000

    dont try to send error packets if the transport is down

commit 9a2c4c3ed09ac9ea781d06999d11e5c3b5b4a97a
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 30 12:09:28 2009 +1000

    dont even try to send a message from the main daemon if the transport is down

commit 945f04f06a425fd3940a2e4b832c63223a3f26b3
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 30 12:03:12 2009 +1000

    Dont try to allocate and send packets if the transport is down

commit a73f316cb9cec877dc0bc3f7baa21be1b1454273
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 30 11:55:42 2009 +1000

    dont even try to allocate a packet if the transport is down since it will fail

commit 841a2d9635341baa1a6dd9ec558fc7cadb4e3af4
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 30 09:09:06 2009 +1000

    New version 1.0.86

commit 3db8b1d7425ed5bd41e58b43c55fdac517d71baf
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jun 25 14:45:57 2009 +1000

    update the man pages with the "getreclock" and "setreclock" commands.

commit 5334e40978350b6b597ee020bac52e37c8f9a8ba
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jun 25 14:45:17 2009 +1000

    Do not allow the "VerifyRecoveryLock" tunable to be changed if there is no reclock file

commit d973cb6e83b2f7cc37bd39c1219dcfbd4911a8ee
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jun 25 14:34:21 2009 +1000

    disable VerifyRecoveryLock when the user modifies the filename

commit 36cc2e586f03fa497ee9b06f3e6afc80219c4aaa
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jun 25 14:25:18 2009 +1000

    add a control to set the reclock file

commit 31acc11a6389d4dd9f7b71b7cfa2f2450076f1f7
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jun 25 12:55:43 2009 +1000

    update the recovery daemon to read the recovery lock file off the main daemon and handle when the file is changed/enabled/disabled

commit 6755f89f81aba63bfe00ee16d44a0201cbfa90ca
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jun 25 12:26:14 2009 +1000

    return NULL and not a "" when there is no reclock file returned from the server

commit ed6a4cbcdcbb4e0df83bec8be67c30288bf9bd41
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jun 25 12:17:19 2009 +1000

    add a control to read the current reclock file from a node

commit 33895d217ee096b356f02b5292ba27a840c4f559
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jun 25 11:59:21 2009 +1000

    Document that you can run ctdb without a reclock file in the sysconfig file

commit 07855ff5eba71e7d607d52e234a42553d9b93605
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jun 25 11:50:45 2009 +1000

    Allow setting the recovery lock file as "", which means that we do not use a file and that we implicitely also disable the recovery lock checking.
    
    Update the init script to allow starting without a reclock file.

commit a25f4888689a0725971606163d87c39a41669292
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jun 25 11:41:18 2009 +1000

    Dont access the reclock file at all if VerifyRecoveryLock is zero and also
    make sure the reclock file is closed if the variable is cleared at runtime

commit 553a244fc8d7814634330bf4829ac127d63886be
Merge: 937b029fd47d6af162c27d9dce6da0e22b36b79a a4b682e3b2657abeca3e387d96949f83bdbd7b2f
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 23 11:21:37 2009 +1000

    Merge root at 10.1.1.27:/shared/ctdb/ctdb-git

commit a4b682e3b2657abeca3e387d96949f83bdbd7b2f
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 23 11:30:25 2009 +1000

    new version 1.0.85

commit 9bc8e7eec7ffa8969f0f170a77b13cd0033790f1
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 23 11:29:26 2009 +1000

    rename 99.routing to 11.routing so that it executed before the service scripts

commit 937b029fd47d6af162c27d9dce6da0e22b36b79a
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 23 11:23:54 2009 +1000

    new version 1.0.85

commit 16ec9ca56a9f5b88d7a5ed4f89a28a53f5c9c081
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 23 11:01:04 2009 +1000

    rename 99.routing to 11.routing so the eventscript is processed before
    NFS and LVS

commit 867f57d166395c92949e480ca725249b0ca8950b
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Jun 2 15:54:04 2009 +1000

    Fix minor problem in previous initscript commit.
    
    The valgrind start case should not use daemon, since this is specific
    to Red Hat.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 070305adfe636c2580776e6bf24bb8be06622b86
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Jun 2 10:01:50 2009 +1000

    Initscript fixes, mostly for "stop" action.
    
    Use a local variable $ctdbd so that we always run ctdbd from the the
    same place and so that we know what to kill.  This variable respects
    the $CTDBD environment variable, which may be used to specify an
    alternative location for the daemon.
    
    In the important cases use "pkill -0 -f" to check if ctdbd is
    running.  Also, remove the special case for killing ctdbd when running
    under valgrind.  The regular case will handle this just fine.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit fc69b6a66282d5be6edeb286bf72aeafb252e6dd
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jun 19 11:40:09 2009 +1000

    Clean up handling the of CTDB restarts in testcases.
    
    Glitches during restarts of the CTDB cluster have been causing some
    tests to fail.  This is because restarts are initiated in the body of
    many tests.  This adds a simple function ctdb_restart_when_done, which
    schedules a restart using an existing hook in the test exit code.
    This function is now used in tests that need to restart CTDB.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 5d320099025b6835eda3a1e431708f7e0a6b0ba6
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jun 19 12:12:39 2009 +1000

    Fix minor onnode bugs relating to local daemons.
    
    Commit a0f5148ac749758e2dfbd6099e829c5bf1d900e6 caused a subtle
    regression.  Due to the subtlety, this description is much longer than
    the 1 line patch that fixes it!  The regression, where a process that
    invokes onnode is unexpectedly blocked, is only apparent if the
    following conditions are met:
    
    1. $CTDB_NODES_SOCKETS is set;
    2. The command passed to onnode attempts to background a process; and
    3. onnode is run in certain types of subshell (e.g. foo=$(onnode ...)).
    
    In particular, when testing against local daemons (i.e. condition (1)
    is met), tests/simple/07_ctdb_process_exists.sh would fail (because it
    does both (2), (3)).
    
    The problem is caused by the use of file descriptor 3 in the code that
    allows separate filtering of stdout and stderr.  A backgrounded
    process will have this descriptor open and the $(...) construct
    appears to wait for all file descriptors to be closed.  This only
    happens with local daemons because SSH is replaced by a shell and file
    descriptor 3 leaks into that shell.  It does not occur when SSH is
    used because the file descriptor does not leak into the remote shell
    where the process is backgrounded.
    
    The fix is simply to redirect file descriptor 3 to /dev/null in the
    fakessh function, which is used when $CTDB_NODES_SOCKETS is set.
    
    Also fixed is another minor bug when the -o option and
    $CTDB_NODES_SOCKETS are used in combination.  The code uses the node
    name as a suffix for the output filename(s).  Usually this is an IP
    address.  However, when $CTDB_NODES_SOCKETS is in use the node name is
    the socket name, which might be a path several directories deep.
    Each output file is created via a simple redirection and this would
    fail if unexpected directories appear in the filename.  3 possible
    fixes were considered:
    
    1. Replace all '/'s in the node name by '_'s.  Nice and simple.
    2. Use the basename of the node name.  However, sockets may be in
       different directories but have the same basename.
    3. Create all required directories before redirecting.  This is a
       little more complex and probably doesn't meet the user's
       expectations.
    
    Option (1) is implemented here.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit fdf50f3e774e3980af81c0b6f4ff81d085f4f697
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Jun 19 15:55:13 2009 +1000

    dont log an error if waitpid returns -1 and errno is ECHILD

commit fc8a364eb095ec11ca01246a583bf1dc53510141
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Jun 19 14:58:06 2009 +1000

    dont leak file descriptors when set recmdoe timesout

commit 268c3e4b269a92741a02280c84384178e73de10e
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Jun 19 14:54:22 2009 +1000

    dont leak file descriptors

commit d177b08f1dc79534491f27726b05405d47e12e20
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Jun 19 14:44:26 2009 +1000

    in the recovery daemon, check that the recovery master can access the recovery lock file and verify it is not stale from a child process.
    This allows us to timeout the operation if the underlying filesystem has become temporarily unresponsive without causing a new recovery.

commit 6d1e4321b63973c2e53c63d386e8cc0bd9605cae
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Jun 19 13:09:11 2009 +1000

    reduce the timeout we wait for the reclock child process to finish to 5 seconds
    before we log an error and abort

commit c97d56d93d9c1007a4e85affb19ed0c2d0e11b6d
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jun 19 12:12:39 2009 +1000

    Fix minor onnode bugs relating to local daemons.
    
    Commit a0f5148ac749758e2dfbd6099e829c5bf1d900e6 caused a subtle
    regression.  Due to the subtlety, this description is much longer than
    the 1 line patch that fixes it!  The regression, where a process that
    invokes onnode is unexpectedly blocked, is only apparent if the
    following conditions are met:
    
    1. $CTDB_NODES_SOCKETS is set;
    2. The command passed to onnode attempts to background a process; and
    3. onnode is run in certain types of subshell (e.g. foo=$(onnode ...)).
    
    In particular, when testing against local daemons (i.e. condition (1)
    is met), tests/simple/07_ctdb_process_exists.sh would fail (because it
    does both (2), (3)).
    
    The problem is caused by the use of file descriptor 3 in the code that
    allows separate filtering of stdout and stderr.  A backgrounded
    process will have this descriptor open and the $(...) construct
    appears to wait for all file descriptors to be closed.  This only
    happens with local daemons because SSH is replaced by a shell and file
    descriptor 3 leaks into that shell.  It does not occur when SSH is
    used because the file descriptor does not leak into the remote shell
    where the process is backgrounded.
    
    The fix is simply to redirect file descriptor 3 to /dev/null in the
    fakessh function, which is used when $CTDB_NODES_SOCKETS is set.
    
    Also fixed is another minor bug when the -o option and
    $CTDB_NODES_SOCKETS are used in combination.  The code uses the node
    name as a suffix for the output filename(s).  Usually this is an IP
    address.  However, when $CTDB_NODES_SOCKETS is in use the node name is
    the socket name, which might be a path several directories deep.
    Each output file is created via a simple redirection and this would
    fail if unexpected directories appear in the filename.  3 possible
    fixes were considered:
    
    1. Replace all '/'s in the node name by '_'s.  Nice and simple.
    2. Use the basename of the node name.  However, sockets may be in
       different directories but have the same basename.
    3. Create all required directories before redirecting.  This is a
       little more complex and probably doesn't meet the user's
       expectations.
    
    Option (1) is implemented here.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit d440e83bb4f0c19c085915d0f0e87cc0dabbc569
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jun 19 11:40:09 2009 +1000

    Clean up handling the of CTDB restarts in testcases.
    
    Glitches during restarts of the CTDB cluster have been causing some
    tests to fail.  This is because restarts are initiated in the body of
    many tests.  This adds a simple function ctdb_restart_when_done, which
    schedules a restart using an existing hook in the test exit code.
    This function is now used in tests that need to restart CTDB.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit facddcacb4a961cddb117818fa38a3e97770b2fa
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jun 18 09:20:18 2009 +1000

    increase the timeout before we shutdown when ther ecovery daemon is hung

commit 1205673499618f90f413fad9e96a88733b5ce359
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jun 18 09:11:46 2009 +1000

    rename 99.routing to 11.routing
    so it is executed before any of the service scripts

commit 5d188af387a2a1d68d66f47edb7a9ca546ed357c
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Jun 16 12:47:59 2009 +1000

    New tests for NFS and CIFS tickles.
    
    New tests/complex/ subdirectory contains 2 new tests to ensure that
    NFS and CIFS connections are tracked by CTDB and that tickle resets
    are sent when a node is disabled.
    
    Changes to ctdb_test_functions.bash to support these tests.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit be3e23c9fcb9c716e492af102830a4f6ad8bda7b
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Jun 16 12:42:29 2009 +1000

    Increase threshold in 51_ctdb_bench from 2% to 5%.
    
    The threshold for the difference in the number messages sent in either
    direction around the ring of nodes was set to 2%.  Something
    environmental is causing this different to sometimes be as high as 3%.
    We're confident it isn't a CTDB issue so we're increasing the
    threshold to 5%.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 8ddd5165f573fc6beaae589b86a6afa4bc17f32a
Merge: 10531b50e2d306a5e62b8d488a1acc9e75b0ad4b 46e8c3737e6ff54fc80de8e962e922924c27bc35
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Jun 16 12:56:55 2009 +1000

    Merge commit 'origin/master'

commit 10531b50e2d306a5e62b8d488a1acc9e75b0ad4b
Merge: d5ca4ab325fce1f81361a4d79810cb543979ce57 31cc46eb157ca1301312f14879e4fb4da7d81088
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Jun 16 12:52:10 2009 +1000

    Merge branch 'new_tests'

commit 31cc46eb157ca1301312f14879e4fb4da7d81088
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Jun 16 12:47:59 2009 +1000

    New tests for NFS and CIFS tickles.
    
    New tests/complex/ subdirectory contains 2 new tests to ensure that
    NFS and CIFS connections are tracked by CTDB and that tickle resets
    are sent when a node is disabled.
    
    Changes to ctdb_test_functions.bash to support these tests.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit d5ca4ab325fce1f81361a4d79810cb543979ce57
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Jun 16 12:42:29 2009 +1000

    Increase threshold in 51_ctdb_bench from 2% to 5%.
    
    The threshold for the difference in the number messages sent in either
    direction around the ring of nodes was set to 2%.  Something
    environmental is causing this different to sometimes be as high as 3%.
    We're confident it isn't a CTDB issue so we're increasing the
    threshold to 5%.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit d6e6909ac629212b3028e13b958e1a17c64bee8c
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Jun 10 16:15:09 2009 +1000

    Make 51_ctdb_bench.sh more tolerant.
    
    Limit the allowable difference in message counts in either direction
    around the ring to 5% (up from 2%).  There is something environmental
    making this blow out to 3% very occasionally when there's no obvious
    problem with ctdb.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 46e8c3737e6ff54fc80de8e962e922924c27bc35
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed Jun 10 10:28:47 2009 +1000

    When we ban a node, only drop the IPs on the node being banned, not on every node

commit 2a52336ec021dfe8d56ba72726feb7b2dbd41f68
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 9 10:58:46 2009 +1000

    remove unused variable

commit d350c631850377c09968d2978ef57d2bd0d50116
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 9 10:57:46 2009 +1000

    dont require particular values for NoIPFailback and DeterministicIPs when
    using ctdb moveip

commit 0ca28d7336463ecd2ff65620d8dbcbb496991531
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 9 10:56:50 2009 +1000

    improve ctdb moveip so that it does not always trigger a recovery.

commit 6318ea13464e2fe630084c40802d8e697c2cb999
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Jun 5 17:57:14 2009 +1000

    try avoiding to cause a recovery when deleting a public ip from a node

commit 4d5d22e64270cfb31be6acd71f4f97ec43df5b2c
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri Jun 5 17:00:47 2009 +1000

    when adding an ip, try manually adding and takingover the ip instead of triggering a full recovery to do the same thing

commit 7eb137aa4c24c69bd93b98fb3c7108e5f3288ebd
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jun 4 13:25:58 2009 +1000

    dont list DELETED nodes in the ctdb listnodes output

commit 4a55cacc4f5526abd2124460b669e633deeda408
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jun 4 13:21:25 2009 +1000

    make it possible to run 'ctdb listnodes' also if the daemon is not running.
    in this case, read the nodes file directly instead of asking the local daemon for the list.
    
    add an option -Y to provide machinereadable output to listnodes

commit 06b33a826e71e1dd2f9e02ad614be55535d42045
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu Jun 4 09:41:05 2009 +1000

    From William Jojo <w.jojo[AT]hvcc.edu>
    
    AIX dont have getopt.h by default.
    Dont try including this file when building on AIX

commit 92be87b5bfed7882b48f4034c82dfdb031f3afdc
Merge: 135b72828fc76856fa8f6d7f9c820120de05596b 951dbcb29fd53cf51a08958efe185db4954d24f3
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Jun 2 16:40:01 2009 +1000

    Merge branch 'init_rewrite'
    
    Conflicts:
    	config/ctdb.init
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 135b72828fc76856fa8f6d7f9c820120de05596b
Merge: 1ea6af7007fe3b5a48d48440a0924c71d7a6000a f236fa289f3115b1f4eb108eb668392dc520f61a
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Jun 2 16:29:25 2009 +1000

    Merge commit 'origin/master'

commit 951dbcb29fd53cf51a08958efe185db4954d24f3
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Jun 2 16:07:08 2009 +1000

    Initscript cleanups.
    
    * Move building of CTDB_OPTIONS to new function build_ctdb_options()
      and have it use a helper function for readability.
    
    * New functions check_persistent_databases() and set_ctdb_variables().
    
    * Remove valgrind-specific stop code, since the general pkill should
      kill ctdbd when running under valgrind.
    
    * Remove some bash-isms (e.g. >& /dev/null) since the script is /bin/sh.
    
    * Make indentation consistent.
    
    * Minor clean-ups.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 1ea6af7007fe3b5a48d48440a0924c71d7a6000a
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Jun 2 15:54:04 2009 +1000

    Fix minor problem in previous initscript commit.
    
    The valgrind start case should not use daemon, since this is specific
    to Red Hat.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit af1b3de978089a9819716b33c13c941b5558cb17
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 2 15:05:41 2009 +1000

    new version 1.0.84

commit 03d304e72a5839dc8d8d2e2312b346c21dca5774
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 2 15:03:44 2009 +1000

    teach ONNODE about deleted nodes

commit f236fa289f3115b1f4eb108eb668392dc520f61a
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 2 13:13:03 2009 +1000

    new version 1.0.83

commit e3d9722e332f132bd47dc41621d4e1d2b5c9c62a
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue Jun 2 12:43:11 2009 +1000

    idocument how to remove a node from an existing cluster using 'ctdb
    reloadnodes'

commit ee5d49324155e3e51371f6f8e5ed9eef4179f08d
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Jun 2 10:01:50 2009 +1000

    Initscript fixes, mostly for "stop" action.
    
    Use a local variable $ctdbd so that we always run ctdbd from the the
    same place and so that we know what to kill.  This variable respects
    the $CTDBD environment variable, which may be used to specify an
    alternative location for the daemon.
    
    In the important cases use "pkill -0 -f" to check if ctdbd is
    running.  Also, remove the special case for killing ctdbd when running
    under valgrind.  The regular case will handle this just fine.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 91fdfee371d6be83af60cd38ac34afb295b9987a
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon Jun 1 15:43:30 2009 +1000

    hide all DELETED nodes from the ctdb command output

commit c265df3c7950aab51b8b6ef17040229b97345c35
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon Jun 1 15:29:36 2009 +1000

    lower the loglevel when we long that we skip an evenscript because it is not executable

commit 1b7c88ae7643f9bcc52b1d33095f97de88fc2316
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon Jun 1 14:56:19 2009 +1000

    dont try to queue packets for sending to (recently) deleted nodes since these nodes do not have a queue.

commit 0cd66c744cd9533ce8d4c4374bcee3bf49b66dae
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon Jun 1 14:44:15 2009 +1000

    when building the initial vnnmap, make sure to skip any deleted nodes

commit df20cd9b05ad9ca72e32ccc42354eafc12b68c04
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon Jun 1 14:39:34 2009 +1000

    use num_nodes and the nodes array instead of walking the vnnmap
    when counting the number of active nodes

commit 6a5e4fd7fa391206b463bb4e976502f3ac5bd343
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon Jun 1 14:18:34 2009 +1000

    add a new node state : DELETED.
    
    This is used to mark nodes as being DELETED internally in ctdb
    so that nodes are not renumbered if / when they are removed from the nodes file.
    
    This is used to be able to do "ctdb reloadnodes" at runtime without
    causing nodes to be renumbered.
    To do this, instead of deleting a node from the nodes file, just comment it out like
    
       1.0.0.1
       #1.0.0.2
       1.0.0.3
    
    After removing 1.0.0.2 from the cluster,  the remaining nodes retain their
    pnn's from prior to the deletion, namely 0 and 2
    
    Any line in the nodes file that is commented out represents a DELETED pnn

commit b18356764cd49d934eab901e596bb75c6e3ecdf8
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri May 29 18:16:13 2009 +1000

    dont remove the socket when the dameon stops. This can race if the
    service is immediately restarted

commit 3e49e41c21eb8c53084aa8cc7fd3557bdd8eb7b6
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon May 25 17:04:42 2009 +1000

    New attempt at TDB transaction nesting allow/disallow.
    
    Make the default be that transaction is not allowed and any attempt to create a nested transaction will fail with TDB_ERR_NESTING.
    
    If an application can cope with transaction nesting and the implicit
    semantics of tdb_transaction_commit(), it can enable transaction nesting
    by using the TDB_ALLOW_NESTING flag.

commit 87292029cb444ffab130ff7dae47a629c2d15787
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon May 25 16:55:27 2009 +1000

    Revert "we only need to have transaction nesting disabled when we start the new transaction for the recovery"
    
    This reverts commit bf8dae63d10498e6b6179bbacdd72f1ff0fc60be.

commit 9762a3408f10409b629637d237ec513a825a6059
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon May 25 16:55:02 2009 +1000

    Revert "set the TDB_NO_NESTING flag for the tdb before we start a transaction from within recovery"
    
    This reverts commit 1b2029dbb055ff07367ebc1f307f5241320227b2.

commit f1c6f7dd47bb1081781c0a0d567a92bbbc0aa5d5
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon May 25 16:54:25 2009 +1000

    Revert "add TDB_NO_NESTING. When this flag is set tdb will not allow any nested transactions and tdb_transaction_start() will implicitely _cancel() any pending transactions before starting any new ones."
    
    This reverts commit 459e4ee135bd1cd24c15e5325906eb4ecfd550ec.

commit dca41ec04788922ce5f4c52d346872b3e35f8cbb
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon May 25 12:33:52 2009 +1000

    remove the obsolete ipmux component.
    this is replaced by LVS since a long time

commit b0c32a96f4176747ca772be664888f5c3c483b98
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon May 25 12:15:13 2009 +1000

    fix the git path to the repository

commit e57c47b75fa501223c57040eac73392b42ae549d
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon May 25 12:02:36 2009 +1000

    install the 31.clamd script as 644 by default

commit bfc6ac07f8b7b326e75d8c9bf73051a440ee0011
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon May 25 11:46:47 2009 +1000

    add 31.clamd to the install and the rpm

commit bb4ef6c4d2bc3578bdf4432517e98f85ec94e3b6
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon May 25 12:10:29 2009 +1000

    From Flavio Carmo Junior <carmo.flavio at gmail.com>
    
    Add an eventscript to manage ClamAV

commit 5fc14f98902ae98abed35eaab3b3495226dcac38
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon May 25 12:08:50 2009 +1000

    From Flavio Carmo Junior <carmo.flavio at gmail.com>
    (with modifications)
    
    Add a webpage about CLAMAV support in CTDB

commit 39539a2d1784f04245ed7abc84c4f39e1601afa4
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon May 25 11:44:27 2009 +1000

    document the new support for ClamAV

commit ba44aae7307b4fa56f7b2da2cd9d4a7ccd0a135e
Author: Sumit Bose <sbose at redhat.com>
Date:   Thu May 21 13:43:41 2009 +0200

    fix re pattern to accept the new recovery lock times in the statistics output

commit 2c4c20d7803f4449f8d463314c40d4734ec80e2f
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu May 21 14:10:45 2009 +1000

    change the socket we use for sending grautious ARPs from AF_INET/SOCK_PACKET to AF_PACKET/SOCK_RAW

commit d623ea7c04daa6349b42d50862843c9f86115488
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu May 21 11:49:16 2009 +1000

    Whitespace changes and using the CTDB_NO_MEMORY() macro changes to
    the previous patch.

commit 3aee5ee1deb4a19be3bd3a4ce3abbe09de763344
Author: Sumit Bose <sbose at redhat.com>
Date:   Wed May 20 12:08:13 2009 +0200

    add missing checks on so far ignored return values
    
    Most of these were found during a review by Jim Meyering <meyering at redhat.com>

commit 0e84ea23d1d998d4d4ac7d8a858b3d8294f056cb
Author: Sumit Bose <sbose at redhat.com>
Date:   Wed May 20 12:02:27 2009 +0200

    structure member node_list_file is not used anywhere

commit 4f86c991812c2d0bddbe3de9a9906cf5df118cd4
Author: Sumit Bose <sbose at redhat.com>
Date:   Wed May 20 11:47:34 2009 +0200

    structure member logfile is not used anywhere

commit fa5afee8e9a8fba6017bc58f87bc040de7206e63
Author: Sumit Bose <sbose at redhat.com>
Date:   Wed May 20 09:17:01 2009 +0200

    fix a configure warning while checking for netfilter.h

commit 1d833163b57853b84f098dffdb3c5f50164fcc73
Author: Sumit Bose <sbose at redhat.com>
Date:   Wed May 20 08:59:00 2009 +0200

    added a missing dependency

commit 92b5580c38c23b99c1692708540983b0c0fcd6cf
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue May 19 08:55:42 2009 +1000

    Change the loglevel of "registered tcp client for ..." to INFO
    instead of ERR

commit 025a836ab3be3c078fccd8c10b10dfffbfdd94d0
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue May 19 08:47:19 2009 +1000

    From : Flavio Carmo Junior <carmo.flavio at gmail.com>
    
    Add a helper function that checks whether a unix domain socket exists
    and there is a daemon LISTENING to it  similar to the existing function
    to check for a daemon LISTENING to a tcp/ip socket.

commit 177295ba400fcaf47f026653f27a42a8ff798d36
Author: Volker Lendecke <vl at samba.org>
Date:   Fri May 15 22:08:21 2009 +0200

    Fix http://ctdb.samba.org/download.html

commit afdbf3c0df02decd823615134294abf2c8a8a5f3
Author: Christian Ambach <christian.ambach at de.ibm.com>
Date:   Wed May 6 19:01:58 2009 +0200

    Remove error messages about a non-existing /var/log/log.ctdb when running ctdb with logging to syslog

commit 722171fc94a36ffe9e0a5c64502b916fde0a13a4
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu May 14 18:25:00 2009 +1000

    add additional log info to track if/why we cant switch to client mode.

commit 042377ed803bb8f7ca9d6ea1a387427b7b8ba45a
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu May 14 10:33:25 2009 +1000

    Track how long it takes to take out the recovery lock from both the main dameon and also from the recovery daemon.
    Log this in "ctdb statistics".
    
    Also add a varaible "RecLockLatencyMs" that will log an error everytime it takes longer than this to access the reclock file.

commit 82ee458329968001bb03b2aec42e65f532f007b3
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu May 14 08:55:40 2009 +1000

    new version 1.0.82

commit fcd6226a6c00cf657532aa76804bfe029df21ba6
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu May 14 08:55:05 2009 +1000

    use scope host when adding the interface to loopback so we dont respond to ARPs for this ip

commit b7ed7fd4a5fbd344d41caa1afa100b1f24506173
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Thu May 14 08:12:48 2009 +1000

    change the prefix NATGW_ to CTDB_NATGW_

commit 0c88fa41bc3c629052bc137ed30c473ed10522fd
Author: Michael Adam <obnox at samba.org>
Date:   Tue May 12 07:56:23 2009 +0200

    ping pong: fix logic for mmap reads vs. preads
    
    Michael

commit 13270a011016bf20bbf721f6d083b2f113fdbc79
Author: Michael Adam <obnox at samba.org>
Date:   Tue May 12 22:59:35 2009 +0200

    maketarball.sh: add GPL license header
    
    Michael

commit 7498e176817719eadd91201bbd0d9ceb91eefdae
Author: Michael Adam <obnox at samba.org>
Date:   Tue May 12 22:59:08 2009 +0200

    makerpms.sh: add GPL license header
    
    Michael

commit b321dfd1d23492169ac25ed901d49d7c69ad5340
Author: Michael Adam <obnox at samba.org>
Date:   Thu Mar 26 19:03:03 2009 +0100

    Remove generated binary files.
    
    Noted by Mathieu Parent <math.parent at gmail.com>
    
    Michael

commit c967b234f59e5998bc8f2250062f4b0d1f39d820
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue May 12 18:21:26 2009 +1000

    remove NATGW_PRIVATE_IFACE from the documentation since we do not need
    it any more.

commit 2bd796b8a098074502fe20e3ab69098b2109c133
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue May 12 18:42:13 2009 +1000

    assign the natgw address to loopback and not the private network so that natgw will still work even when public and private networks are one and the same

commit 5b0067a4e335cbbf6e606646e612d4bfcfdb7441
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue May 12 18:39:34 2009 +1000

    add extra debug statements to the log to make it easier to see when a recovery dameon has hung due to the underlying filesystem hanging.

commit 4467b5f88d749d455854512f60a5d313cafa828b
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue May 12 18:32:41 2009 +1000

    check that a node is banned before trying to unban it.

commit 723413f246399b25166462d2018237920515655f
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Apr 3 12:54:26 2009 +1100

    In 51_ctdb_bench.sh now allows a 2% difference between positive and
    negative.  ctdb_bench.c checks to ensure the timer has advanced from 0
    before dividing.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 3c67e164eb92591f8763883430490805c1dfa9ed
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Apr 21 16:50:37 2009 +1000

    Avoid floating point divide by 0 in ctdb_fetch.c's bench_fetch().
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit ea2ca769e1d1068fbbad843750b19acfd87360e0
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri May 1 17:40:45 2009 +1000

    Bug fixes for tests: simple/12_ctdb_getdebug.sh and scripts/test_wrap.
    
    simple/12_ctdb_getdebug.sh now recognises output with multi-digit node
    numbers.
    
    Sharing the ctdb directory via NFS and testing on a real cluster by
    setting CTDB_TEST_REAL_CLUSTER didn't work by default.  The fix is to
    hack scripts/test_wrap so that it tries to find a valid bin directory
    next to the directory containing it is in.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 1c31fea7432b870169fb839c1fbba5a33dec8e8a
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Tue May 12 08:59:49 2009 +1000

    From: Sumit Bose <sbose at redhat.com>
    
     fix handling of AC_INIT

commit e781ff61e17d733349021bb036514f823c7cbfbb
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon May 11 14:43:17 2009 +1000

    Fix lvsmaster and natgwlist nodespecs.
    
    They both need to use a -Y option to ctdb and for natgwlist we only
    want the 1st line.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit cdf092d69a710310d82d1d67baa0ffb19f676927
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon May 11 14:14:11 2009 +1000

    Updated onnode docs to reflect recent changes.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 29559f5dd099bec210e98909c9b2e048461b7c81
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon May 11 13:39:31 2009 +1000

    New lvs/lvsmaster and natgw/natgwlist nodespecs for onnode.
    
    Some code re-factoring to implement this and to make it easy to
    implement new ones.  New simpler implementation of echo_nth() no
    longer uses deleted get_nth() function.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit a0f5148ac749758e2dfbd6099e829c5bf1d900e6
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed May 6 13:17:34 2009 +1000

    New option "-o <prefix>" saves stdout from each node to file <prefix>.<ip>.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 5f3d2e29a446972ac244e20a08e48f4c2f4ffef4
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue May 5 16:02:30 2009 +1000

    Use ctdb_fetch_lock rather than ctdb_call.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit 2d3fbbbb63f443686f9fec42c0bc2058d115806e
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon May 11 14:50:28 2009 +1000

    41.httpd event script workaround for RHEL5-ism.
    
    RHEL5 can SIGKILL httpd when stopping it, causing it to leak
    semaphores.  This means that eventually a node runs out of semaphores
    and httpd can't be started.  So, before we attempt to start httpd we
    clean up any semaphores owned by apache.  We also try to restart httpd
    in the monitor event if httpd has gone away.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>

commit bbae698656d5da9a4a5b0fbfc3003844f246d54b
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon May 11 14:44:59 2009 +1000

    Add a -Y machinereadable flag to "lvsmaster"

commit ce6afbdef36e3c386b75709f73ef55efe0bd1987
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Mon May 11 13:56:28 2009 +1000

    in the "lvsmaster" command, return -1 if there is no lvsmaster

commit a8019f20cd42a1965410fef5bac2c5b73657b38e
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Fri May 8 17:29:57 2009 +1000

     new version 1.0.81

commit f7f64f92e26a0757af210d33288162eefcd07d79
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed May 6 20:32:39 2009 +1000

    From: Sumit Bose <sbose at redhat.com>
    
    fix handling of AC_INIT and read version from ctdb.spec

commit a87ef6a9206820d5110a7117240f743af010ff19
Author: Michael Adam <obnox at samba.org>
Date:   Tue May 5 13:16:38 2009 +0200

    ping_pong: add GPL comment header with Tridge's copyright
    
    Michael

commit 96c79bddf7895e57ccf90f0d250bd08b7c4daf40
Author: Michael Adam <obnox at samba.org>
Date:   Thu Apr 30 00:35:55 2009 +0200

    ping_pong: get pread/pwrite prototypes from unistd.h
    
    by defining _XOPEN_SOURCE to be 500 before including headers
    
    Michael

commit fce851621fe2099c9692acfbfaade24c3d69727a
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 29 18:03:03 2009 +0200

    ping_pong: reduce a couple of prototype warnings
    
    Michael

commit 300e84f7023e9194b313e96db943e4050bd64e68
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 29 17:58:17 2009 +0200

    packaging: also package ping_pong
    
    Michael

commit 200de8f299c8fa44d6dc696532f1a947132e7ec4
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 29 17:57:43 2009 +0200

    build: also build and install ping_pong
    
    Michael

commit fe59ecb697fb4686ad8ea2fe4ec1cc7b4629e74f
Author: Michael Adam <obnox at samba.org>
Date:   Wed Apr 29 17:50:38 2009 +0200

    add tridge's ping_pong.c to the utils folder
    
    Michael

commit 8a86f65826b58c2ee3f07f221a4fc82193beec81
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date:   Wed May 6 10:29:07 2009 +1000

    From Sumit Bose <sbose at redhat.com>
    
    add more 64bit plattforms to configure.ac and preserve cli settings

commit 48c011188c624f10c9a754d4ead27db558088fd4
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue May 5 16:06:58 2009 +1000

    added link to michaels sambaxp papers

commit 68da42c4ee92fcdfe65baf04c1a2d6446583858b
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue May 5 16:49:05 2009 +1000

    allow pages in subdirs

commit 9ce9a500543de4f0aef5e8c28cda9bbc3c9d1b77
Author: Andrew Tridgell <tridge at samba.org>
Date:   Tue May 5 16:52:24 2009 +1000

    more subdir html support

commit a152fdc79e3360049aee66c3e628237a91df181f
Author: Andrew Tridgell <tridge at samba.org>
Date:   Wed May 6 08:18:21 2009 +1000

    use less intrusive smbstatus call in periodic connections cleanup

commit 919b29850671b59bcf748aec25658ea09d8b4f1c
Author: root <root at rcn1.VSOFS1.COM>
Date:   Tue May 5 16:33:21 2009 +1000

    change the talloc hierarchy for the main transaction_start context and the individual transaction_all handles

commit f2fb2df4619a14f7f6c11f9132ee7d793028042c
Author: root <root at rcn1.VSOFS1.COM>
Date:   Wed May 6 07:32:25 2009 +1000

    fixed a problem with clients disconnecting during a traverse
    
    When a client (such as smbstatus) is killed, it may have outstanding
    traverse children on remote nodes. We need to catch the client
    disconnect in ctdbd and send a control to all nodes telling them to
    kill those outstanding traverse children.

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

Summary of changes:
 Makefile.in                                        |   24 +-
 client/ctdb_client.c                               |  244 ++++++--
 common/cmdline.c                                   |   19 +-
 common/ctdb_message.c                              |    2 +-
 common/ctdb_util.c                                 |   56 ++
 common/system_linux.c                              |   43 +-
 config/ctdb.init                                   |  328 +++++----
 config/ctdb.sysconfig                              |   37 +-
 config/events.d/00.ctdb                            |    2 +-
 config/events.d/11.natgw                           |   35 +-
 config/events.d/{99.routing => 11.routing}         |    0 
 config/events.d/31.clamd                           |   53 ++
 config/events.d/41.httpd                           |   36 +-
 config/events.d/90.ipmux                           |   87 ---
 config/events.d/91.lvs                             |    2 +-
 config/events.d/README                             |    6 +
 config/functions                                   |   36 +
 configure.ac                                       |   28 +-
 doc/ctdb.1                                         |   95 ++-
 doc/ctdb.1.html                                    |  214 ++++--
 doc/ctdb.1.xml                                     |  166 ++++-
 doc/ctdbd.1                                        |  115 ++-
 doc/ctdbd.1.html                                   |  187 +++---
 doc/ctdbd.1.xml                                    |  179 +++--
 doc/onnode.1                                       |   19 +-
 doc/onnode.1.html                                  |   46 +-
 doc/onnode.1.xml                                   |   23 +
 ib/ibw_ctdb.c                                      |    2 +
 ib/ibw_ctdb_init.c                                 |    4 +
 ib/ibwrapper.c                                     |    8 +-
 ib/ibwrapper_test.c                                |    2 +
 include/ctdb.h                                     |   29 +
 include/ctdb_private.h                             |   35 +-
 lib/replace/replace.ho                             |  Bin 3260 -> 0 bytes
 lib/replace/snprintf.ho                            |  Bin 2224 -> 0 bytes
 lib/tdb/common/transaction.c                       |   25 +-
 lib/tdb/include/tdb.h                              |    5 +-
 lib/util/db_wrap.c                                 |    4 +
 lib/util/debug.c                                   |   10 +-
 packaging/RPM/ctdb.spec                            |  137 +++-
 packaging/RPM/makerpms.sh                          |   26 +-
 packaging/maketarball.sh                           |   18 +
 server/ctdb_call.c                                 |   51 ++-
 server/ctdb_control.c                              |   73 ++
 server/ctdb_daemon.c                               |   28 +-
 server/ctdb_freeze.c                               |    2 -
 server/ctdb_keepalive.c                            |    5 +
 server/ctdb_logging.c                              |   46 +-
 server/ctdb_ltdb_server.c                          |    8 +
 server/ctdb_monitor.c                              |   12 +-
 server/ctdb_persistent.c                           |   76 ++-
 server/ctdb_recover.c                              |  104 +++-
 server/ctdb_recoverd.c                             |  466 +++++++++++-
 server/ctdb_server.c                               |  114 +++-
 server/ctdb_takeover.c                             |   23 +-
 server/ctdb_tunables.c                             |   17 +-
 server/ctdb_vacuum.c                               |  335 +++++++++
 server/ctdbd.c                                     |    9 +-
 server/eventscript.c                               |   10 +-
 tcp/tcp_connect.c                                  |   11 +-
 tcp/tcp_init.c                                     |   10 +-
 tests/complex/31_nfs_tickle.sh                     |   95 +++
 tests/complex/32_cifs_tickle.sh                    |   92 +++
 tests/complex/33_gratuitous_arp.sh                 |   87 +++
 tests/complex/41_failover_ping_discrete.sh         |   68 ++
 tests/complex/42_failover_ssh_hostname.sh          |   78 ++
 tests/complex/43_failover_nfs_basic.sh             |   86 +++
 tests/complex/44_failover_nfs_oneway.sh            |  107 +++
 tests/events.d/00.test                             |    5 +
 tests/scripts/ctdb_test_functions.bash             |  255 ++++++-
 tests/scripts/run_tests                            |    2 +-
 tests/scripts/test_wrap                            |    6 +
 tests/simple/00_ctdb_init.sh                       |    1 -
 tests/simple/01_ctdb_version.sh                    |    4 +-
 tests/simple/02_ctdb_listvars.sh                   |    4 +-
 tests/simple/03_ctdb_getvar.sh                     |    6 +-
 tests/simple/04_ctdb_setvar.sh                     |   12 +-
 tests/simple/05_ctdb_listnodes.sh                  |    4 +-
 tests/simple/06_ctdb_getpid.sh                     |    4 +-
 tests/simple/07_ctdb_process_exists.sh             |   16 +-
 tests/simple/08_ctdb_isnotrecmaster.sh             |    4 +-
 tests/simple/09_ctdb_ping.sh                       |   11 +-
 tests/simple/11_ctdb_ip.sh                         |    4 +-
 tests/simple/12_ctdb_getdebug.sh                   |    8 +-
 tests/simple/13_ctdb_setdebug.sh                   |    6 +-
 tests/simple/14_ctdb_statistics.sh                 |   10 +-
 tests/simple/15_ctdb_statisticsreset.sh            |    4 +-
 tests/simple/16_ctdb_config_add_ip.sh              |   10 +-
 tests/simple/17_ctdb_config_delete_ip.sh           |   10 +-
 tests/simple/18_ctdb_freeze.sh                     |   11 +-
 tests/simple/19_ctdb_thaw.sh                       |    4 +-
 tests/simple/20_ctdb_getmonmode.sh                 |   11 +-
 tests/simple/21_ctdb_disablemonitor.sh             |   11 +-
 tests/simple/22_ctdb_enablemonitor.sh              |   11 +-
 tests/simple/23_ctdb_moveip.sh                     |   10 +-
 tests/simple/24_ctdb_getdbmap.sh                   |   10 +-
 tests/simple/25_dumpmemory.sh                      |    4 +-
 ..._ctdb_config_check_error_on_unreachable_ctdb.sh |   11 +-
 tests/simple/31_ctdb_disable.sh                    |   25 +-
 tests/simple/32_ctdb_enable.sh                     |   26 +-
 tests/simple/41_ctdb_ban.sh                        |  100 ---
 tests/simple/41_ctdb_stop.sh                       |   55 ++
 tests/simple/42_ctdb_continue.sh                   |   71 ++
 tests/simple/42_ctdb_unban.sh                      |   97 ---
 tests/simple/43_stop_recmaster_yield.sh            |   54 ++
 tests/simple/51_ctdb_bench.sh                      |   12 +-
 tests/simple/52_ctdb_fetch.sh                      |    4 +-
 tests/simple/53_ctdb_transaction.sh                |    4 +-
 tests/simple/61_ctdb_persistent_safe.sh            |    4 +-
 tests/simple/62_ctdb_persistent_unsafe.sh          |    4 +-
 tests/src/ctdb_bench.c                             |    2 +-
 tests/src/ctdb_fetch.c                             |   37 +-
 tests/src/ctdb_persistent.c                        |   10 +-
 tests/src/ctdb_transaction.c                       |  129 +++-
 tools/ctdb.c                                       |  758 +++++++++++++++-----
 tools/ctdb_diagnostics                             |    4 +-
 tools/onnode                                       |  157 +++--
 utils/ipmux/ipmux.c                                |  268 -------
 utils/ping_pong/ping_pong.c                        |  212 ++++++
 web/clamd.html                                     |   78 ++
 web/documentation.html                             |    1 +
 web/download.html                                  |   23 +-
 122 files changed, 5129 insertions(+), 1875 deletions(-)
 rename config/events.d/{99.routing => 11.routing} (100%)
 create mode 100644 config/events.d/31.clamd
 delete mode 100755 config/events.d/90.ipmux
 delete mode 100644 lib/replace/replace.ho
 delete mode 100644 lib/replace/snprintf.ho
 create mode 100644 server/ctdb_vacuum.c
 create mode 100755 tests/complex/31_nfs_tickle.sh
 create mode 100755 tests/complex/32_cifs_tickle.sh
 create mode 100755 tests/complex/33_gratuitous_arp.sh
 create mode 100755 tests/complex/41_failover_ping_discrete.sh
 create mode 100755 tests/complex/42_failover_ssh_hostname.sh
 create mode 100755 tests/complex/43_failover_nfs_basic.sh
 create mode 100755 tests/complex/44_failover_nfs_oneway.sh
 delete mode 100755 tests/simple/41_ctdb_ban.sh
 create mode 100755 tests/simple/41_ctdb_stop.sh
 create mode 100755 tests/simple/42_ctdb_continue.sh
 delete mode 100755 tests/simple/42_ctdb_unban.sh
 create mode 100755 tests/simple/43_stop_recmaster_yield.sh
 delete mode 100644 utils/ipmux/ipmux.c
 create mode 100644 utils/ping_pong/ping_pong.c
 create mode 100644 web/clamd.html


Changeset truncated at 500 lines:

diff --git a/Makefile.in b/Makefile.in
index f1c5f36..a32efa8 100755
--- a/Makefile.in
+++ b/Makefile.in
@@ -26,8 +26,6 @@ POPT_LIBS = @POPT_LIBS@
 POPT_CFLAGS = @POPT_CFLAGS@
 POPT_OBJ = @POPT_OBJ@
 
-IPQ_LIBS = @IPQ_LIBS@
-
 CFLAGS=-g -I$(srcdir)/include -Iinclude -Ilib -Ilib/util -I$(srcdir) \
        -I at tallocdir@ -I at tdbdir@/include -I at libreplacedir@ \
 	-DVARDIR=\"$(localstatedir)\" -DETCDIR=\"$(etcdir)\" \
@@ -55,7 +53,8 @@ CTDB_SERVER_OBJ = server/ctdbd.o server/ctdb_daemon.o server/ctdb_lockwait.o \
 	server/ctdb_control.o server/ctdb_call.o server/ctdb_ltdb_server.o \
 	server/ctdb_traverse.o server/eventscript.o server/ctdb_takeover.o \
 	server/ctdb_serverids.o server/ctdb_persistent.o \
-	server/ctdb_keepalive.o server/ctdb_logging.o server/ctdb_uptime.c \
+	server/ctdb_keepalive.o server/ctdb_logging.o server/ctdb_uptime.o \
+	server/ctdb_vacuum.o \
 	$(CTDB_CLIENT_OBJ) $(CTDB_TCP_OBJ) @INFINIBAND_WRAPPER_OBJ@
 
 TEST_BINS=tests/bin/ctdb_bench tests/bin/ctdb_fetch tests/bin/ctdb_store \
@@ -63,7 +62,7 @@ TEST_BINS=tests/bin/ctdb_bench tests/bin/ctdb_fetch tests/bin/ctdb_store \
 	tests/bin/ctdb_traverse tests/bin/rb_test tests/bin/ctdb_transaction \
 	@INFINIBAND_BINS@
 
-BINS = bin/ctdb @CTDB_SCSI_IO@ bin/ctdb_ipmux bin/smnotify
+BINS = bin/ctdb @CTDB_SCSI_IO@ bin/smnotify bin/ping_pong
 SBINS = bin/ctdbd
 
 DIRS = lib bin tests/bin
@@ -104,15 +103,11 @@ bin/scsi_io: $(CTDB_CLIENT_OBJ) utils/scsi_io/scsi_io.o
 	@echo Linking $@
 	@$(CC) $(CFLAGS) -o $@ utils/scsi_io/scsi_io.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
 
-bin/ctdb_ipmux: $(CTDB_CLIENT_OBJ) utils/ipmux/ipmux.o 
-	@echo Linking $@
-	@$(CC) $(CFLAGS) -o $@ utils/ipmux/ipmux.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS) $(IPQ_LIBS)
-
 bin/ctdb: $(CTDB_CLIENT_OBJ) tools/ctdb.o tools/ctdb_vacuum.o
 	@echo Linking $@
 	@$(CC) $(CFLAGS) -o $@ tools/ctdb.o tools/ctdb_vacuum.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
 
-bin/smnotify: utils/smnotify/gen_xdr.o utils/smnotify/gen_smnotify.o utils/smnotify/smnotify.o 
+bin/smnotify: utils/smnotify/gen_xdr.o utils/smnotify/gen_smnotify.o utils/smnotify/smnotify.o $(POPT_OBJ)
 	@echo Linking $@
 	@$(CC) $(CFLAGS) -o $@ utils/smnotify/smnotify.o utils/smnotify/gen_xdr.o utils/smnotify/gen_smnotify.o $(POPT_OBJ) $(LIB_FLAGS)
 
@@ -130,6 +125,11 @@ utils/smnotify/gen_smnotify.c: utils/smnotify/smnotify.x utils/smnotify/smnotify
 	@echo Generating $@
 	rpcgen -l utils/smnotify/smnotify.x > utils/smnotify/gen_smnotify.c 
 
+bin/ping_pong: utils/ping_pong/ping_pong.o
+	@echo Linking $@
+	@$(CC) $(CFLAGS) -o $@ utils/ping_pong/ping_pong.o
+
+
 tests/bin/rb_test: $(CTDB_CLIENT_OBJ) tests/src/rb_test.o 
 	@echo Linking $@
 	@$(CC) $(CFLAGS) -o $@ tests/src/rb_test.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
@@ -197,9 +197,9 @@ install: all
 	mkdir -p $(DESTDIR)$(docdir)/ctdb
 	${INSTALLCMD} -m 644 ctdb.pc $(DESTDIR)$(libdir)/pkgconfig
 	${INSTALLCMD} -m 755 bin/ctdb $(DESTDIR)$(bindir)
-	${INSTALLCMD} -m 755 bin/ctdb_ipmux $(DESTDIR)$(bindir)
 	${INSTALLCMD} -m 755 bin/ctdbd $(DESTDIR)$(sbindir)
 	${INSTALLCMD} -m 755 bin/smnotify $(DESTDIR)$(bindir)
+	$(INSTALLCMD) -m 755 bin/ping_pong $(DESTDIR)$(bindir)
 	${INSTALLCMD} -m 644 include/ctdb.h $(DESTDIR)$(includedir)
 	${INSTALLCMD} -m 644 include/ctdb_private.h $(DESTDIR)$(includedir) # for samba3
 	${INSTALLCMD} -m 644 config/functions $(DESTDIR)$(etcdir)/ctdb
@@ -209,16 +209,16 @@ install: all
 	${INSTALLCMD} -m 755 config/events.d/00.ctdb $(DESTDIR)$(etcdir)/ctdb/events.d
 	${INSTALLCMD} -m 755 config/events.d/10.interface $(DESTDIR)$(etcdir)/ctdb/events.d
 	${INSTALLCMD} -m 755 config/events.d/11.natgw $(DESTDIR)$(etcdir)/ctdb/events.d
+	${INSTALLCMD} -m 755 config/events.d/11.routing $(DESTDIR)$(etcdir)/ctdb/events.d
 	${INSTALLCMD} -m 755 config/events.d/20.multipathd $(DESTDIR)$(etcdir)/ctdb/events.d
+	${INSTALLCMD} -m 644 config/events.d/31.clamd $(DESTDIR)$(etcdir)/ctdb/events.d
 	${INSTALLCMD} -m 755 config/events.d/40.vsftpd $(DESTDIR)$(etcdir)/ctdb/events.d
 	${INSTALLCMD} -m 755 config/events.d/41.httpd $(DESTDIR)$(etcdir)/ctdb/events.d
 	${INSTALLCMD} -m 755 config/events.d/50.samba $(DESTDIR)$(etcdir)/ctdb/events.d
 	${INSTALLCMD} -m 755 config/events.d/60.nfs $(DESTDIR)$(etcdir)/ctdb/events.d
 	${INSTALLCMD} -m 755 config/events.d/61.nfstickle $(DESTDIR)$(etcdir)/ctdb/events.d
 	${INSTALLCMD} -m 755 config/events.d/70.iscsi $(DESTDIR)$(etcdir)/ctdb/events.d
-	${INSTALLCMD} -m 755 config/events.d/90.ipmux $(DESTDIR)$(etcdir)/ctdb/events.d
 	${INSTALLCMD} -m 755 config/events.d/91.lvs $(DESTDIR)$(etcdir)/ctdb/events.d
-	${INSTALLCMD} -m 755 config/events.d/99.routing $(DESTDIR)$(etcdir)/ctdb/events.d
 	${INSTALLCMD} -m 755 tools/ctdb_diagnostics $(DESTDIR)$(bindir)
 	${INSTALLCMD} -m 755 tools/onnode $(DESTDIR)$(bindir)
 	if [ -f doc/ctdb.1 ];then ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man1; fi
diff --git a/client/ctdb_client.c b/client/ctdb_client.c
index 8c3bb74..f6dbc73 100644
--- a/client/ctdb_client.c
+++ b/client/ctdb_client.c
@@ -263,6 +263,7 @@ int ctdb_socket_connect(struct ctdb_context *ctdb)
 
 	ctdb->daemon.sd = socket(AF_UNIX, SOCK_STREAM, 0);
 	if (ctdb->daemon.sd == -1) {
+		DEBUG(DEBUG_ERR,(__location__ " Failed to open client socket. Errno:%s(%d)\n", strerror(errno), errno));
 		return -1;
 	}
 
@@ -272,6 +273,7 @@ int ctdb_socket_connect(struct ctdb_context *ctdb)
 	if (connect(ctdb->daemon.sd, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
 		close(ctdb->daemon.sd);
 		ctdb->daemon.sd = -1;
+		DEBUG(DEBUG_ERR,(__location__ " Failed to connect client socket to daemon. Errno:%s(%d)\n", strerror(errno), errno));
 		return -1;
 	}
 
@@ -642,46 +644,12 @@ again:
 */
 int ctdb_record_store(struct ctdb_record_handle *h, TDB_DATA data)
 {
-	int ret;
-	int32_t status;
-	struct ctdb_rec_data *rec;
-	TDB_DATA recdata;
-
 	if (h->ctdb_db->persistent) {
-		h->header.rsn++;
-	}
-
-	ret = ctdb_ltdb_store(h->ctdb_db, h->key, &h->header, data);
-	if (ret != 0) {
-		return ret;
-	}
-
-	/* don't need the persistent_store control for non-persistent databases */
-	if (!h->ctdb_db->persistent) {
-		return 0;
-	}
-
-	rec = ctdb_marshall_record(h, h->ctdb_db->db_id, h->key, &h->header, data);
-	if (rec == NULL) {
-		DEBUG(DEBUG_ERR,("Unable to marshall record in ctdb_record_store\n"));
-		return -1;
-	}
-
-	recdata.dptr = (uint8_t *)rec;
-	recdata.dsize = rec->length;
-
-	ret = ctdb_control(h->ctdb_db->ctdb, CTDB_CURRENT_NODE, 0, 
-			   CTDB_CONTROL_PERSISTENT_STORE, 0,
-			   recdata, NULL, NULL, &status, NULL, NULL);
-
-	talloc_free(rec);
-
-	if (ret != 0 || status != 0) {
-		DEBUG(DEBUG_ERR,("Failed persistent store in ctdb_record_store\n"));
+		DEBUG(DEBUG_ERR, (__location__ " ctdb_record_store prohibited for persistent dbs\n"));
 		return -1;
 	}
 
-	return 0;
+	return ctdb_ltdb_store(h->ctdb_db, h->key, &h->header, data);
 }
 
 /*
@@ -2334,6 +2302,7 @@ int ctdb_ctrl_get_public_ipsv4(struct ctdb_context *ctdb,
 	len = offsetof(struct ctdb_all_public_ips, ips) +
 		ipsv4->num*sizeof(struct ctdb_public_ip);
 	*ips = talloc_zero_size(mem_ctx, len);
+	CTDB_NO_MEMORY(ctdb, *ips);
 	(*ips)->num = ipsv4->num;
 	for (i=0; i<ipsv4->num; i++) {
 		(*ips)->ips[i].pnn     = ipsv4->ips[i].pnn;
@@ -2399,10 +2368,10 @@ int ctdb_ctrl_modflags(struct ctdb_context *ctdb, struct timeval timeout, uint32
 					timeout, false, data,
 					NULL, NULL,
 					NULL) != 0) {
-		DEBUG(DEBUG_ERR, (__location__ " ctdb_control to update nodeflags failed\n"));
+		DEBUG(DEBUG_ERR, (__location__ " ctdb_control to disable node failed\n"));
 
 		talloc_free(tmp_ctx);
-		return 0;
+		return -1;
 	}
 
 	talloc_free(tmp_ctx);
@@ -2706,14 +2675,24 @@ int ctdb_ctrl_get_server_id_list(struct ctdb_context *ctdb,
 */
 struct ctdb_context *ctdb_init(struct event_context *ev)
 {
+	int ret;
 	struct ctdb_context *ctdb;
 
 	ctdb = talloc_zero(ev, struct ctdb_context);
+	if (ctdb == NULL) {
+		DEBUG(DEBUG_ERR,(__location__ " talloc_zero failed.\n"));
+		return NULL;
+	}
 	ctdb->ev  = ev;
 	ctdb->idr = idr_init(ctdb);
 	CTDB_NO_MEMORY_NULL(ctdb, ctdb->idr);
 
-	ctdb_set_socketname(ctdb, CTDB_PATH);
+	ret = ctdb_set_socketname(ctdb, CTDB_PATH);
+	if (ret != 0) {
+		DEBUG(DEBUG_ERR,(__location__ " ctdb_set_socketname failed.\n"));
+		talloc_free(ctdb);
+		return NULL;
+	}
 
 	return ctdb;
 }
@@ -2733,6 +2712,8 @@ void ctdb_set_flags(struct ctdb_context *ctdb, unsigned flags)
 int ctdb_set_socketname(struct ctdb_context *ctdb, const char *socketname)
 {
 	ctdb->daemon.name = talloc_strdup(ctdb, socketname);
+	CTDB_NO_MEMORY(ctdb, ctdb->daemon.name);
+
 	return 0;
 }
 
@@ -3253,8 +3234,7 @@ int ctdb_transaction_store(struct ctdb_transaction_handle *h,
 		/* the record doesn't exist - create one with us as dmaster.
 		   This is only safe because we are in a transaction and this
 		   is a persistent database */
-		header.dmaster = h->ctdb_db->ctdb->pnn;
-		header.rsn = 0;
+		ZERO_STRUCT(header);
 	} else if (ret != 0) {
 		DEBUG(DEBUG_ERR,(__location__ " Failed to fetch record\n"));
 		talloc_free(tmp_ctx);
@@ -3268,6 +3248,7 @@ int ctdb_transaction_store(struct ctdb_transaction_handle *h,
 		return 0;
 	}
 
+	header.dmaster = h->ctdb_db->ctdb->pnn;
 	header.rsn++;
 
 	if (!h->in_replay) {
@@ -3615,3 +3596,184 @@ int ctdb_ctrl_getscriptstatus(struct ctdb_context *ctdb,
 	return 0;
 }
 
+/*
+  tell the main daemon how long it took to lock the reclock file
+ */
+int ctdb_ctrl_report_recd_lock_latency(struct ctdb_context *ctdb, struct timeval timeout, double latency)
+{
+	int ret;
+	int32_t res;
+	TDB_DATA data;
+
+	data.dptr = (uint8_t *)&latency;
+	data.dsize = sizeof(latency);
+
+	ret = ctdb_control(ctdb, CTDB_CURRENT_NODE, 0, CTDB_CONTROL_RECD_RECLOCK_LATENCY, 0, data, 
+			   ctdb, NULL, &res, NULL, NULL);
+	if (ret != 0 || res != 0) {
+		DEBUG(DEBUG_ERR,("Failed to send recd reclock latency\n"));
+		return -1;
+	}
+
+	return 0;
+}
+
+/*
+  get the name of the reclock file
+ */
+int ctdb_ctrl_getreclock(struct ctdb_context *ctdb, struct timeval timeout,
+			 uint32_t destnode, TALLOC_CTX *mem_ctx,
+			 const char **name)
+{
+	int ret;
+	int32_t res;
+	TDB_DATA data;
+
+	ret = ctdb_control(ctdb, destnode, 0, 
+			   CTDB_CONTROL_GET_RECLOCK_FILE, 0, tdb_null, 
+			   mem_ctx, &data, &res, &timeout, NULL);
+	if (ret != 0 || res != 0) {
+		return -1;
+	}
+
+	if (data.dsize == 0) {
+		*name = NULL;
+	} else {
+		*name = talloc_strdup(mem_ctx, discard_const(data.dptr));
+	}
+	talloc_free(data.dptr);
+
+	return 0;
+}
+
+/*
+  set the reclock filename for a node
+ */
+int ctdb_ctrl_setreclock(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode, const char *reclock)
+{
+	int ret;
+	TDB_DATA data;
+	int32_t res;
+
+	if (reclock == NULL) {
+	        data.dsize = 0;
+		data.dptr  = NULL;
+	} else {
+	        data.dsize = strlen(reclock) + 1;
+		data.dptr  = discard_const(reclock);
+	}
+
+	ret = ctdb_control(ctdb, destnode, 0, 
+			   CTDB_CONTROL_SET_RECLOCK_FILE, 0, data, 
+			   NULL, NULL, &res, &timeout, NULL);
+	if (ret != 0 || res != 0) {
+		DEBUG(DEBUG_ERR,(__location__ " ctdb_control for setreclock failed\n"));
+		return -1;
+	}
+
+	return 0;
+}
+
+/*
+  stop a node
+ */
+int ctdb_ctrl_stop_node(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode)
+{
+	int ret;
+	int32_t res;
+
+	ret = ctdb_control(ctdb, destnode, 0, CTDB_CONTROL_STOP_NODE, 0, tdb_null, 
+			   ctdb, NULL, &res, &timeout, NULL);
+	if (ret != 0 || res != 0) {
+		DEBUG(DEBUG_ERR,("Failed to stop node\n"));
+		return -1;
+	}
+
+	return 0;
+}
+
+/*
+  continue a node
+ */
+int ctdb_ctrl_continue_node(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode)
+{
+	int ret;
+
+	ret = ctdb_control(ctdb, destnode, 0, CTDB_CONTROL_CONTINUE_NODE, 0, tdb_null, 
+			   ctdb, NULL, NULL, &timeout, NULL);
+	if (ret != 0) {
+		DEBUG(DEBUG_ERR,("Failed to continue node\n"));
+		return -1;
+	}
+
+	return 0;
+}
+
+/*
+  set the natgw state for a node
+ */
+int ctdb_ctrl_setnatgwstate(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode, uint32_t natgwstate)
+{
+	int ret;
+	TDB_DATA data;
+	int32_t res;
+
+	data.dsize = sizeof(natgwstate);
+	data.dptr  = (uint8_t *)&natgwstate;
+
+	ret = ctdb_control(ctdb, destnode, 0, 
+			   CTDB_CONTROL_SET_NATGWSTATE, 0, data, 
+			   NULL, NULL, &res, &timeout, NULL);
+	if (ret != 0 || res != 0) {
+		DEBUG(DEBUG_ERR,(__location__ " ctdb_control for setnatgwstate failed\n"));
+		return -1;
+	}
+
+	return 0;
+}
+
+/*
+  set the lmaster role for a node
+ */
+int ctdb_ctrl_setlmasterrole(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode, uint32_t lmasterrole)
+{
+	int ret;
+	TDB_DATA data;
+	int32_t res;
+
+	data.dsize = sizeof(lmasterrole);
+	data.dptr  = (uint8_t *)&lmasterrole;
+
+	ret = ctdb_control(ctdb, destnode, 0, 
+			   CTDB_CONTROL_SET_LMASTERROLE, 0, data, 
+			   NULL, NULL, &res, &timeout, NULL);
+	if (ret != 0 || res != 0) {
+		DEBUG(DEBUG_ERR,(__location__ " ctdb_control for setlmasterrole failed\n"));
+		return -1;
+	}
+
+	return 0;
+}
+
+/*
+  set the recmaster role for a node
+ */
+int ctdb_ctrl_setrecmasterrole(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode, uint32_t recmasterrole)
+{
+	int ret;
+	TDB_DATA data;
+	int32_t res;
+
+	data.dsize = sizeof(recmasterrole);
+	data.dptr  = (uint8_t *)&recmasterrole;
+
+	ret = ctdb_control(ctdb, destnode, 0, 
+			   CTDB_CONTROL_SET_RECMASTERROLE, 0, data, 
+			   NULL, NULL, &res, &timeout, NULL);
+	if (ret != 0 || res != 0) {
+		DEBUG(DEBUG_ERR,(__location__ " ctdb_control for setrecmasterrole failed\n"));
+		return -1;
+	}
+
+	return 0;
+}
diff --git a/common/cmdline.c b/common/cmdline.c
index 2136bf6..332a448 100644
--- a/common/cmdline.c
+++ b/common/cmdline.c
@@ -24,16 +24,19 @@
 #include "../include/ctdb.h"
 #include "../include/ctdb_private.h"
 #include "../common/rb_tree.h"
+#include <ctype.h>
 
 /* Handle common command line options for ctdb test progs
  */
 
 static struct {
 	const char *socketname;
+	const char *debuglevel;
 	int torture;
 	const char *events;
 } ctdb_cmdline = {
 	.torture = 0,
+	.debuglevel = "ERR",
 };
 
 enum {OPT_EVENTSYSTEM=1};
@@ -54,7 +57,7 @@ static void ctdb_cmdline_callback(poptContext con,
 struct poptOption popt_ctdb_cmdline[] = {
 	{ NULL, 0, POPT_ARG_CALLBACK, (void *)ctdb_cmdline_callback },	
 	{ "socket", 0, POPT_ARG_STRING, &ctdb_cmdline.socketname, 0, "local socket name", "filename" },
-	{ "debug", 'd', POPT_ARG_INT, &LogLevel, 0, "debug level"},
+	{ "debug", 'd', POPT_ARG_STRING, &ctdb_cmdline.debuglevel, 0, "debug level"},
 	{ "torture", 0, POPT_ARG_NONE, &ctdb_cmdline.torture, 0, "enable nastiness in library", NULL },
 	{ "events", 0, POPT_ARG_STRING, NULL, OPT_EVENTSYSTEM, "event system", NULL },
 	{ NULL }
@@ -91,6 +94,13 @@ struct ctdb_context *ctdb_cmdline_init(struct event_context *ev)
 		}
 	}
 
+	/* Set the debug level */
+	if (isalpha(ctdb_cmdline.debuglevel[0]) || ctdb_cmdline.debuglevel[0] == '-') { 
+		LogLevel = get_debug_by_desc(ctdb_cmdline.debuglevel);
+	} else {
+		LogLevel = strtol(ctdb_cmdline.debuglevel, NULL, 0);
+	}
+
 	/* set up the tree to store server ids */
 	ctdb->server_ids = trbt_create(ctdb, 0);
 
@@ -117,7 +127,12 @@ struct ctdb_context *ctdb_cmdline_client(struct event_context *ev)
 	/* tell ctdb the socket address */
 	socket_name = getenv("CTDB_SOCKET");
 	if (socket_name != NULL) {
-		ctdb_set_socketname(ctdb, socket_name);
+		ret = ctdb_set_socketname(ctdb, socket_name);
+		if (ret == -1) {
+			printf("ctdb_set_socketname failed - %s\n",
+						    ctdb_errstr(ctdb));
+			exit(1);
+		}
 	}
 
 	if (ctdb_cmdline.socketname != NULL) {
diff --git a/common/ctdb_message.c b/common/ctdb_message.c
index 1aea28f..41eae51 100644
--- a/common/ctdb_message.c
+++ b/common/ctdb_message.c
@@ -52,8 +52,8 @@ void ctdb_request_message(struct ctdb_context *ctdb, struct ctdb_req_header *hdr
 	struct ctdb_req_message *c = (struct ctdb_req_message *)hdr;
 	TDB_DATA data;
 
-	data.dptr = &c->data[0];
 	data.dsize = c->datalen;
+	data.dptr = talloc_memdup(c, &c->data[0], c->datalen);
 
 	ctdb_dispatch_message(ctdb, c->srvid, data);
 }
diff --git a/common/ctdb_util.c b/common/ctdb_util.c
index a3f1731..3af1346 100644
--- a/common/ctdb_util.c
+++ b/common/ctdb_util.c
@@ -73,6 +73,8 @@ int ctdb_parse_address(struct ctdb_context *ctdb,
 	endservent();


-- 
CTDB repository


More information about the samba-cvs mailing list