Skip to content

mds: soft-handle missing client on metrics remove - #71013

Merged
vshankar merged 1 commit into
ceph:mainfrom
salieri11:igolikov-metric-aggregator-remove-fix-79440
Sep 1, 2026
Merged

vshankar merged 1 commit into
ceph:mainfrom
salieri11:igolikov-metric-aggregator-remove-fix-79440

Conversation

@salieri11

Copy link
Copy Markdown
Contributor

During max_mds scaling and MDS failover, MetricAggregator::remove_metrics_for_rank() can receive an UPDATE_TYPE_REMOVE for a client that is no longer present in clients_by_rank.

This can happen when:

  • The client was never tracked because the aggregator dropped the initial refresh while pong_received was failing during bootstrap.
  • The client was already removed when the rank was recycled through cull_metrics_for_rank() / notify_mdsmap().

The current code does ceph_assert(rm) on the erase result, which crashes the rank-0 MDS when the client is already missing.

This is metrics bookkeeping only and does not affect filesystem correctness.

This patch:

  • Replaces the assert with an early return when the client or rank is not tracked.
  • Checks for the perf-counter entry before removing it.
  • Logs both missing-client and missing-perf-counter cases for easier debugging.

Fixes: https://tracker.ceph.com/issues/79440

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 x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

UPDATE_TYPE_REMOVE can arrive for a client that was never tracked or
already culled during max_mds/failover churn. Drop the aggressive
ceph_assert(rm) and treat that as an idempotent no-op.

Signed-off-by: Igor Golikov <[email protected]>
Fixes: https://tracker.ceph.com/issues/79440
@salieri11
salieri11 requested a review from vshankar August 12, 2026 19:50
@github-actions github-actions Bot added the cephfs Ceph File System label Aug 12, 2026
@salieri11

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@vshankar

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by vshankar started 2026-08-13-12:44.

@salieri11

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@vshankar vshankar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@vshankar
vshankar merged commit 7b7b3e9 into ceph:main Sep 1, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cephfs Ceph File System

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants