[SCM] CTDB repository - branch master updated -
ctdb-1.0.59-6-g5747dd2
Ronnie Sahlberg
sahlberg at samba.org
Tue Oct 14 14:29:54 GMT 2008
The branch, master has been updated
via 5747dd2d80af29d6252afb6aeb3e66328ee20de5 (commit)
from d13da2e8fe2fab619540525d98a5502a23ab7d20 (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 5747dd2d80af29d6252afb6aeb3e66328ee20de5
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Wed Oct 15 01:23:57 2008 +1100
verify that the nodes we try to ban/unban are operational and print an
error to the user othervise.
-----------------------------------------------------------------------
Summary of changes:
tools/ctdb.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
Changeset truncated at 500 lines:
diff --git a/tools/ctdb.c b/tools/ctdb.c
index 1f537d9..5055c26 100644
--- a/tools/ctdb.c
+++ b/tools/ctdb.c
@@ -1196,6 +1196,13 @@ static int control_ban(struct ctdb_context *ctdb, int argc, const char **argv)
usage();
}
+ /* verify we can access the node */
+ ret = ctdb_ctrl_getpnn(ctdb, TIMELIMIT(), options.pnn);
+ if (ret == -1) {
+ DEBUG(DEBUG_ERR,("Can not ban node. Node is not operational.\n"));
+ return -1;
+ }
+
ban_time = strtoul(argv[0], NULL, 0);
b.pnn = options.pnn;
@@ -1222,6 +1229,13 @@ static int control_unban(struct ctdb_context *ctdb, int argc, const char **argv)
int ret;
TDB_DATA data;
+ /* verify we can access the node */
+ ret = ctdb_ctrl_getpnn(ctdb, TIMELIMIT(), options.pnn);
+ if (ret == -1) {
+ DEBUG(DEBUG_ERR,("Can not unban node. Node is not operational.\n"));
+ return -1;
+ }
+
data.dptr = (uint8_t *)&options.pnn;
data.dsize = sizeof(uint32_t);
--
CTDB repository
More information about the samba-cvs
mailing list