mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
ctdbd: Log a message when recovery master changes
Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 1f96ea08f9a39dfe537c9b957ac512c84dc76f91)
This commit is contained in:
parent
e769f8575a
commit
5aeae9744e
@ -1350,9 +1350,22 @@ int32_t ctdb_control_recd_ping(struct ctdb_context *ctdb)
|
||||
|
||||
int32_t ctdb_control_set_recmaster(struct ctdb_context *ctdb, uint32_t opcode, TDB_DATA indata)
|
||||
{
|
||||
CHECK_CONTROL_DATA_SIZE(sizeof(uint32_t));
|
||||
uint32_t new_recmaster;
|
||||
|
||||
ctdb->recovery_master = ((uint32_t *)(&indata.dptr[0]))[0];
|
||||
CHECK_CONTROL_DATA_SIZE(sizeof(uint32_t));
|
||||
new_recmaster = ((uint32_t *)(&indata.dptr[0]))[0];
|
||||
|
||||
if (ctdb->pnn != new_recmaster && ctdb->recovery_master == ctdb->pnn) {
|
||||
DEBUG(DEBUG_NOTICE,
|
||||
("This node (%u) is no longer the recovery master\n", ctdb->pnn));
|
||||
}
|
||||
|
||||
if (ctdb->pnn == new_recmaster && ctdb->recovery_master != new_recmaster) {
|
||||
DEBUG(DEBUG_NOTICE,
|
||||
("This node (%u) is now the recovery master\n", ctdb->pnn));
|
||||
}
|
||||
|
||||
ctdb->recovery_master = new_recmaster;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user