Skip to content
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

Merged
merged 2 commits into from Nov 13, 2017
Merged

Conversation

jcsp
Copy link
Contributor

@jcsp jcsp commented Nov 8, 2017

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.

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>
std::stringstream msg;
msg << "mon." << name << " is new leader, mons ";
for (auto i = quorum.begin(); i != quorum.end();) {
derr << "rank: " << *i << dendl;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop this

Copy link
Member

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()?

Copy link
Contributor Author

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

@jcsp
Copy link
Contributor Author

jcsp commented Nov 9, 2017

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() {
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh, i see.

}));

} else {
dout(4) << __func__ << " healthmon is not proposing" << dendl;
Copy link
Contributor

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?

Copy link
Contributor Author

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>
@tchaikov tchaikov merged commit e3e39fa into ceph:master Nov 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants