Repository navigation
mon/fix: ceph osd pool set fails when setting fingerprint_algorithm o… - #66696
yulongshi0816 wants to merge 1 commit into
Conversation
…r dedup_chunk_algorithm to none, but setting any other string works. When setting the deduplication algorithm or the fingerprint algorithm, the value cannot be none, but can be any other value. This bug occurs because any number other than 0 is evaluated as true. Signed-off-by: yulong Shi <[email protected]>" Signed-off-by: yulongshi0816 <[email protected]>
|
Can one of the admins verify this patch? |
13 similar comments
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
Can one of the admins verify this patch? |
|
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! |
ceph osd pool set fails when setting fingerprint_algorithm or dedup_chunk_algorithm to none, but setting any other string works.
Root cause: The validation logic incorrectly allowed any string value (expecting only "none" and other specific enumerated values). When an arbitrary value was set, the function returned -1, and the condition !alg evaluated to false (because in C++, any non-zero value, including -1, is true).
Fix: Correct the validation to only accept the intended enumerated values ("none", "sha1", etc.) and fix the boolean logic to properly handle the -1 return case.
Signed-off-by: yulong Shi<[email protected]>
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.