diff options
| author | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2009-07-09 12:22:46 +1000 |
|---|---|---|
| committer | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2009-07-09 12:22:46 +1000 |
| commit | 88f3c40d9cecdfc592a9d0bd2c181fdea0c5acdf (patch) | |
| tree | 67c4f1a1734147c2724c11f365a2efd57b095a8c /ctdb/include | |
| parent | 66c8d4fb3dbd68f3db4ef542bddf1062da2373e7 (diff) | |
add two new controls, CTOP_NODE and CONTINUE_NODE
that are used to stop/continue a node instead of using modflags messages
(This used to be ctdb commit 54b4a02053a0f98f8c424e7f658890254023d39a)
Diffstat (limited to 'ctdb/include')
| -rw-r--r-- | ctdb/include/ctdb.h | 2 | ||||
| -rw-r--r-- | ctdb/include/ctdb_private.h | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/ctdb/include/ctdb.h b/ctdb/include/ctdb.h index c410923fa9..ebe40c302c 100644 --- a/ctdb/include/ctdb.h +++ b/ctdb/include/ctdb.h @@ -658,5 +658,7 @@ extern struct debug_levels debug_levels[]; const char *get_debug_by_level(int32_t level); int32_t get_debug_by_desc(const char *desc); +int ctdb_ctrl_stop_node(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode); +int ctdb_ctrl_continue_node(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode); #endif diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 055becaede..25595cffa4 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -199,8 +199,8 @@ struct ctdb_node { #define NODE_FLAGS_BANNED 0x00000008 /* recovery daemon has banned the node */ #define NODE_FLAGS_DELETED 0x00000010 /* this node has been deleted */ #define NODE_FLAGS_STOPPED 0x00000020 /* this node has been stopped */ -#define NODE_FLAGS_DISABLED (NODE_FLAGS_UNHEALTHY|NODE_FLAGS_PERMANENTLY_DISABLED|NODE_FLAGS_STOPPED) -#define NODE_FLAGS_INACTIVE (NODE_FLAGS_DELETED|NODE_FLAGS_DISCONNECTED|NODE_FLAGS_BANNED) +#define NODE_FLAGS_DISABLED (NODE_FLAGS_UNHEALTHY|NODE_FLAGS_PERMANENTLY_DISABLED) +#define NODE_FLAGS_INACTIVE (NODE_FLAGS_DELETED|NODE_FLAGS_DISCONNECTED|NODE_FLAGS_BANNED|NODE_FLAGS_STOPPED) uint32_t flags; /* used by the dead node monitoring */ @@ -571,6 +571,8 @@ enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS = 0, CTDB_CONTROL_RECD_RECLOCK_LATENCY = 98, CTDB_CONTROL_GET_RECLOCK_FILE = 99, CTDB_CONTROL_SET_RECLOCK_FILE = 100, + CTDB_CONTROL_STOP_NODE = 101, + CTDB_CONTROL_CONTINUE_NODE = 102, }; /* @@ -1443,4 +1445,7 @@ int32_t ctdb_control_get_event_script_status(struct ctdb_context *ctdb, TDB_DATA int ctdb_log_event_script_output(struct ctdb_context *ctdb, char *str, uint16_t len); int ctdb_ctrl_report_recd_lock_latency(struct ctdb_context *ctdb, struct timeval timeout, double latency); +int32_t ctdb_control_stop_node(struct ctdb_context *ctdb); +int32_t ctdb_control_continue_node(struct ctdb_context *ctdb); + #endif |
