New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mon: clean up cluster logging on mon events #18822
Conversation
This isn't even a change to the map, just something that got echoed every time a new mon was the leader. Signed-off-by: John Spray <john.spray@redhat.com>
src/mon/Monitor.cc
Outdated
std::stringstream msg; | ||
msg << "mon." << name << " is new leader, mons "; | ||
for (auto i = quorum.begin(); i != quorum.end();) { | ||
derr << "rank: " << *i << dendl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, see Monitor::get_quorum_names()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I had a feeling I was forgetting about a helper
Updated |
@@ -635,8 +635,8 @@ class Monitor : public Dispatcher, | |||
return (class MgrStatMonitor*) paxos_service[PAXOS_MGRSTAT]; | |||
} | |||
|
|||
class MgrStatMonitor *healthmon() { | |||
return (class MgrStatMonitor*) paxos_service[PAXOS_MGRSTAT]; | |||
class HealthMonitor *healthmon() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this method used anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it wasn't before, but it is now in Monitor::win_election
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh, i see.
src/mon/Monitor.cc
Outdated
})); | ||
|
||
} else { | ||
dout(4) << __func__ << " healthmon is not proposing" << dendl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jcsp can we lower the debug level to, for example, 10?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done (actually removed this one and demoted the one above to 20, I don't think we need the logging on the non-waiting case.
These changes come from observing the output when killing a mon and watching the survivors form a new quorum. Fixes: http://tracker.ceph.com/issues/22082 Signed-off-by: John Spray <john.spray@redhat.com>
Fixes: http://tracker.ceph.com/issues/22082
This is several minor tweaks to make sure what comes out the cluster log is sane and readable when a mon goes down.