Repository navigation
tools/ceph-kvstore-tool: fail store-copy cleanly when the store cannot be created - #72418
Merged
Merged
Conversation
rzarzynski
approved these changes
Oct 6, 2026
Contributor
Author
|
jenkins test make check |
Contributor
Author
|
jenkins test make check arm64 |
Contributor
Author
|
jenkins test windows |
Contributor
Author
|
jenkins test make check |
Contributor
Author
|
jenkins test make check arm64 |
aainscow
force-pushed
the
wip-kvstore-store-copy-type
branch
2 times, most recently
from
October 27, 2026 15:22
be8e52f to
2328117
Compare
aainscow
force-pushed
the
wip-kvstore-store-copy-type
branch
from
October 27, 2026 15:27
2328117 to
1c7ac32
Compare
aainscow
marked this pull request as ready for review
October 28, 2026 12:27
Contributor
|
This PR has been added to wip-bharath18-testing-20261029.065635-main. |
aainscow
force-pushed
the
wip-kvstore-store-copy-type
branch
from
October 29, 2026 14:25
1c7ac32 to
4bc9859
Compare
…e type 'ceph-kvstore-tool bluestore-kv <path> store-copy <dest>' defaults the destination store type to the source type. KeyValueDB::create cannot create a bluestore-kv store and returns nullptr, which copy_store_to then dereferences, so the tool dies with a segmentation fault. Expect store-copy without a store type to fail with a message saying it cannot create a bluestore-kv store, and store-copy to rocksdb to copy every key. The tool segfaults on the current code. Fixes: https://tracker.ceph.com/issues/81466 Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
…t be created 'ceph-kvstore-tool bluestore-kv <path> store-copy <dest>' defaults the destination store type to the source type, but KeyValueDB::create can only create rocksdb stores and returns nullptr for bluestore-kv, which copy_store_to then dereferenced. Return -EINVAL with a message naming the type when KeyValueDB::create fails, and say in the usage text that bluestore-kv needs the type. Fixes: https://tracker.ceph.com/issues/81466 Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
…copy Fixes: https://tracker.ceph.com/issues/81466 Assisted-by: Claude Code Signed-off-by: Alex Ainscow <[email protected]>
aainscow
force-pushed
the
wip-kvstore-store-copy-type
branch
from
November 6, 2026 08:54
4bc9859 to
85fb0f3
Compare
|
This is an automated message by src/script/redmine-upkeep.py. I have resolved the following tracker ticket due to the merge of this PR: No backports are pending for the ticket. If this is incorrect, please update the tracker |
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.
ceph-kvstore-tool bluestore-kv <path> store-copy <dest>crashed with a segmentation fault. The target store type defaults to the source type,KeyValueDB::create()can only create rocksdb stores and returns nullptr for bluestore-kv (or any other type), andStoreTool::copy_store_to()dereferenced the result.test_kvstore_tool.shnow expects store-copy without a store type to fail with a message naming bluestore-kv, and store-copy to rocksdb to copy every key.expect_falsealone would also pass on the crash, so the test also checks the message.copy_store_to()returns -EINVAL with "cannot create a store of type ''; pass a store type such as rocksdb", and the usage text says that bluestore-kv needs the type.ceph-kvstore-tool.rstdocuments the store type argument of store-copy.Testing:
qa/workunits/cephtool/test_kvstore_tool.sh, run locally on a main build. With only the test commit it fails at the message check; running the same store-copy by hand ends in a segmentation fault (exit status 139) inStoreTool::copy_store_to(). With the fix it passes: store-copy without a type exits 1 with the message, and store-copy to rocksdb copies all 12 keys. The man page was not built.Fixes: https://tracker.ceph.com/issues/81466
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.
🤖 Generated with Claude Code
https://claude.ai/code/session_012ETDivFUQubLqznTDowHRu