mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
LibCTDB : update the ctdb tool to use libctdb to read the recovery mode
(This used to be ctdb commit 750a31cf95c356a0ee071967537eb615dce35845)
This commit is contained in:
parent
75afbee956
commit
6692512299
@ -737,10 +737,9 @@ static int control_status(struct ctdb_context *ctdb, int argc, const char **argv
|
||||
printf("hash:%d lmaster:%d\n", i, vnnmap->map[i]);
|
||||
}
|
||||
|
||||
ret = ctdb_ctrl_getrecmode(ctdb, ctdb, TIMELIMIT(), options.pnn, &recmode);
|
||||
if (ret != 0) {
|
||||
if (!ctdb_getrecmode(ctdb_connection, options.pnn, &recmode)) {
|
||||
DEBUG(DEBUG_ERR, ("Unable to get recmode from node %u\n", options.pnn));
|
||||
return ret;
|
||||
return -1;
|
||||
}
|
||||
printf("Recovery mode:%s (%d)\n",recmode==CTDB_RECOVERY_NORMAL?"NORMAL":"RECOVERY",recmode);
|
||||
|
||||
@ -2545,8 +2544,7 @@ static uint32_t get_generation(struct ctdb_context *ctdb)
|
||||
}
|
||||
|
||||
/* get recovery mode */
|
||||
ret = ctdb_ctrl_getrecmode(ctdb, ctdb, TIMELIMIT(), recmaster, &recmode);
|
||||
if (ret != 0) {
|
||||
if (!ctdb_getrecmode(ctdb_connection, recmaster, &recmode)) {
|
||||
DEBUG(DEBUG_ERR, ("Unable to get recmode from node %u\n", options.pnn));
|
||||
exit(10);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user