1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

ctdb-docs: Update documentation of ipreallocated event

This was out of date due to the removal of service_check_reconfigure()
and similar.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Thu Jul 13 17:57:11 CEST 2017 on sn-devel-144
This commit is contained in:
Martin Schwenke 2017-07-12 12:22:10 +10:00 committed by Amitay Isaacs
parent 3e85cbfd75
commit 4e68d377a7

View File

@ -159,33 +159,32 @@ updateip <old-interface> <new-interface> <ip-address> <netmask-bits>
ipreallocated
This event is triggered after "releaseip", "takeip" and
"updateip" events during public IP address (re)assignment.
This event is triggered on all nodes as the last step of
public IP address (re)assignment. It is unconditionally
triggered after any "releaseip", "takeip" and "updateip"
events, even though these events may not run on some nodes if
there are no relevant changes. That is, the "ipreallocated"
event is triggered unconditionally, even on nodes where public
IP addresses assignements have not changed.
This event is used to reconfigure services.
This event runs even if public IP addresses on a node have not
been changed. This allows reconfiguration to depend on the
states of other nodes rather that just IP addresses.
Since "ipreallocated" is always run, this allows
reconfiguration to depend on the states of other nodes rather
that just IP addresses.
Example: 11.natgw recalculates the NAT gateway master and
updates the relevant network configuration on each node if the
NAT gateway master has changed.
Additional notes for "takeip", "releaseip", "updateip",
ipreallocated":
"ipreallocated":
* Failure of any of these events causes IP allocation to be retried.
* The "ipreallocated" event is run on all nodes. It is even run if no
"takeip", "releaseip" or "updateip" events were triggered.
* An event script can use ctdb_service_set_reconfigure() in "takeip"
or "releaseip" events to flag that its service needs to be
reconfigured. The event script can then define a
service_reconfigure() function, which will be implicitly run before
the "ipreallocated" event. This is a useful way of performing
reconfiguration that is conditional upon public IP address changes.
This means an explicit "ipreallocated" event handler is usually not
necessary.
* An event script can use ctdb_service_set_reconfigure() in "takeip",
"releaseip" or "updateip" events to flag that its service needs to
be reconfigured. The "ipreallocated" event can then use
ctdb_service_needs_reconfigure() to test if there were public IPs
changes to determine what type of reconfiguration (if any) is
needed.