summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * tools/ctdb: Factor out common pattern used in disable/enable/stop/continueMartin Schwenke2013-08-211-119/+76
| | | | | | | | | | | | | | | | | | Now we will only have one set of bugs. :-) Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 444521c852749558f39dc6131acce9e47eefd489)
| * tools/ctdb: Factor, simplify and improve robustness of ipreallocate codeMartin Schwenke2013-08-211-45/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having other functions call control_ipreallocate() suggests that the it might look at the argv/argv arguments that are passed. This is not the case. Change the callers so they call the new ipreallocate() function instead. Broadcast CTDB_SRVID_TAKEOVER_RUN to all connected nodes. Inactive nodes will ignore it. This is safe since we only want 1 reply. If we didn't get a response, we don't actually care if there's no active recovery master - just fire, wait, retry, ... Ignore some failures on the basis that they might be transient, so it is probably worth retrying. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 4bf0b1c9d21986eecb7682f935bd6154c65533cc)
| * tools/ctdb: Use ctdb_get_pnn() to get PNN of the current nodeMartin Schwenke2013-08-211-29/+5
| | | | | | | | | | | | | | | | This has already been stored at connect time and can't fail. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit d8eb2e7fdd7645719370dad4f2faa5c3fffa8249)
| * util: In passing the code, fix a space vs. tab in set_close_on_exec().Michael Adam2013-08-191-1/+1
| | | | | | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit f9556a6f1fe0046308c8b363e6dcaf3f7ce6f2b7)
| * server: standardize formatting of comment block for ctdb_reply_dmaster() ↵Michael Adam2013-08-191-6/+6
| | | | | | | | | | | | | | | | while I'm at it.. Signed-off-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit 00d3bf092e2f72eda330978c75ec85f17e870553)
| * server: fix wording and punctuation in comment block for ctdb_reply_dmaster().Michael Adam2013-08-191-2/+2
| | | | | | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit cb3a1c5af3b796dba30cae07118670d3c9e57df7)
| * recoverd: Improve log message when nodes disagree on recmasterAmitay Isaacs2013-08-141-1/+1
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 7b7aa7b599536cd60ebb84d363607bb4e953248a)
| * common: Null terminate process name string so valgrind doesn't complainAmitay Isaacs2013-08-141-0/+1
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 1c9025fdd08d1cea342af7487d0123015e08831b)
| * vacuuming: Fix vacuuming bug where requests keep bouncing between nodes (part 2)Amitay Isaacs2013-08-141-20/+20
| | | | | | | | | | | | | | | | | | | | This is caused by corruption of a record header such that the records on two nodes point to each other as dmaster. This makes a request for that record bounce between nodes endlessly. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit f0853013655ac3bedf1b793de128fb679c6db6c6)
| * vacuuming: Fix vacuuming bug where requests keep bouncing between nodes (part 1)Amitay Isaacs2013-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | This is caused by corruption of a record header such that the records on two nodes point to each other as dmaster. This makes a request for that record bounce between nodes endlessly. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit a610bc351f0754c84c78c27d02f9a695e60c5b0f)
| * db_wrap: Make sure tdb messages are logged correctlyAmitay Isaacs2013-08-141-0/+1
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 60cb40d090e45ff6134c098a238fac7ad854f134)
| * eventscripts: Become unhealthy faster on nfsd failureMartin Schwenke2013-08-144-15/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Anecdotal evidence suggests that most nfsd RPC check failures are due to cluster filesystem or storage problem. Apparently these are rarely helped by attempting to restart the NFS service because the restart tends to hang. Fail after 2 nfsd RPC check failures, instead of waiting for 6 failures. Restart on every 10th failure to try to bring the node back to good health. Update unit tests to match. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit e9ef93f7b6dad59eabaa32124df81f3e74c651ef)
| * tools/ctdb: Increase default control timeout to 10 secondsMartin Schwenke2013-08-141-1/+1
| | | | | | | | | | | | | | | | | | The current 3 second timeout is arbitrary and users trip over it sometimes. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit b49c4f39666d5b1596213bf41bcdc47ed3c327ae)
| * eventscripts: Improve message logged when a counter hits a limitMartin Schwenke2013-08-141-1/+1
| | | | | | | | | | | | | | | | | | It should print the actual number of consecutive failures rather than the limit. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ff5f0d1e29af2b293e30cdc54bed03a644be7038)
| * eventscripts: Print a message when waiting for TCP connections to be killedMartin Schwenke2013-08-142-1/+7
| | | | | | | | | | | | | | | | This makes the gaps in the logs more obvious. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 11fbf4789d783dd0bac22754b374dd9ea4b03bad)
| * eventscripts: New configuration variable $CTDB_RPCINFO_LOCALHOSTMartin Schwenke2013-08-142-1/+8
| | | | | | | | | | | | | | | | | | | | Passing "localhost" to the rpcinfo command causes overheads, like reading /etc/services multiple times. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 1d61988af9e4fa3621a3e2d06a859bcb53df2d67)
| * eventscripts: Add modulo (%) operator to ctdb_check_counter()Martin Schwenke2013-08-142-8/+23
| | | | | | | | | | | | | | | | Also add it to the corresponding eventscript unit test infrastructure. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f4ef83a256f59eeb00b9a5bc10c28347e1ad1031)
| * eventscripts: Separate out RPC service restart codeMartin Schwenke2013-08-143-51/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While doing this: * Explicitly assign RPC program and version information in _nfs_check_rpc_common(). This is more lines of code but is easier to read. * Don't print the options when starting a service. Trying to print it makes the code messy for little benefit. Update the eventscript unit testing code and a Ganesha test to reflect this. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit e8b531405665885196c95fe1608db33a255bf761)
| * tests/eventscripts: Override background_with_logging(), just prepend "&"Martin Schwenke2013-08-146-31/+34
| | | | | | | | | | | | | | | | | | | | | | | | That is, output that goes through background_with_logging() just gets "&" prepended to each line. This is cleaner than having the tests grovel through logs. Update some 49.winbind/50.samba tests to deal with this. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 3ba933d806106d12bc48b83b22d0f314d9d1e5e5)
| * eventscripts: Remove support for RPC service 'q' and 's' restart flagsMartin Schwenke2013-08-145-10/+6
| | | | | | | | | | | | | | | | They're hard to maintain and provide very little benefit. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 1a1be43f8466d46913dcdfe6dcedb94316cd28ad)
| * eventscripts: When restarting the nfslock service only show output of startMartin Schwenke2013-08-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | That is, /dev/null the "stop" output. This is consistent with the way CTDB generally deals with the output when stopping a service. It also makes updating the eventscript unit tests easier. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c7332526b1b488abefeb4be78a7cd3f2f9abc451)
| * tests/simple: Unreachable node test should wait for recovery to completeMartin Schwenke2013-08-141-0/+2
| | | | | | | | | | | | | | | | | | This should minimise the chances of a control timing out. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 63be516673c5d9c0d543617bf1bb8bca919956a8)
| * tests/simple: Fix the missing IP testMartin Schwenke2013-08-141-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the missing IP test to wait until restarts are complete. Otherwise a service restart can collide with the following monitor event and cause chaos. Also, do not disable 10.interface until it matters. Disabling it too early can cause even more chaos if something goes wrong with the monitor step. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 4e3bd06916bd3adac213fb18c7c2a24854b02d45)
| * recoverd: Use TDB_INCOMPATIBLE_HASH when creating volatile databasesAmitay Isaacs2013-08-141-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | When creating missing databases either locally or remotely, recovery master calls ctdb_ctrl_createdb(). Recovery master always passes 0 for tdb_flags. For volatile databases, if TDB_INCOMPATIBLE_HASH is not specified, then they will be attached without using jenkins hash causing database corruption. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 2fc6b6403707a292d134140fc0b9145b454992c5)
| * Revert "recoverd: Use correct tdb flags when creating missing databases"Amitay Isaacs2013-08-143-10/+8
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 10a057d8e15c8c18e540598a940d3548c731b0b4. This approach would not work when creating local databases since currently there is no control to receive TDB flags for remote databases. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit ca61eb776ab862bd269e45ee0f9f96e7e1e0e001)
| * common/io: Keep queue buffer size multiple of 4KAmitay Isaacs2013-08-091-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently queue buffer size is realloc'd every time we need to extend the buffer. Small increments can cause memory fragmentation. Instead always extend buffer in multiples of 4K. This should reduce multiple talloc_realloc calls when there are lots of packets in the socket buffer. Also, if queue buffer has grown larger than 64K, throw away the buffer once all the requests in the queue have been processed. That way queue does not hold on to large buffers. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 5e9b1a7e24d058ff88aaa0563db36a804e866fa9)
| * packaging: Allow setting custom release number in RPM spec fileMartin Schwenke2013-08-094-8/+16
| | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 867afb247bd8cc86c8d738f051a44cc534cafacf)
| * ctdbd: When a record is made sticky, log only onceAmitay Isaacs2013-08-091-2/+3
| | | | | | | | | | | | | | | | | | | | Instead of logging from ctdb_request_call(), log the message from ctdb_make_record_sticky(). That way if the record is already sticky, the message is not repeated unnecessarily. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 44a64d1c388bfe3c3388b191edfaedecfb7bb831)
| * ctdbd: Improve high hopcount log messages when request is redirectedAmitay Isaacs2013-08-091-5/+5
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 9cde47e1a5bf1b9ca3b4da8c2db94caac2b1aa5e)
| * scripts: Do not run ctdb tool commands when debugging hung "init" eventMartin Schwenke2013-08-091-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | CTDB daemon is not ready to accept clients in INIT runstate (init event). CTDB daemon will start accepting connections in SETUP runstate (setup event) and later. Also, minor log formatting changes. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 81d7ce03b28d592a1337639e14d9ea141e20bfff)
| * ctdbd: Avoid leaking file descriptor if talloc failsAmitay Isaacs2013-08-091-1/+4
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit d7f6bc3fed2dc61e6e587b4c0ec0ac27d533bbbe)
| * eventscript: Wait for debug hung script to finish or timeout before continuingAmitay Isaacs2013-08-091-13/+59
| | | | | | | | | | | | | | | | | | Currently if the debug hung script takes long time to finish, the subsequent monitor event can collide with the previous event which is not yet finished. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 9e99e0eb072e2b845914ee3896acbc66b96138d7)
| * eventscripts: Use configured RECLOCK file instead of asking CTDBAmitay Isaacs2013-08-091-7/+5
| | | | | | | | | | | | | | | | | | | | | | On cluster where recovery lock file is not being used, asking CTDB daemon is unnecessary overhead. And if CTDB is using recovery file, then changing configuration without restarting is *stupid*. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Pair-Programmed-With: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 44eb86e6042adb6efe75d2a5528b82a0f21d496d)
| * locking: Do not create multiple lock processes for the same keyAmitay Isaacs2013-08-091-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | If there are multiple lock helper processes waiting for the same record, then it will cause a thundering herd when that record has been unlocked. So avoid scheduling lock contexts for the same record. This will also mean that multiple requests will get queued up behind the same lock context and can be processed quickly once the lock has been obtained. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit ebecc3a18f1cb397a78b56eaf8f752dd5495bcc9)
| * locking: Move function find_lock_context() before ctdb_lock_schedule()Amitay Isaacs2013-08-091-53/+53
| | | | | | | | | | | | | | | | | | So that ctdb_lock_schedule() can call this function without requiring extra prototype declaration. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 68af5405acc123b5a90decd2123e2a02961a8fcf)
| * ctdbd: Print set db sticky message after it's setAmitay Isaacs2013-08-011-3/+2
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 824dcec35ec461d78e22b2ea109473b32bfe3972)
| * tests: Add a test program to hold a lock on a databaseAmitay Isaacs2013-08-012-1/+47
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit f6b066a23610fb0092298861c21a9b354b91e2f1)
| * recoverd: Use correct tdb flags when creating missing databasesAmitay Isaacs2013-08-013-8/+10
| | | | | | | | | | | | | | | | | | | | When creating missing databases either locally or remotely, make sure to use the correct tdb flags from other nodes. Without this, volatile databases can get attached without TDB_INCOMPATIBLE_HASH flag. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 10a057d8e15c8c18e540598a940d3548c731b0b4)
| * client: Always use jenkins hash when attaching volatile databasesAmitay Isaacs2013-08-011-0/+8
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 7e7e59c4047c78159387089eca65d90037bcf722)
| * recoverd: Make sure to use jenkins hash for recovery databasesAmitay Isaacs2013-08-011-1/+1
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 32c83e209823e9a4d6306bb7fd63d4500f3e2668)
| * recoverd: Assemble up-to-date node flags information from remote nodesAmitay Isaacs2013-07-301-0/+17
| | | | | | | | | | | | | | | | | | | | | | Currently nodemap used by recovery master is the one obtained from the local node. This information may have been updated while processing main loop. Before comparing node flags on all the nodes, create up-to-date node flags information based on the information received from all the nodes. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit fcf77dec5af973a0e32f3999bc012053a6f47a96)
| * tools/ctdb: Only print the hot records with non-zero hopcountAmitay Isaacs2013-07-301-0/+9
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 049d9beb3783482490e6273a434ccbad23f85f0a)
| * ctdbd: Don't consider a hot record if the hopcount is zeroAmitay Isaacs2013-07-301-0/+3
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit ab35773518ad15588013f4d859f7bee790437450)
| * ctdbd: Fix updating of hot keys in database statisticsAmitay Isaacs2013-07-291-7/+13
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit fde4b4db5a57f75c5efa5647c309f33e0d5a68f3)
| * ctdbd: Remove incomplete ctdb_db_statistics_wire structureAmitay Isaacs2013-07-293-47/+21
| | | | | | | | | | | | | | | | | | Instead of maintaining another structure, add an element as place holder for marshall buffer of hot keys. This avoids duplication of the structure. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit e73b2e12adc9db1dedb48d32bba3a8406a80f4cd)
| * Revert "ctdbd: Remove incomplete ctdb_db_statistics_wire structure"Amitay Isaacs2013-07-295-16/+95
| | | | | | | | | | | | | | | | | | | | | | The structure cannot be removed without adding support for marshalling keys for hot records. This reverts commit 26a4653df594d351ca0dc1bd5f5b2f5b0eb0a9a5. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 023ca2e84f5ed064a288526b9c2bc7e06674dd81)
| * doc: Update XML files to use standard DocBook DTDMartin Schwenke2013-07-295-5/+15
| | | | | | | | | | | | | | | | | | This simplifies building since we don't use any of the Samba extensions. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 57aa2dffea60abd73a95233f8b761cc676adebb6)
| * initscript: The wrapper script should export CTDB_SOCKETMartin Schwenke2013-07-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that any invocation of the ctdb tool (within the wrapper) gets the desired value. This at least ensures that ctdbd will be started. If a non-standard value is set for CTDB_SOCKET then command-line users will still need the variable in their environment. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 37ccc7c6cc43a80aaa92291aea7a438f4225488a)
| * ctdbd: Kill client process without checking for tracked childMartin Schwenke2013-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | Commit f73a4b1495830bcdd094a93732a89dd53b3c2f78 added a safety check to ensure that CTDB never kills unrelated processes. However, client processes are unrelated. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 782814288bb560099ee44b607bf35f3eddf37f82)
| * eventscripts: kill_tcp_connections() should send connections to stdinMartin Schwenke2013-07-296-11/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids issuing multiple "ctdb killtcp" commands to terminate tcp connections, one per connection. This will considerably reduce the time when there is a large number of tcp connections. This also makes it possible to avoid calling "ctdb killtcp" when there are no connections. Add a couple of unit tests for killtcp and update eventscript unit test infrastructure to support. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit a20d94717d2e4ab866d8a002cdf39c0669b74c6a)