ctdb-docs: Update documentation of ipreallocated event
authorMartin Schwenke <martin@meltin.net>
Wed, 12 Jul 2017 02:22:10 +0000 (12:22 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 13 Jul 2017 15:57:11 +0000 (17:57 +0200)
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

ctdb/config/events.d/README

index 11da7028be9e6e1c0fb8327106dcc27b5f99d1df..36f94bb8d35aa9523f8e2b026b0058290cd5b93d 100644 (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.