Repository navigation
mgr/MgrClient: send keepalives on the mgr session - #72720
Conversation
7088af7 to
332c938
Compare
NitzanMordhai
left a comment
There was a problem hiding this comment.
@anthonyeleven please see my comment, you also missing the Fixes line in the commit message
| // Nothing else flows back to the daemon on this session, and the | ||
| // messenger's idle check counts only received traffic, so without this | ||
| // the daemon faults the session every ms_connection_idle_timeout. | ||
| m->get_connection()->send_keepalive(); |
There was a problem hiding this comment.
So we will send keepalive for each report every mgr_stats_period (5s by default) from now on? and also recive another ack. Maybe we can think of idle time to send it?
There was a problem hiding this comment.
Fair point. Each one is small, a KEEPALIVE2 frame that the daemon's messenger acks without dispatching anything, about what MonClient already sends every mon_client_ping_interval. But one per report is more than the idle check needs.
805ee03 now records on the MgrSession when the mgr last sent a keepalive, and sends one with a report only once half of ms_connection_idle_timeout has passed since. At the defaults that's one keepalive and one ack per daemon every 450 s instead of every 5 s, and the daemon's idle timer never gets more than about 455 s old against its 900 s limit.
There was a problem hiding this comment.
Changed it to a quarter of ms_connection_idle_timeout in 8b14903. The mgr can only see its own timeout, and at half, a daemon whose timeout is set lower than the mgr's would still reset: with the mgr at 900 s, anything below about 455 s. A quarter covers daemons down to about 230 s. At the defaults that's one keepalive per daemon every 225 s instead of every 5 s.
332c938 to
805ee03
Compare
|
@NitzanMordhai Added |
805ee03 to
8b14903
Compare
|
This PR has been added to wip-bharath10-testing-20261027.070130-main. |
8b14903 to
f3a1645
Compare
|
@idryomov @NitzanMordhai Reworked in f3a1645. The keepalive is back in @SrinivasaBharath this replaces the commit that is in wip-bharath10-testing-20261027.070130-main. |
The mgr sends nothing back on a daemon's lossy mgr session, and AsyncConnection's idle check counts only received traffic. So every OSD and MDS faults its mgr session once it has been open for ms_connection_idle_timeout, even though it reports every mgr_stats_period seconds. It then reconnects, authenticates again and declares all of its perf counters again. Daemons that connected together after a mgr failover stay in step and reconnect together. MonClient avoids this by sending keepalives. After a report, send one if half of the daemon's own ms_connection_idle_timeout has passed since the last, so the ack arrives well before the timeout. With the default 900 s timeout that is one keepalive every 450 s, not one per report. Fixes: https://tracker.ceph.com/issues/81784 Co-authored-by: Ilya Dryomov <[email protected]> Signed-off-by: Anthony D'Atri <[email protected]> Assisted-by: Claude Opus-5.5
87a716d to
f789dbd
Compare
|
This PR has been added to wip-bharath18-testing-20261029.065635-main. |
Fixes: https://tracker.ceph.com/issues/81784
The mgr sends nothing back on a daemon's lossy mgr session, and
AsyncConnection's idle check counts only received traffic. So every OSD and MDS faults its mgr session once it has been open forms_connection_idle_timeout, even though it reports everymgr_stats_periodseconds. It then reconnects, authenticates again and declares all of its perf counters again. Daemons that connected together after a mgr failover stay in step, so they all reconnect to the mgr at the same moment.MonClient avoids this by sending keepalives. After a report,
MgrClientnow sends one if half of the daemon's ownms_connection_idle_timeouthas passed since the last, so the ack arrives well before the timeout. With the default 900 s timeout that is one keepalive every 450 s, not one per report. The mgr's messenger answers the keepalive itself, so nothing new reaches the mgr's dispatch path.An earlier revision sent the keepalive from the mgr, so that daemons of any release would be fixed once the mgrs were upgraded. It is back in
MgrClientbecause the daemon's idle timer is what closes the session, and only the daemon knows that timer's setting.Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.
Signed-off-by: Anthony D'Atri [email protected]
Assisted-by: Claude Opus-5.5