Skip to content

mon/fix: ceph osd pool set fails when setting fingerprint_algorithm o… - #66696

Closed
yulongshi0816 wants to merge 1 commit into
ceph:mainfrom
yulongshi0816:patch-2
Closed

yulongshi0816 wants to merge 1 commit into
ceph:mainfrom
yulongshi0816:patch-2

Conversation

@yulongshi0816

Copy link
Copy Markdown
Contributor

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 x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

…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]>
@yulongshi0816
yulongshi0816 requested a review from a team as a code owner December 19, 2025 07:51
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

13 similar comments
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@github-actions

Copy link
Copy Markdown

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.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions Bot added the stale label Feb 17, 2026
@github-actions

Copy link
Copy Markdown

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!

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