Skip to content

mgr/DaemonServer: return -ENOTSUP for unsupported bucket_type in ok-to-upgrade - #74085

Open
sseshasa wants to merge 1 commit into
ceph:mainfrom
sseshasa:wip-fix-ok-to-upgrade-invalid-bucket-type-err-code
Open

sseshasa wants to merge 1 commit into
ceph:mainfrom
sseshasa:wip-fix-ok-to-upgrade-invalid-bucket-type-err-code

Conversation

@sseshasa

@sseshasa sseshasa commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

osd ok-to-upgrade returned -EINVAL both for an unsupported CRUSH bucket type (anything other than rack, chassis, host or osd) and for a malformed ceph_version or negative 'max'. Callers such as cephadm could not tell these apart from the error codes alone.

Return -ENOTSUP for the unsupported bucket type case. -EINVAL is now returned only for the bad ceph version or max arguments, and -ENOENT remains for a missing bucket or a bucket with no OSDs.

Update TEST_ok_to_upgrade_invalid_args to assert the error and message for the 'root' bucket case instead of only checking that the command fails.

Fixes: https://tracker.ceph.com/issues/83338
Signed-off-by: Sridhar Seshasayee [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.

…o-upgrade

`osd ok-to-upgrade` returned -EINVAL both for an unsupported CRUSH bucket
type (anything other than rack, chassis, host or osd) and for a malformed
ceph_version or negative 'max'. Callers such as cephadm could not tell these
apart from the error codes alone.

Return -ENOTSUP for the unsupported bucket type case. -EINVAL is now returned
only for the bad ceph version or max arguments, and -ENOENT remains for a
missing bucket or a bucket with no OSDs.

Update TEST_ok_to_upgrade_invalid_args to assert the error and message for the
'root' bucket case instead of only checking that the command fails.

Fixes: https://tracker.ceph.com/issues/83338
Signed-off-by: Sridhar Seshasayee <[email protected]>
@sseshasa
sseshasa force-pushed the wip-fix-ok-to-upgrade-invalid-bucket-type-err-code branch from c7d8b4f to 73d3de5 Compare November 20, 2026 13:20

@ashjosh1git ashjosh1git left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sseshasa

Copy link
Copy Markdown
Contributor Author

@NitzanMordhai Mind taking a quick look at this? It's a simple change. Thanks!

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath37-testing-20261124.044935-main.

@ashjosh1git

ashjosh1git commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

#74240 is related to this PR. May be included in the tests post reviews if possible. @SrinivasaBharath and @sseshasa. Thanks!

@NitzanMordhai

Copy link
Copy Markdown
Contributor

@sseshasa i think that cephadm will break with that change #72920 @ashjosh1git are you going to change those checkes for ENOENT?

@NitzanMordhai

Copy link
Copy Markdown
Contributor

@sseshasa i think that cephadm will break with that change #72920 @ashjosh1git are you going to change those checkes for ENOENT?

ah #74240 sorry, didn't notice that

@NitzanMordhai NitzanMordhai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@sseshasa

Copy link
Copy Markdown
Contributor Author

#74240 is related to this PR. May be included in the tests post reviews if possible. @SrinivasaBharath and @sseshasa. Thanks!

@SrinivasaBharath Yes, it would be better to wait for reviews to complete on #74240. We can then include both the PRs in a single QA batch.

@ashjosh1git

Copy link
Copy Markdown
Contributor

#74240 is approved, we are good for the tests, thanks @SrinivasaBharath

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.

4 participants