Skip to content

qa/cephfs: wait for MgrMap client registration before mgr fail - #70631

Merged
vshankar merged 1 commit into
ceph:mainfrom
karthik-us1:fix_test_mgr_eviction
Sep 1, 2026
Merged

vshankar merged 1 commit into
ceph:mainfrom
karthik-us1:fix_test_mgr_eviction

Conversation

@karthik-us1

@karthik-us1 karthik-us1 commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

test_mgr_eviction expects that failing the active mgr evicts its CephFS MDS sessions. Eviction depends on ceph mgr fail blocklisting MgrMap.active_clients, which the mon only learns from mgr beacons.

After subvolume create, the volumes module registers the new libcephfs client address in the mgr process immediately, but that address may not be in MgrMap yet until the next beacon (mgr_tick_period, default 2s). If mgr fail runs in that window, the mon blocklists a stale client list and the live MDS session is never blocklisted. The failed mgr then respawns without a clean CephFS close, so the session lingers past the test's 30s wait (MDS session_timeout is ~61s).

Fix the race by waiting until each mgr MDS session nonce appears in mgr dump active_clients before calling mgr fail, so blocklisting covers the sessions the test asserts are evicted.

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

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.

test_mgr_eviction expects that failing the active mgr evicts its
CephFS MDS sessions. Eviction depends on ceph mgr fail blocklisting
MgrMap.active_clients, which the mon only learns from mgr beacons.

After subvolume create, the volumes module registers the new libcephfs
client address in the mgr process immediately, but that address may not
be in MgrMap yet until the next beacon (mgr_tick_period, default 2s).
If mgr fail runs in that window, the mon blocklists a stale client list
and the live MDS session is never blocklisted. The failed mgr then
respawns without a clean CephFS close, so the session lingers past the
test's 30s wait (MDS session_timeout is ~61s).

Fix the race by waiting until each mgr MDS session nonce appears in
mgr dump active_clients before calling mgr fail, so blocklisting
covers the sessions the test asserts are evicted.

Fixes: https://tracker.ceph.com/issues/76047
Signed-off-by: Karthik U S <[email protected]>
@github-actions github-actions Bot added cephfs Ceph File System tests labels Jul 28, 2026

@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.

Looks reasonable.

@vshankar

Copy link
Copy Markdown
Contributor

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

@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 b5eaa11 into ceph:main Sep 1, 2026
15 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants