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

server: add updateip event

metze

(This used to be ctdb commit 712ed0c4c0bff1be9e96a54b62512787a4aa6259)
This commit is contained in:
Stefan Metzmacher 2009-12-21 08:33:55 +01:00
parent 50bff8c886
commit 98ee69c66d
4 changed files with 14 additions and 1 deletions

View File

@ -669,5 +669,6 @@ const char *ctdb_eventscript_call_names[] = {
"monitor",
"status",
"shutdown",
"reload"
"reload",
"updateip"
};

View File

@ -114,6 +114,14 @@ releaseip
Example: 60.nfs
updateip
This event is triggered everytime the node moves a public ip
address between interfaces
This event takes four additional arguments :
'old-interface' 'new-interface' 'ipaddress' and 'netmask'
Example: 10.interface
startrecovery
This event is triggered everytime we start a recovery process
or before we start changing ip address allocations.

View File

@ -690,6 +690,7 @@ enum ctdb_eventscript_call {
CTDB_EVENT_STATUS, /* Report service status: no args. */
CTDB_EVENT_SHUTDOWN, /* CTDB shutting down: no args. */
CTDB_EVENT_RELOAD, /* magic */
CTDB_EVENT_UPDATE_IP, /* IP updating: old interface, new interface, IP address, netmask bits. */
CTDB_EVENT_MAX
};

View File

@ -604,6 +604,9 @@ static bool check_options(enum ctdb_eventscript_call call, const char *options)
case CTDB_EVENT_RELEASE_IP:
return count_words(options) == 3;
case CTDB_EVENT_UPDATE_IP: /* old interface, new interface, IP address, netmask bits. */
return count_words(options) == 4;
default:
DEBUG(DEBUG_ERR,(__location__ "Unknown ctdb_eventscript_call %u\n", call));
return false;