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

Conversation

dillaman
Copy link

This will allow the service daemon to reconnect and re-register
itself as a service daemon without requiring the mgr client to
subscribe to MgrStats and detect its removal.

Fixes: http://tracker.ceph.com/issues/22286
Signed-off-by: Jason Dillaman dillaman@redhat.com

This will allow the service daemon to reconnect and re-register
itself as a service daemon without requiring the mgr client to
subscribe to MgrStats and detect its removal.

Fixes: http://tracker.ceph.com/issues/22286
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
@dillaman dillaman requested a review from jcsp November 30, 2017 15:09
@batrick batrick added the mgr label Nov 30, 2017
@tchaikov tchaikov self-requested a review January 9, 2018 02:45
@@ -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).

👍

@tchaikov
Copy link
Contributor

retest this please

@tchaikov tchaikov merged commit cff3542 into ceph:master Jan 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants