Skip to content

crimson/os,tools,qa: reduce segment pressure in ceph_objectstore_tool test - #68450

Closed
ronen-fr wants to merge 6 commits into
ceph:mainfrom
ronen-fr:wip-rf-gconly-crimson
Closed

ronen-fr wants to merge 6 commits into
ceph:mainfrom
ronen-fr:wip-rf-gconly-crimson

Conversation

@ronen-fr

@ronen-fr ronen-fr commented Apr 17, 2026 •

Copy link
Copy Markdown
Contributor

The ceph_objectstore_tool test is hitting space exhaustion on restart
due to segment pressure. In the test scenario, the GC is never given
a chance to run and free up segments.

This change add a new GC operation to Seastore and the
crimson-objectstore-tool, allowing us to trigger GC cycles
on demand. The test is updated to run GC before restarting
the OSDs.

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

@ronen-fr
ronen-fr force-pushed the wip-rf-gconly-crimson branch 2 times, most recently from efc968a to 596a752 Compare April 17, 2026 14:59

@jdurgin jdurgin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would it be useful to get coverage without GC'ing on restart too? Perhaps it could probabilistic, or done every nth restart?

Will be used to force immediate GC cycles in Seastore during testing, to
reduce segment pressure and avoid missing-OOL-segments conditions.

Signed-off-by: Ronen Friedman <[email protected]>
This adds a GC operation to the crimson-objectstore-tool, allowing
us to trigger GC cycles on demand during testing. This will
help reduce segment pressure and avoid 'no-segments' conditions.

Signed-off-by: Ronen Friedman <[email protected]>
The objectstore tool tests restart the OSDs without allowing enough
time for GC to run, which can lead to no-OOL-segments conditions on restart. This
adds a gc_before_restart option to the test config, which when set
to true will run crimson-objectstore-tool --op gc on each OSD
before restarting them.

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

Signed-off-by: Ronen Friedman <[email protected]>
@ronen-fr
ronen-fr force-pushed the wip-rf-gconly-crimson branch from 596a752 to 1bccda5 Compare April 18, 2026 16:06
@ronen-fr

ronen-fr commented Apr 18, 2026 •

Copy link
Copy Markdown
Contributor Author

@jdurgin

Would it be useful to get coverage without GC'ing on restart too? Perhaps it could probabilistic, or done every nth restart?

The problem is that the tests fail with very high probability. We can consider running with GC only if the test writes sizes that are larger than a few K bytes. Is it a good enough solution? (that's actually just having two variations in the yaml, as both the size and the gc-flag are set there)

Update:
The fix here is not enough without reducing the test's sizes. When the segments are exhausted, the GC command fails (the objectstore-tool tries to allocate more segments as part of the mount). I consider this a problem that should be fixed (as it might affect the OSD's ability to recover from a crash), but I'll have to discuss it with @Matan-B and possibly fix it in a separate PR.
I'll have to fix it in this PR, as otherwise there is no scenario in which the new 'GC' op helps anyone.
A new 'look for all-empty segments that should be freed' is added as part of the mount.

Neither the OSD (upon restart) nor the GC tool (during 'op gc') can
mount the store if all segments are exhausted, because the mount tries
to allocate multiple segments.

The change here is to add a 'no-write-permission-needed' reclaim step during mount.
This step will reclaim any segments that are fully cleaned but not yet released,
which can free up enough segments to allow the mount to succeed and the OSD
(or objectstore-tool) to start.

Signed-off-by: Ronen Friedman <[email protected]>
testing the new reclaim_dead_segments() functionality.

Signed-off-by: Ronen Friedman <[email protected]>
@ronen-fr
ronen-fr force-pushed the wip-rf-gconly-crimson branch from 3f90b41 to fbfc01b Compare April 19, 2026 13:16
@ronen-fr

Copy link
Copy Markdown
Contributor Author

Closing - as this does not work. There is no simple way to trim without full read-write mount.

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