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

ctdb-daemon: Implement startipreallocate event

Signed-off-by: Vinit Agnihotri <vagnihotri@ddn.com>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
Vinit Agnihotri 2023-10-25 04:29:33 -07:00 committed by Volker Lendecke
parent 786adccaa9
commit d97e642ba8
2 changed files with 12 additions and 0 deletions

View File

@ -137,6 +137,16 @@ takeip <interface> <ip-address> <netmask-bits>
that public IP addresses have changed so that service
reconfiguration will occur in the "ipreallocated" event.
startipreallocate
This event is triggered on all nodes before ip address is
released on node. This can be used to perform action needed
to complete before ip is given away to other node.
Example: 60.nfs would use this event to put nfs-ganesha server
on all nodes in grace period so that locks can be reclaimed
safely in lock reclaim phase.
releaseip <interface> <ip-address> <netmask-bits>
This event is triggered for each public IP address released by

View File

@ -714,6 +714,7 @@ static bool check_options(enum ctdb_event call, const char *options)
case CTDB_EVENT_MONITOR:
case CTDB_EVENT_SHUTDOWN:
case CTDB_EVENT_IPREALLOCATED:
case CTDB_EVENT_START_IPREALLOCATE:
return count_words(options) == 0;
case CTDB_EVENT_TAKE_IP: /* interface, IP address, netmask bits. */
@ -739,6 +740,7 @@ static bool event_allowed_during_recovery(enum ctdb_event event)
CTDB_EVENT_SHUTDOWN,
CTDB_EVENT_RELEASE_IP,
CTDB_EVENT_IPREALLOCATED,
CTDB_EVENT_START_IPREALLOCATE,
};
size_t i;