mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
ctdb-daemon: Update logging for flag changes
When flags change, promote the message to NOTICE level and switch the message to the style that is currently generated by ctdb-recoverd.c:monitor_handler(). This will allow monitor_handler() to go away in future. Drop logging when flags do not change. The recovery master now logs when it pushes flags for a node, so the lack of a corresponding "changed flags" message here indicates that no update was required. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14784 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
eec44e2862
commit
b6d25d079e
@ -485,11 +485,13 @@ int32_t ctdb_control_modflags(struct ctdb_context *ctdb, TDB_DATA indata)
|
||||
}
|
||||
|
||||
if (node->flags == old_flags) {
|
||||
DEBUG(DEBUG_INFO, ("Control modflags on node %u - Unchanged - flags 0x%x\n", c->pnn, node->flags));
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEBUG(DEBUG_INFO, ("Control modflags on node %u - flags now 0x%x\n", c->pnn, node->flags));
|
||||
D_NOTICE("Node %u has changed flags - 0x%x -> 0x%x\n",
|
||||
c->pnn,
|
||||
old_flags,
|
||||
node->flags);
|
||||
|
||||
if (node->flags == 0 && ctdb->runstate <= CTDB_RUNSTATE_STARTUP) {
|
||||
DEBUG(DEBUG_ERR, (__location__ " Node %u became healthy - force recovery for startup\n",
|
||||
|
Loading…
Reference in New Issue
Block a user