mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
i add a new ctdb command "ctdb recmaster"
this shows the node id of hte current recmaster (This used to be ctdb commit 3ff0711fd3b288c153218ad33e8462a94b8d3275)
This commit is contained in:
parent
348cad7bc1
commit
54ffdfd50a
@ -408,6 +408,25 @@ static int control_status(struct ctdb_context *ctdb, int argc, const char **argv
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
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
|
get a list of all tickles for this pnn
|
||||||
*/
|
*/
|
||||||
@ -2333,6 +2352,7 @@ static const struct {
|
|||||||
{ "eventscript", control_eventscript, true, "run the eventscript with the given parameters on a node", "<arguments>"},
|
{ "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>"},
|
{ "backupdb", control_backupdb, false, "backup the database into a file.", "<database> <file>"},
|
||||||
{ "restoredb", control_restoredb, false, "restore the database from a file.", "<file>"},
|
{ "restoredb", control_restoredb, false, "restore the database from a file.", "<file>"},
|
||||||
|
{ "recmaster", control_recmaster, false, "show the pnn for the recovery master."},
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user