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>
(cherry picked from commit
b6d25d079e30919457cacbfbbfd670bf88295a9c)
}
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",