[SCM] CTDB repository - branch master updated -
ctdb-1.0.57-11-g3ff0711
Ronnie Sahlberg
sahlberg at samba.org
Fri Sep 12 02:07:55 GMT 2008
The branch, master has been updated
via 3ff0711fd3b288c153218ad33e8462a94b8d3275 (commit)
from a72f5b7d1560e427e18b1c55a2932a7fb037f4c7 (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 3ff0711fd3b288c153218ad33e8462a94b8d3275
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Fri Sep 12 12:06:53 2008 +1000
i add a new ctdb command "ctdb recmaster"
this shows the node id of hte current recmaster
-----------------------------------------------------------------------
Summary of changes:
tools/ctdb.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
Changeset truncated at 500 lines:
diff --git a/tools/ctdb.c b/tools/ctdb.c
index 8aa934d..1fd61d9 100644
--- a/tools/ctdb.c
+++ b/tools/ctdb.c
@@ -409,6 +409,25 @@ static int control_status(struct ctdb_context *ctdb, int argc, const char **argv
}
/*
+ display the pnn of the recovery master
+ */
+static int control_recmaster(struct ctdb_context *ctdb, int argc, const char **argv)
+{
+ int ret;
+ uint32_t recmode, recmaster;
+ int mypnn;
+
+ ret = ctdb_ctrl_getrecmaster(ctdb, ctdb, TIMELIMIT(), options.pnn, &recmaster);
+ if (ret != 0) {
+ DEBUG(DEBUG_ERR, ("Unable to get recmaster from node %u\n", options.pnn));
+ return ret;
+ }
+ printf("%d\n",recmaster);
+
+ return 0;
+}
+
+/*
get a list of all tickles for this pnn
*/
static int control_get_tickles(struct ctdb_context *ctdb, int argc, const char **argv)
@@ -2333,6 +2352,7 @@ static const struct {
{ "eventscript", control_eventscript, true, "run the eventscript with the given parameters on a node", "<arguments>"},
{ "backupdb", control_backupdb, false, "backup the database into a file.", "<database> <file>"},
{ "restoredb", control_restoredb, false, "restore the database from a file.", "<file>"},
+ { "recmaster", control_recmaster, false, "show the pnn for the recovery master."},
};
/*
--
CTDB repository
More information about the samba-cvs
mailing list