1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
Commit Graph

4351 Commits

Author SHA1 Message Date
Martin Schwenke
5ecc348072 Tests - eventscripts - fix hardcoding error
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 9c30bf7fd3d94884e27a258571a28dca5e460177)
2012-03-22 15:30:27 +11:00
Martin Schwenke
5afbb43038 Tests - eventscripts - stub ctdb command updates
* Proper IP (re)allocation using ctdbd's IP allocation algorithm.
* Therefore, "ctdb ip" works sensibly.
* Add enable, disable, moveip.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 6d4b4b1293ba960d8fdf81958d6e8dd23c9d771a)
2012-03-22 15:30:27 +11:00
Martin Schwenke
cb0b0e0ae0 Tests - eventscripts - more public IPs in default setup
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 38396185effbcf313678c2e94d4bd20f534c4f03)
2012-03-22 15:30:27 +11:00
Martin Schwenke
52e7a03853 Tests - eventscripts - add -A/-D options
Make it easier to spot differences between desired output and actual
output.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit d132a8f4a8c0573ac447713a71911f02b6f0d73c)
2012-03-22 15:30:27 +11:00
Martin Schwenke
c394b7d065 Tests - eventscripts - ip stub command should print errors to stderr
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 236d572556e447e2d82d14d2c8a40ed8cb98944d)
2012-03-22 15:30:27 +11:00
Martin Schwenke
2f5cb56017 Eventscripts - make 13.per_ip_routing fail gracefully if config is missing
Currently it spews out random messages about the file being missing.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 351ca413eec460330571ca8b01ad269728fe15df)
2012-03-22 15:30:27 +11:00
Martin Schwenke
ac973b34df Eventscripts - make 13.per_ip_routing try harder to find public_addresses
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit d4621277240721e6d130a930b0100506b64467ea)
2012-03-22 15:30:27 +11:00
Martin Schwenke
020c8190c5 Eventscripts - use set_proc() rather than accessing /proc directly
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit bdb4cdaf2aed79c8de6a8db8c01685b242808310)
2012-03-22 15:30:27 +11:00
Martin Schwenke
4f65737809 Eventscripts - 13.per_ip_routing should use dirname not basename for mkdir
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit d034845ecea66b47004bc73f2554914a397b1c9d)
2012-03-22 15:30:27 +11:00
Martin Schwenke
6e260553f5 Eventscript tests - implement ip route in stub
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit ac2cd2a8cbed97348ceae54167ad83cb074ff6b3)
2012-03-22 15:30:27 +11:00
Martin Schwenke
d0f25b3c37 Eventscript tests - implement ip rule in stub
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 26292f362890ca6cb65d0028d50fa97458e0449f)
2012-03-22 15:30:27 +11:00
Martin Schwenke
60b5ff0e4b Eventscript tests - make ip command stub vaguely maintainable
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 8b8e17bea87a8c16f7c0f54fcfe29190f203f673)
2012-03-22 15:30:27 +11:00
Martin Schwenke
3b024ab2bd Eventscript tests - make error message consistent with recent change
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit f4949b3c1b36949544e98c9fbb64447f94f9e432)
2012-03-22 15:30:27 +11:00
Martin Schwenke
56d90e930d Eventscript support - Remove unused interface_modify.sh
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 994492f79275fe84155d842f6bc288c1858217dd)
2012-03-22 15:30:27 +11:00
Martin Schwenke
476cf45049 Eventscript functions - no longer require interface_modify.sh
Make add_ip_to_iface() and delete_ip_from_iface() do their own locking
so the external script is no longer required.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 93f90caf91246074d9359bf31a39b26212cccc42)
2012-03-22 15:30:27 +11:00
Martin Schwenke
0b2c3d7d24 Eventscript functions - remove now-unused route/IP re-add script logic
This is no longer used by 13.per_ip_routing or anything else.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 2a2ea6c61a05af2d0765e964abcc7ef04047431e)
2012-03-22 15:30:26 +11:00
Martin Schwenke
940efdb8e9 Eventscript functions - remove functions only used by 13.per_ip_routing
The relevant functions are now in that script.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 45c3476d12bf0f52966b72d286f101fce1382cd2)
2012-03-22 15:30:26 +11:00
Martin Schwenke
95e10b20cb Eventscripts - redesign and rewrite 13.per_ip_routing
The current version is quite difficult to read.  This one is hopefully
clearer.

Major changes:

* The configuration file has a more forgiving syntax.  Items can be
  separated by arbitrary whitespace.

* Mappings between IP addresses and table IDs are no longer stored in
  files in a state directory.  Instead they are stored in
  /etc/iproute2/rt_tables as mappings between table IDs and labels, as
  allowed by the ip command.  The current structure of the labels is
  ctdb.<source-ip>.  This means that once the labels are setup the
  routing tables can be referenced by just knowing the source IP.  As
  with the old state directory, mappings in this file owned by CTDB
  are deleted when CTDB shuts down.

* There are no release or re-add scripts.

  - Release scripts are not necessary as an optimisation because of
    the previous improvement (i.e. use of rt_tables).  No lookup is
    necessary to delete rules or flush tables.

  - Re-add scripts are no longer used.  Routes can still go missing
    when removal of a primary IP from an interfaces (or similar)
    causes removal of all other addresses (i.e. secondaries) and also
    all associated routes.  However, any missing routes are now
    re-added in the "ipreallocated" event.  This happens shortly after
    takeip/releaseip/updateip and means that the routes will only be
    re-added once.  The window for missing routes is slightly bigger
    but is not expected to be significant.

* The magic "__auto_link_local__" configuration value no longer causes
  a dynamic configuration file to be maintained in a state directory.
  The link local configuration is now generated when needed from the
  public_addresses file.  This greatly simplifies the code.  This
  approach is slightly less efficient but should not be significant.

The above changes mean that, apart from maintaining mappings in the
rt_tables file, there are no state files kept anymore.

Some utility functions only used by this script have been rewritten
and moved into this script.  They will be removed from the functions
file by a future commit.

The route re-add code will also be removed from interface_modify.sh by
a future commit.  It is currently harmless.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 0f7cbbb55f26cf3c953e98fe5e7eaa12f59fbf78)
2012-03-22 15:30:26 +11:00
Martin Schwenke
0d67779c67 Eventscript functions - add new function die()
Args:

1. Error message to be printed.

2. Option exit code (default 1)

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 97b0c138cb97e30db27c40b4ee1481109ae90c78)
2012-03-22 15:30:26 +11:00
Ronnie Sahlberg
430cbcc30b DOC: regenerate manpages
(This used to be ctdb commit 270edc87e6bcfd6e76c526bf86df865e4d47d11c)
2012-03-22 11:05:25 +11:00
Ronnie Sahlberg
2456f77ca6 NoIPTakeover: change the tunable name for the "dont allow failing addresses over onto the node" to NoIPTakeover
(This used to be ctdb commit 35592e618cfd827b6978af6332f80504f232c46a)
2012-03-22 11:05:15 +11:00
Ronnie Sahlberg
9f31f76805 NoIPFailback: Exclude nodes which have NoIPFailback as failback targets during reallocation
(This used to be ctdb commit c262c29773d1608e7ce04bdfb7f4469df0a9637b)
2012-03-22 09:24:32 +11:00
Ronnie Sahlberg
befa9df152 Make NoIPFailback a node local setting. Nodes that have NoIPFailback set to !0 can not takeover new ip addresses during failover.
Remove the old global setting for this unused tunable and add it as a new node flag. This node flag is only valid/defined within the takeover subsystem in the recovery daemon. Add async functions to collec the NoIPFailback settings for each node.

This will later e used to disqualify certain nodes from being takeover targets when we perform reallocation.

(This used to be ctdb commit 668f3e88a9e5f598706952b7140547640c85a5ed)
2012-03-22 09:09:57 +11:00
Ronnie Sahlberg
f4462bf8e7 DOC regenerate the manpage
(This used to be ctdb commit 0ae2a46e37df8d84ce0c76b7a5d32d6e93af709b)
2012-03-20 17:12:35 +11:00
Ronnie Sahlberg
bc9ec181e2 STICKY document the sticky record parameters
(This used to be ctdb commit e6a8306257dece02313043274789b52cef1a5647)
2012-03-20 17:12:27 +11:00
Ronnie Sahlberg
fa3a06246a STICKY: add prototype code to make records stick to a node to "calm" down if they are found to be very hot and accessed by a lot of clients.
This can improve performance and stop clients from having to chase a rapidly migrating/bouncing record

(This used to be ctdb commit d0d98f7e45e5084b81335b004d50bddc80cdc219)
2012-03-20 17:12:19 +11:00
Ronnie Sahlberg
462cdbc5c4 DOC: Document the MaxLACount tunable variable
(This used to be ctdb commit cf96d6380de974c1abff7a33c62a7e31ac980551)
2012-03-20 12:26:32 +11:00
Ronnie Sahlberg
e7e51ddb64 LACOUNT: Add back lacount mechanism to defer migrating a fetched/read copy until after default of 20 consecutive requests from the same node
This can improve performance slightly on certain workloads where smbds frequently read from the same record

(This used to be ctdb commit 035c0d981bde8c0eee8b3f24ba8e2dc817e5b504)
2012-03-20 12:26:22 +11:00
Ronnie Sahlberg
6a493a0b08 STATISTICS: add per-db hop count statistics
(This used to be ctdb commit 1c976d83b1d7dac6f0ef81306774998e4c8b56a1)
2012-03-20 12:11:55 +11:00
Ronnie Sahlberg
c9f7c981e2 CTDB: change how the hop count buckets are displayed in ctdb statistics
(This used to be ctdb commit 05923a14bc8ae8e3c5cda28ff4e0fb0d473d5f7d)
2012-03-20 11:43:09 +11:00
Ronnie Sahlberg
9bc6055af8 DOC document the FetchCollapse tunable
(This used to be ctdb commit c37aa6f3738693653f64c2fa015ace061da38b5a)
2012-03-20 11:39:11 +11:00
Ronnie Sahlberg
c051f67d67 FETCH COLLAPSE : Change the fetch-lock collapse to collapse ALL fetches, including fetch-locks into a single command in flight per record. Also add a tunable to enable/disable this optimization for hot records
(This used to be ctdb commit eafd7bbaaa5931546a96c8beae3cf9a39a49c925)
2012-03-20 11:39:00 +11:00
Ronnie Sahlberg
038c946e80 add max hop count buckets to see how bad hopcounts are
(This used to be ctdb commit 7d3931298e6477d92f43652c3006b0c426cb1307)
2012-03-20 11:20:53 +11:00
Ronnie Sahlberg
b3ddf6901d Merge remote branch 'martins/master'
(This used to be ctdb commit af72f8bc05f78983f9624d81788f9d89af474b11)
2012-03-15 16:09:41 +11:00
Ronnie Sahlberg
f7b2adfde6 Test: add test tool and test that UPDATE_RECORD works on persistent databases
(This used to be ctdb commit f06634951331232cddf0b48eac3552b92aca5b93)
2012-03-12 16:10:09 +11:00
Ronnie Sahlberg
b9e581e720 ReadOnly: Only restrict the readonly sanity/paranoia check that only allows
UPDATE_RECORD to create a record to only apply to normal databases, not
persistent databases or else the net registry command breaks
and other persistent database creation/updates .

(This used to be ctdb commit 68390cb1e8c7f30be034b8ca6c9215b40147305b)
2012-03-12 13:13:51 +11:00
Ronnie Sahlberg
62daab3688 READONLY: when updating a remote node to revoke a delegation, make sure we dont create the record if it doesnt already exist
(This used to be ctdb commit fb00e1290fcea3386132a46c883994019a43799a)
2012-03-02 12:57:23 +11:00
Ronnie Sahlberg
1b97198519 New version 1.13
This will be the new long term stable branch for ctdb

Main new features are

read-only records: performance/scaling improvement for concurrent access to the same record from multiple nodes.

fetch-lock-collapse: performance/scaling improvement for concurrent write access to the same record from multiple nodes.

(This used to be ctdb commit 05e75dea9eaa0decc2909e0c2cf1715c81374200)
2012-03-01 12:36:03 +11:00
Ronnie Sahlberg
6f83805183 READONLY: skip vacuuming or deleting records with readonly delegations.
they are hot. wait until they have been revoked before we recall them.

(This used to be ctdb commit 7417d994c2a159f71d27d4bcd2f53684862eece3)
2012-02-29 16:09:24 +11:00
Ronnie Sahlberg
e086333743 Vacuuming: change default timeout to 120 seconds
(This used to be ctdb commit 5ae94c6b9b3000a6c79fccaaea1e007ebd5be1a9)
2012-02-29 12:29:22 +11:00
Ronnie Sahlberg
f3600276fc Add a tunable variable to control how long we defer after a ctdb addip until we force a rebalance and try to failback addresses onto this node
Have it default to 300 seconds.

(This used to be ctdb commit 49791db7dc74cffd7e88bd73091590cdc1909328)
2012-02-28 06:58:59 +11:00
Ronnie Sahlberg
ef2bd0b016 When adding ips to nodes, set up a deferred rebalance for the whole node to trigger after 60 seconds in case the normal ipreallocated is not sufficient to trigger rebalance.
(This used to be ctdb commit 4340263b219d75c39f8de22abe3f6f1c1ee63ea2)
2012-02-28 06:56:04 +11:00
Ronnie Sahlberg
91c9371f2d Make KILLTCP structure a child of VNN so that it is freed at the same time
the referenced VNN structure is.

Also, remove the circular reference between the two objects KIPPCTP and VNN

(This used to be ctdb commit 02b62482164a3c69715949074feb7f191a29d534)
2012-02-27 07:21:26 +11:00
Ronnie Sahlberg
93ec9c589c Eventscripts: remove the horrible horrible circular reference between state and callback since these two structures do not even share the same parent talloc context.
Instead, tie them together via referencing a permanent linked list hung off the ctdb structure.

(This used to be ctdb commit a95c02da6c67dc4bd8716b75318a4188301df6f9)
2012-02-23 06:49:47 +11:00
Ronnie Sahlberg
94b7a84cb1 change TDB to be valgrind nice
(This used to be ctdb commit d306c3c9a53e012c412c96ab9743de6cd96826e0)
2012-02-22 16:07:17 +11:00
Michael Adam
e62384b1e9 server:update_record: remove some blood stains (trailing spaces...)
(This used to be ctdb commit 0df433496f9c53a2c3759a62ebe355c35caff920)
2012-02-21 17:56:45 +01:00
Michael Adam
28554afc67 server:update_record: make ctdb_childwrite static
(This used to be ctdb commit 400364a1d54404787cff48fb2c30c1b172a8b204)
2012-02-21 17:55:07 +01:00
Michael Adam
55abb07f51 server: move the code for the update_record control to its own file
It is very misleading in ctdb_persistent.c, since it is used for non-persistent
dbs...

(This used to be ctdb commit a956fa3a27106d0154a3fb46987d61c0a6b7c768)
2012-02-21 17:54:17 +01:00
Volker Lendecke
46244f0d50 Fix some documentation typos
Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit 67516f2eaf0b8b0f6aa4ecb0f1c44af53b992fbb)
2012-02-21 10:52:57 +01:00
Ronnie Sahlberg
81fb334cff when shutting down ctdb, allow it 30 seconds instead of 10 before will -9 the daemon
(This used to be ctdb commit d8b400d76665f37ffd9de302eedcff9f23807225)
2012-02-21 19:02:36 +11:00