diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-12-21 08:33:55 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-01-20 11:11:01 +0100 |
commit | 98ee69c66df3192298080b38618284b9d64ca0f7 (patch) | |
tree | 1b6fc8f98dbe6d8215483e608e35e8aa04e7eca0 /ctdb | |
parent | 50bff8c8865cb82c28459bc4d1aea574b21983c4 (diff) | |
download | samba-98ee69c66df3192298080b38618284b9d64ca0f7.tar.gz samba-98ee69c66df3192298080b38618284b9d64ca0f7.tar.xz samba-98ee69c66df3192298080b38618284b9d64ca0f7.zip |
server: add updateip event
metze
(This used to be ctdb commit 712ed0c4c0bff1be9e96a54b62512787a4aa6259)
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/common/ctdb_util.c | 3 | ||||
-rw-r--r-- | ctdb/config/events.d/README | 8 | ||||
-rw-r--r-- | ctdb/include/ctdb.h | 1 | ||||
-rw-r--r-- | ctdb/server/eventscript.c | 3 |
4 files changed, 14 insertions, 1 deletions
diff --git a/ctdb/common/ctdb_util.c b/ctdb/common/ctdb_util.c index efc22de791f..5b31418e9ce 100644 --- a/ctdb/common/ctdb_util.c +++ b/ctdb/common/ctdb_util.c @@ -669,5 +669,6 @@ const char *ctdb_eventscript_call_names[] = { "monitor", "status", "shutdown", - "reload" + "reload", + "updateip" }; diff --git a/ctdb/config/events.d/README b/ctdb/config/events.d/README index b783efe4f55..f7b476ceda6 100644 --- a/ctdb/config/events.d/README +++ b/ctdb/config/events.d/README @@ -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. diff --git a/ctdb/include/ctdb.h b/ctdb/include/ctdb.h index 4b2a002b302..9924acf8562 100644 --- a/ctdb/include/ctdb.h +++ b/ctdb/include/ctdb.h @@ -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 }; diff --git a/ctdb/server/eventscript.c b/ctdb/server/eventscript.c index 56e1af50a64..36d87170d2d 100644 --- a/ctdb/server/eventscript.c +++ b/ctdb/server/eventscript.c @@ -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; |