Repository navigation
Conversation
This change intends to fix following test failure:
```
FAIL: test_copy (tasks.mgr.dashboard.test_rbd.RbdTest.test_copy)
Traceback (most recent call last):
self._validate_image(img_copy, features_name=['exclusive-lock',
self.assertEqual(img[k], v)
AssertionError: 0 != 67108864
```
by polling with wait_until_true(timeout=30) until disk_usage matches
before asserting.
A hypothesis is:
_rbd_disk_usage computes disk_usage via diff_iterate(whole_object=True),
which reads the object_map. librbd's copy() updates the object_map via
cls_rbd::object_map_update as each object is written. DiffIterate::
diff_iterate() (api/DiffIterate.cc) calls try_acquire_lock() as an
optimization to load the in-memory object_map for the fast path. This
lock attempt can race with the copy's close() releasing the same lock,
such that the in-memory object_map is loaded before all
cls_rbd::object_map_update ops from the copy are visible on the OSD,
leaving disk_usage as 0.
But we cannot verify it, as the test failure is not reproduciable.
See-also: https://tracker.ceph.com/issues/68544
Signed-off-by: Kefu Chai <[email protected]>
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
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]>
This change intends to fix following test failure:
by polling with wait_until_true(timeout=30) until disk_usage matches before asserting.
A hypothesis is:
_rbd_disk_usage computes disk_usage via diff_iterate(whole_object=True), which reads the object_map. librbd's copy() updates the object_map via cls_rbd::object_map_update as each object is written. DiffIterate:: diff_iterate() (api/DiffIterate.cc) calls try_acquire_lock() as an optimization to load the in-memory object_map for the fast path. This lock attempt can race with the copy's close() releasing the same lock, such that the in-memory object_map is loaded before all cls_rbd::object_map_update ops from the copy are visible on the OSD, leaving disk_usage as 0.
But we cannot verify it, as the test failure is not reproduciable.
See-also: https://tracker.ceph.com/issues/68544
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
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.