summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * recoverd: verify_local_ip_allocation() should dup ifaces before early returnMartin Schwenke2012-08-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If CTDB starts in STOPPED state then it thinks it is in the middle of a recovery. rec->ifaces is also NULL and an early exit further down (that checks to see if a recovery is in process) means that it stays that way. However, each time this function is entered the need for a takeover run is re-flagged. The takeover run never happens due to the the early exit, causing a couple of unneeded messages to be logged each time. This is avoided by moving the code that sets rec->ifaces so that it is executed earlier and, in this case, in the middle of a recovery. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f586e8a2911fc6e7f6698f516653145d8fd45dad)
| * recoverd: Update a log message that has bit-rottedMartin Schwenke2012-08-081-3/+8
| | | | | | | | | | | | | | | | | | | | This message used to be correct because the ipreallocated event only handled updating the NAT gateway. However, that has changed so the message needs to be updated. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit cc9d96f4248e45ea99c5f00db1526426ac26fbc2)
| * recoverd: Fix bogus info in message about changed flagsMartin Schwenke2012-08-081-1/+1
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 9119a568c2b4601318f7751f537dca2f92a7230b)
| * tests/eventscripts: Extra cases for policy routing missing config testMartin Schwenke2012-07-301-2/+5
| | | | | | | | | | | | | | | | Test the startup and monitor events too. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c29a943f9bbcfecb861e71d007c7698a53dc8773)
| * Eventscripts: 13.per_ip_routing should always fail if config is missingMartin Schwenke2012-07-301-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if the configuration file is specified by $CTDB_PER_IP_ROUTING_CONF but is missing, takeip fails but (the absent) monitor event "succeeds", so the state of a node will flip-flop. Instead of this, if the configuration file is missing then fail early on for all events. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c64c6c77c3f6aa2898e5a575547b587bea868c76)
| * Revert "Eventscripts - make 13.per_ip_routing fail gracefully if config is ↵Martin Schwenke2012-07-301-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | missing" When the configuration file is missing this causes the node to flip-flop betwen unhealthy (when takeip fails) and healthy (no monitor event here). Will reimplement this properly. This reverts commit 351ca413eec460330571ca8b01ad269728fe15df. (This used to be ctdb commit 5277d749c9111716fd723647d5421907476422bf)
| * ctdb tool: recmaster command might as well be auto-allMartin Schwenke2012-07-301-1/+1
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 076282622fcb2663d378e0c90ed0d9c19f73c005)
| * doc: Document the new onnode -P optionMartin Schwenke2012-07-303-14/+42
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit fa0f3cba5adaa38bed37dd8b121ad53e962a010d)
| * tools/onnode: Add -P option to push files to given nodesMartin Schwenke2012-07-301-13/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A list of files is given rather than a command. These files are pushed to the specified nodes. Quoting is fragile/broken so filenames with spaces won't work - you win some, you lose some. :-) All of the other onnode options should work together with this option. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit aed9b98ddbbf3e81de4f7257a10676565f7d7507)
| * Eventscripts: Clean up 11.routingMartin Schwenke2012-07-301-9/+8
| | | | | | | | | | | | | | | | | | | | The loops can all be done without cat or grep. The pair of loops in updateip is combined into a single loop. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 96fdda124f5511fb76190e7c7a7f0b98e6b01a31)
| * ctdbd: Log a meaningful message if the nodes file/list is emptyMartin Schwenke2012-07-261-0/+9
| | | | | | | | | | | | | | | | | | Right now the message says it can't bind to any of the addresses... even when there aren't any! Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 553455b386aa7848a516a921dfc14eb87c8a3fc1)
| * ctdbd: Remove the worked "Forced" from message about running eventscriptsMartin Schwenke2012-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | The eventscripts are run after a takeover run and in this case they're not forced. The messages seems to imply that somone has run "ctdb eventscript" when that is not necessarily the case. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 3880589db4d563e438126cf5080261fa06b9e242)
| * ctdbd: Fix ctdb_control_release_ip() on local daemonsMartin Schwenke2012-07-261-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running on local daemons no IPs are actually assigned to interfaces. Commit 9a806dec8687e2ec08a308853b61af6aed5e5d1e broke ctdb_control_release_ip() for local daemons because it asks the system which interface the given IP is on, instead of the old behaviour of trusting CTDB's internal records. For local deamons (i.e. !ctdb->do_checkpublicip) revert to the old behaviour of looking up the interface internally. This is good enough, given that the tests don't tend to misconfigure the addresses. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 38e8651b955afdbaf0ae87c24c55c052f8209290)
| * Initscript: clean up drop_all_public_ips()Martin Schwenke2012-07-261-7/+3
| | | | | | | | | | | | | | | | | | This makes the case implicit where $CTDB_PUBLIC_ADDRESSES is unset. This is OK because that's not an interesting code path. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 5b2725d1ae052e848c2487cb10c5393a877d118c)
| * tests/tool: Run ctdb_tool_* under $VALGRINDMartin Schwenke2012-07-261-1/+1
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 6616a5712b5d4db2b9ba6a88cec79378696c2184)
| * tests/eventscripts: Rewrite the testparm stubMartin Schwenke2012-07-261-8/+23
| | | | | | | | | | | | | | | | | | | | It currently needs the real testparm command installed even though it only uses limited features. It is easy enough to fake up the functionality that 50.samba uses. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 7ef9916bd95ff2472359a412eac5489f1aad2dce)
| * tests/complex: Fix broken ctdb_test_check_real_cluster()Martin Schwenke2012-07-261-0/+3
| | | | | | | | | | | | | | | | It doesn't set $h at all... Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 3f268805c14c51f23024267916eae161bada8a0e)
| * tests/simple: ctdb stop/continue tests weren't actually checking IPsMartin Schwenke2012-07-262-2/+2
| | | | | | | | | | | | | | | | The correct variable is $test_node_ips, not $ips. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 8d17dacee415dd0b4268805a366a86f83e33f27c)
| * tests: select_test_node_and_ips() should try to avoid failingMartin Schwenke2012-07-261-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | Sometimes "ctdb sync" doesn't do its job, so we end up with unassigned IPs. If $test_node isn't set then this is bad. However, try a few times to ensure it is set. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 2fd0157382b42aa5c5212b8e743c6f589edc6662)
| * tests: simple tests against local daemons should check $TEST_LOCAL_DEAMONSMartin Schwenke2012-07-263-4/+4
| | | | | | | | | | | | | | | | Note the old $CTDB_TEST_REAL_CLUSTER - it doesn't exist anymore... Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 47180dc75d15f3d61470705603565b718491c9f8)
| * tests: run_tests should exit with $status with -e optionMartin Schwenke2012-07-261-1/+1
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 619af3e857c2ced3840abfd86135cc954796da97)
| * tests/simple: ctdb reloadips test should use $test_ipMartin Schwenke2012-07-261-6/+5
| | | | | | | | | | | | | | | | There's no point recalculating this value. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 6e7bd9685406ae024d413a5d9d8c6e0d89b15567)
| * tests: select_test_node_and_ips() should never select non-node -1Martin Schwenke2012-07-261-5/+4
| | | | | | | | | | | | | | | | Instead of selecting the 1st pnn found, select the 1st one that isn't -1. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f02e501342112aab67aee95f253e29a670b29273)
| * util: Do not lock down memory when running with local daemonsAmitay Isaacs2012-07-261-1/+6
| | | | | | | | | | | | | | | | | | Thanks to Ronnie for highlighting the issue of memory lockdown on AIX. Fix typo, use getuid and not getpid. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 21a5cbf9518fafc610939f14874371a52b1dc8b3)
| * statd-callout: Fix a bug in the calculations of $STATEMartin Schwenke2012-07-261-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | It is just meant to be even, so divided *and* multiplied by 2. Use $(( )) to make it more readable. While touching this code, make the related calculation a bit more readable too. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 25d45e69f4ffc2b26061ac13038d52a353e79e61)
| * Eventscripts: Default route on NAT gateway should have a metric of 10Martin Schwenke2012-07-264-91/+99
| | | | | | | | | | | | | | | | | | | | | | | | At the moment routes from 11.routing can fail to be added because they conflict with the default route added by 11.natgw. NAT gateway is meant to be a last resort, so routes from 11.routing should override it. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 624f4677e99ed1710a0ace76201150349b1a0335)
| * Eventscripts: Update/remove stale comments in 11.natgwMartin Schwenke2012-07-261-7/+2
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 5d713d5e5be67f5914a661694c15d938bd67dea3)
| * Eventscripts: Retrieve and build NAT gateway details better in 11.natgwMartin Schwenke2012-07-261-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * "ctdb natgw" is run twice when it doesn't need to be. * Tweak the parsing of "ctdb natgw" output so that it is done by the shell instead of a bunch of external processes. * Make default NAT gateway be -1, even on error. If the process failed entirely then it could previously be empty. * Streamline the error handling using die() for when there is no NAT gateway. * Downcase script-local variable names. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 630cfe6451ba23d959fa4907fbba42702337ed3b)
| * Eventscripts: Optimise building the host address in 11.natgwMartin Schwenke2012-07-261-3/+3
| | | | | | | | | | | | | | | | | | | | It can be build without forking unnecessary processes. Also downcase variable name because it is local to script. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 34f58a0773618c4508a55ad75fc4602dad5a5f4c)
| * Eventscripts: Clean up startup sanity check in 11.natgwMartin Schwenke2012-07-261-8/+3
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f6e421e8bf935cae790a6dc2b861eb9c7f8610b4)
| * Eventscripts: remove redundant firewall rules from 11.natgwMartin Schwenke2012-07-261-7/+0
| | | | | | | | | | | | | | | | | | | | | | aeb70c7e7822854eb87873a5c7783e27e6e72318 said it moved these but it redundantly duplicated them instead. That commit also fixed the problem because it moved the rules after delete_all() not out of the startup event as claimed. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 07149edaecb3caa672163e5a3b89715557d5205a)
| * Eventscripts: 11.natgw $CTDB_NATGW_PUBLIC_IP splitting optimisationMartin Schwenke2012-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | $CTDB_NATGW_PUBLIC_IP can be split into $_ip and $_maskbits without forking lots of processes. Also "local" isn't supported by POSIX. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit e20fdb974158061f4627d6f360c168d764690e6f)
| * web: Add my name to the developer list.Amitay Isaacs2012-07-241-0/+1
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit b3e798f357606648f04d8a67ffee775b34fdede7)
| * Remove tevent_loop_allow_nesting()Amitay Isaacs2012-07-162-2/+0
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 538c68d0e83e14f0000981ee06408b8f0035be37)
| * ctdbd: Return explicit boolean values for function returning boolAmitay Isaacs2012-07-162-2/+2
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 3de2830ae68241ee95bcc14dc1bb896ff18d86ce)
| * util: Do not try to lockdown memory when running in local daemons modeAmitay Isaacs2012-07-161-1/+6
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 25f84797a64a683c303b04057aa8113e9fc47c49)
| * Fix compiler warnings.Amitay Isaacs2012-07-132-2/+2
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit d29e1880c8ce7219e065d31b47b0e8ad9e83146d)
| * run_tests: improve spacingMichael Adam2012-07-031-1/+2
| | | | | | | | (This used to be ctdb commit a0a0f5588445aeabe07b0e4d65087db454dc09da)
| * run_tests.sh: fix a commentMichael Adam2012-07-031-1/+1
| | | | | | | | (This used to be ctdb commit 0e515115b3c21cb179fd7a6356164ac1b5d423e0)
| * ctdb: use correct "persistent" state for ctdb_attach in "ctdb cattdb"Michael Adam2012-07-031-1/+1
| | | | | | | | | | | | | | | | | | Originally, "ctdb cattdb" attached explicitly as non-persistent, which is now forbidden for persistent databases by the server. Pair-Programmed-With: Gregor Beck <gbeck@sernet.de> (This used to be ctdb commit 85a367005bd669309bb7e532b60d27621110180d)
| * ctdbd: refuse attaching with "persistent" to a non-persistent db and v.v.Gregor Beck2012-07-031-0/+6
| | | | | | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit 1ebbaa620b3cfb9ff373828e4aaa84246cf3ec25)
| * When we find an ip we shouldnt host, just release itRonnie Sahlberg2012-06-201-2/+6
| | | | | | | | | | | | Dont call a full blown clusterwide ipreallocation, just release it locally (This used to be ctdb commit 9a806dec8687e2ec08a308853b61af6aed5e5d1e)
| * When we release an ip, get the interface name from the kernelRonnie Sahlberg2012-06-201-13/+9
| | | | | | | | | | | | | | | | instead of using the interface where ctdb thinks the ip is hosted at. The difference is that this now allows us to handle cases where we want to release an ip but ctdbd does not know which interface the ip is assigned on. (user has used 'ip addr add...' and manually assigned an ip to the wrong interface) (This used to be ctdb commit c6bf22ba5c01001b7febed73dd16a03bd3fd2bed)
| * Add new command to find which interface is located onRonnie Sahlberg2012-06-203-0/+105
| | | | | | | | (This used to be ctdb commit f07376309e70f5ccdb7de8453caacc71b451ab48)
| * STATISTICS: Add tracking of the 10 hottest keys per database measured in ↵Ronnie Sahlberg2012-06-135-7/+144
| | | | | | | | | | | | | | | | hopcount and add mechanisms to dump it using the ctdb dbstatistics command (This used to be ctdb commit 8307c70ed98996b430c470e9641a09fdeeb81bd8)
| * Reimplement logging of long running eventsMartin Schwenke2012-06-121-0/+46
| | | | | | | | | | | | | | | | | | Reimplement 5aba53e6adcfcd7edbdac9e30aa5fcba176aca00 using tevent trace points. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 98e1b46adba11b9549b5c5976e1f561fe732fa6e)
| * tevent: change version to 0.9.16Stefan Metzmacher2012-06-121-0/+82
| | | | | | | | | | | | | | | | | | | | | | This adds tevent_*_trace_*() and tevent_context_init_ops() metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Jun 8 20:47:41 CEST 2012 on sn-devel-104 (This used to be ctdb commit 0dc204988eadff214dd149a756d756ab6e96e410)
| * tevent: expose tevent_context_init_opsStefan Metzmacher2012-06-122-3/+19
| | | | | | | | | | | | | | | | | | | | This can be used to implement wrapper backends, while passing a private pointer to the backens init function via ev->additional_data. metze (This used to be ctdb commit 7ebc00dc6a89043a971a720e7c21baf5f2a0233d)
| * lib/tevent: Add trace point callbackMartin Schwenke2012-06-127-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Set/get a single callback function to be invoked at various trace points. Define "before wait" and "after wait" trace points - more trace points can be added later if required. CTDB wants this to log long waits and events. Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Martin Schwenke <martin@meltin.net> Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit cb2bbe93628c1ab932c2e1ad6e2ec199a98f74c6)
| * Revert "TEVENT: Add back tracking of long runnig events to the local copy ↵Martin Schwenke2012-06-125-66/+0
| | | | | | | | | | | | | | | | | | | | of tevent library" This reverts commit 5aba53e6adcfcd7edbdac9e30aa5fcba176aca00. Do this using new tevent trace point callback. (This used to be ctdb commit 88040778aace229d724de1ba7556aded12e22f86)