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

mgr: disconnect unregistered service daemon when report received #19261

Merged
merged 1 commit into from
Jan 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/mgr/DaemonServer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ bool DaemonServer::handle_report(MMgrReport *m)
// themselves to be a daemon for some service.
dout(4) << "rejecting report from non-daemon client " << m->daemon_name
<< dendl;
m->get_connection()->mark_down();
Copy link
Contributor

Choose a reason for hiding this comment

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

@dillaman i agree that by forcing the client to reconnect to the mgr, MgrClient will re-send an MMgrOpen to get itself registered.

but MgrClient sends reports to mgr periodically once it's connected to the mgr. i am curious that how you managed to "pause" it to prevent it stops doing so? as the "timer" used for rescheduling MgrClient::send_stats() is owned by MgrClient, it is unlikely to be blocked by the service daemon.

Copy link
Author

Choose a reason for hiding this comment

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

@tchaikov Would it need to pause the client from sending? The TCP connection could fail at anytime regardless (more so during test runs that purposely inject failures). The client should resend its perf stats after reconnecting (which is what I witnessed when play testing this PR after I ran into the issue originally on the dashboard).

Copy link
Contributor

Choose a reason for hiding this comment

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

The TCP connection could fail at anytime regardless (more so during test runs that purposely inject failures).

👍

m->put();
return true;
}
Expand Down