DOC: Document the MaxLACount tunable variable

(This used to be ctdb commit cf96d6380de974c1abff7a33c62a7e31ac980551)
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)
STICKY   document the sticky record parameters

(This used to be ctdb commit e6a8306257dece02313043274789b52cef1a5647)
DOC  regenerate the manpage

(This used to be ctdb commit 0ae2a46e37df8d84ce0c76b7a5d32d6e93af709b)
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)
NoIPFailback: Exclude nodes which have NoIPFailback as failback targets during reallocation

(This used to be ctdb commit c262c29773d1608e7ce04bdfb7f4469df0a9637b)
NoIPTakeover: change the tunable name for the "dont allow failing addresses over onto the node" to NoIPTakeover

(This used to be ctdb commit 35592e618cfd827b6978af6332f80504f232c46a)
DOC: regenerate manpages

(This used to be ctdb commit 270edc87e6bcfd6e76c526bf86df865e4d47d11c)
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)
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)
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)
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)
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)
Eventscript support - Remove unused interface_modify.sh

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

(This used to be ctdb commit 994492f79275fe84155d842f6bc288c1858217dd)
Eventscript tests - make error message consistent with recent change

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

(This used to be ctdb commit f4949b3c1b36949544e98c9fbb64447f94f9e432)
Eventscript tests - make ip command stub vaguely maintainable

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

(This used to be ctdb commit 8b8e17bea87a8c16f7c0f54fcfe29190f203f673)
Eventscript tests - implement ip rule in stub

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

(This used to be ctdb commit 26292f362890ca6cb65d0028d50fa97458e0449f)
Eventscript tests - implement ip route in stub

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

(This used to be ctdb commit ac2cd2a8cbed97348ceae54167ad83cb074ff6b3)
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)
Eventscripts - use set_proc() rather than accessing /proc directly

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

(This used to be ctdb commit bdb4cdaf2aed79c8de6a8db8c01685b242808310)