Skip to content

test/librados: retry fresh instances in PoolIsInSelfmanagedSnapsMode - #72744

Draft
aainscow wants to merge 1 commit into
ceph:mainfrom
aainscow:wip-test-librados-fresh-instance-race
Draft

aainscow wants to merge 1 commit into
ceph:mainfrom
aainscow:wip-test-librados-fresh-instance-race

Conversation

@aainscow

@aainscow aainscow commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Warning

This PR was generated with AI assistance (Claude Code) to aid the productivity of the PR owner. It has not been reviewed by a human yet, which is why the commits have no Signed-off-by. What has been shown so far (more under Testing below):

LibRadosPoolIsInSelfmanagedSnapsMode.FreshInstance connects a new client after each pool change and expects it to see the change at once. A new client takes its first osdmap from whichever monitor it connects to, and a peon that has accepted the new version but not yet received the commit still serves the previous epoch (Paxos::is_readable() is true while updating). wait_for_latest_osdmap() would not help: the peon answers the version request with the same old epoch. (https://tracker.ceph.com/issues/64056)

In https://pulpito-ng.ceph.com/aainscow-2026-10-14_19:18:46-rados:verify-wip-aainscow-rados-qa-fixes-v3-261014-distro-default-trial/ (job 638584), the pool delete was committed in epoch 35 (reply at 20:01:17.071). The fresh client connected to mon.b 70 ms later, got epoch 34, and still found the pool:

snapshots_cxx.cc:591: Failure
Expected equality of these values:
  -2
  cluster2.pool_is_in_selfmanaged_snaps_mode(pool_name)
    Which is: 1

This PR retries with a new instance each time, for up to 30 seconds, until it sees the expected result. Each attempt is still a fresh instance, so the test still checks that a new client fetches the map before answering.

Testing: in a batch with other QA fixes, FreshInstance passed in both rados/verify tasks/rados_api_tests jobs (https://pulpito-ng.ceph.com/aainscow-2026-10-15_06:56:10-rados-wip-aainscow-rados-qa-fixes-v5-261015-distro-default-trial/, https://pulpito-ng.ceph.com/aainscow-2026-10-15_07:04:07-rados:verify-wip-aainscow-rados-qa-fixes-v5-261015-distro-default-trial/). The race is rare, so this only shows the retry does not break the test.

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.

🤖 Generated with Claude Code

LibRadosPoolIsInSelfmanagedSnapsMode.FreshInstance connects a new
client after each pool change and expects it to see that change. A new
client takes its first osdmap from whichever monitor it connects to,
and a peon that has accepted but not yet applied the commit still
serves the previous epoch. In a rados/verify valgrind job, the pool
delete committed in epoch 35 and the fresh client, connected to a peon
70 ms later, got epoch 34 and still found the pool.

Retry with a new instance until the expected result or 30 seconds.

Fixes: https://tracker.ceph.com/issues/64056
Assisted-by: Claude Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants