Repository navigation
qa/tasks/mgr/dashboard: write non-zero data in test_copy - #72988
Merged
Merged
Conversation
5 of 18 tasks
Contributor
Author
|
@idryomov would you be an appropriate person to review this? EDIT: The ceph dashboard tests have been failing for months. The Check's not red because of this PR. |
test_copy writes 5M into an image with `rbd bench`, copies it, and expects the copy's disk_usage to equal the source's. It fails now and then with AssertionError: 0 != 67108864 because rbd bench fills its single write buffer with one byte chosen by rand() & 0xff (seeded from the clock), so in about 1 run of 256 every byte written is 0x00. The source image still accounts the written objects, but librbd's copy skips all-zero extents, so the copy is correctly sparse and reports a disk_usage of 0. It is not a timing race: waiting for the copy's usage to catch up (as tried in ceph#68904) would only turn the failure into a timeout. Pass --pattern-byte 1 so the data written is never all zeros. Fixes: https://tracker.ceph.com/issues/68544 Assisted-by: Claude Opus 5.5 Signed-off-by: David Galloway <[email protected]>
djgalloway
force-pushed
the
wip-68544-test-copy-zero-pattern
branch
from
October 22, 2026 16:46
0bbce81 to
5b64d8d
Compare
Contributor
Author
|
jenkins test make check |
idryomov
approved these changes
Oct 26, 2026
|
This is an automated message by src/script/redmine-upkeep.py. I found one or more
The referenced tickets are: Those tickets do not reference this merged Pull Request. If this Pull Request merge resolves any of those tickets, please update the "Pull Request ID" field on each ticket. A future run of this script will appropriately update them. |
This was referenced Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tasks.mgr.dashboard.test_rbd.RbdTest.test_copyfails intermittently in the dashboard API tests (tracker #68544, open since 2024-10; most recently on ceph-pr-pipeline 5952) with:Cause: the test fills the source image with
rbd bench --io-type write --io-total 5M, and rbd bench's default--pattern-byte randfills its single write buffer with one byte,memset(bp.c_str(), rand() & 0xff, io_size)(src/tools/rbd/action/Bench.cc, seeded fromtime()). So in about 1 run of 256 every byte written is0x00. The source still accounts the written objects (64 MiB), but librbd's copy skips all-zero extents (if (m_bl->is_zero()) ... return;insrc/librbd/internal.cc), so the copy is correctly sparse and reportsdisk_usage0.This is not a timing race, so waiting for the copy's usage to converge (#68904, auto-closed unreviewed) would only turn the failure into a
TestTimeoutError30 s later.Fix:
--pattern-byte 1, so the data is never all zeros. The otherrbd benchcalls intest_rbd.py(test_disk_usage, the rollback test) only check the image they wrote to, which accounts zero-filled writes too, so they're unaffected.Backports:
--pattern-byte(13a5927) is on tentacle and umbrella, so this applies there as-is. squid doesn't have it and has the same 1-in-256 behaviour, so a squid backport would need another way to write non-zero data.Checklist