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

3988 Commits

Author SHA1 Message Date
Amitay Isaacs
2119438496 tests/tool: Fix the nodestatus test
Although not obvious, when asking each node for nodestatus, it will report
each node is the current node.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 261258c1a4268230b2559bc5d8664b1197b22450)
2012-04-13 12:06:59 +10:00
Ronnie Sahlberg
7698a5105e Add test for NoIPTakeover
(This used to be ctdb commit 79172330d10ae0d5a7e5bf724959c9e5784716b4)
2012-04-12 10:31:17 +10:00
Ronnie Sahlberg
0cc3127beb CTDB: add back the "rebalanceip" command
(This used to be ctdb commit 83aea6488002aa75dd25752fa0d164afb8b4f300)
2012-04-03 13:43:21 +10:00
Amitay Isaacs
d2be927389 build: Substitute POPT macros once and reuse variables
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit a2ba2c4ec153c8844cf7f5b0de03b2269ec892f3)
2012-03-30 12:33:28 +11:00
Amitay Isaacs
e2d83970e9 recovery: Add prototypes for tdb internal functions
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 98ac99c4a79fe2ee024890bb27c3ca68dc02d434)
2012-03-30 12:33:28 +11:00
Amitay Isaacs
634bbc5469 build: Use system tdb library if available
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 10ab88a5c822ac403a70a9cd1a6c81020eb91d08)
2012-03-30 12:33:28 +11:00
Amitay Isaacs
13124e356e build: Use system tevent library if available
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 2ade83de4e1f318c91489ec9a7f90d1b26f77e1b)
2012-03-30 12:33:28 +11:00
Amitay Isaacs
89415a1f00 build: Use system talloc library if available
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 94f1e02406c353c3a0235685acdd107ee5a7f285)
2012-03-30 12:33:27 +11:00
Amitay Isaacs
25d01ece07 build: Display correct LIB_FLAGS while building
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 0cbe7a4f92795203f022252a50a240b8bd4238c3)
2012-03-30 12:33:27 +11:00
Amitay Isaacs
858d8dc571 build: Remove re-definition of same variable
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 36e690faab3d76919780c8550fe6d49fb6bbfba5)
2012-03-30 12:33:27 +11:00
Amitay Isaacs
cf41acf500 packaging: Setup directories for rpmbuild
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 45773dab630ee44b39df0dd4b50f43fb1e7bb0ba)
2012-03-30 12:33:21 +11:00
Amitay Isaacs
da7a1ccb81 build: Add rules to create ctags/etags
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit a9e9444a7a78f5ef0e929a8dbd8ca0c68b40acd4)
2012-03-30 12:32:05 +11:00
Martin Schwenke
a3ee4a900f Initscript - add backup of corrupt non-persistent databases
Corrupt non-persistent databases never get analysed because ctdbd
zeroes them at startup.

Modify the initscript so that corrupt non-persistent databases are
moved aside to a backup.  If the number of backups for a particular
database exceeds $CTDB_MAX_CORRUPT_DB_BACKUPS (default 10) then the
oldest excess backups are garbage collected.

Abstracts from and cleans up the code for checking persistent
databases.

Logging of related messages is done to syslog or a log file as
specified.

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

(This used to be ctdb commit 00cd75595685dae829758abf1a4cb644af7ed50e)
2012-03-28 15:02:07 +11:00
Martin Schwenke
081a8ec403 Add policy routing documentation to ctdbd(1).
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 5cdeb0dd8827b13b06265c75dfac359bcd6ad10c)
2012-03-23 14:36:18 +11:00
Ronnie Sahlberg
6bb0115ce5 Merge remote branch 'martins/policy_routing'
(This used to be ctdb commit 7293762046e25a9c96e6417e34e18c214ebc6e55)
2012-03-22 15:39:59 +11:00
Martin Schwenke
fbe64dec01 Undo damage done by d8d37493478a26c5f1809a5f3df89ffd6e149281
The implementation of DisableIPFailover got intermingled with
--nopublicipcheck.  This just looks wrong - Ronnie must have been
having a bad day.  :-)

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

(This used to be ctdb commit 5083b266dd68b292c4275505f3d1b878dbf12f11)
2012-03-22 15:34:52 +11:00
Martin Schwenke
8d328920db Tests - eventscripts - initial policy routing tests
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 7d7488a49bc7e799f39f3da3fa81be7a2e14480a)
2012-03-22 15:30:27 +11:00
Martin Schwenke
c0931a0cde Tests - eventscripts - new function simple_test_command()
Allows running arbitrary command and comparing output against
expected.

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

(This used to be ctdb commit da2e9650a97f99e7d694659926d9958927edd8ad)
2012-03-22 15:30:27 +11:00
Martin Schwenke
2f312355c7 Tests - eventscripts - change summary columns
To accommodate 13.per_ip-routing in output.

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

(This used to be ctdb commit 0142729c96b8bfecfabe35439071557bcc6ed4da)
2012-03-22 15:30:27 +11:00
Martin Schwenke
746d116649 Tests - eventscripts - rationalise CTDB fakery support
Remove functions for marking nodes as down/up.  This is now done via
ctdb disable/enable in the stub.

Also more consistent temporary directory use.

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

(This used to be ctdb commit 1db9a533aacc6e02ddbadf76241429144a949e1c)
2012-03-22 15:30:27 +11:00
Martin Schwenke
42400a155b Tests - eventscripts - improved support functions for handling public IPs
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 299ce89fb3deeefcc7c01b20197dc6adee1e8194)
2012-03-22 15:30:27 +11:00
Martin Schwenke
f8a1273fc1 Tests - eventscripts - add support functions for policy routing testing
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 79eec235ac9b051333751186c32924d92e6ebeff)
2012-03-22 15:30:27 +11:00
Martin Schwenke
ad6a519b2d Update .gitignore for eventscript testing fu.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 0fc20ab5207d4f812bf62b90a66c707f76742f84)
2012-03-22 15:30:27 +11:00
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