Skip to content

mgr/DaemonServer: Limit search for OSDs to upgrade within the crush bucket - #68048

Merged
sseshasa merged 1 commit into
ceph:mainfrom
sseshasa:wip-fix-max-criteria-in-phase1
Apr 13, 2026
Merged

sseshasa merged 1 commit into
ceph:mainfrom
sseshasa:wip-fix-max-criteria-in-phase1

Conversation

@sseshasa

@sseshasa sseshasa commented Mar 27, 2026 •

Copy link
Copy Markdown
Contributor

This PR makes the behavior of the 'ok-to-upgrade' command more deterministic with respect to the parameters passed.

To achieve the above, the commit implements the following changes:

  1. Modifies the 'ok-to-upgrade' command to strictly operate on the OSDs within the CRUSH bucket and, if possible, meet the '--max' criteria when specified. When --max <num> is provided, the command returns up to <num> OSD IDs from the specified CRUSH bucket that can be safely stopped for simultaneous upgrade. This is useful when only a subset of OSDs within the bucket needs to be upgraded for performance or other reasons.

  2. Modifies the standalone tests to reflect the above change.

  3. Modifies the relevant documentation to reflect the change in behavior.

Fixes: https://tracker.ceph.com/issues/75681
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.

@sseshasa

Copy link
Copy Markdown
Contributor Author

@rzarzynski @NitzanMordhai @kamoltat Gentle reminder to review this. Thanks!

@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.

@sseshasa i added some comments for you

Comment thread src/mgr/DaemonServer.cc Resolved
Comment thread src/mgr/DaemonServer.h Resolved
Comment thread qa/standalone/misc/ok-to-upgrade.sh Resolved
Comment thread qa/standalone/misc/ok-to-upgrade.sh Resolved
@sseshasa
sseshasa force-pushed the wip-fix-max-criteria-in-phase1 branch from fc15137 to 47a51dd Compare March 31, 2026 10:24

@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

…ucket.

The behavior of the 'ok-to-upgrade' command is now more deterministic with
respect to the parameters passed.

To achieve the above, the commit implements the following changes:

1. The 'ok-to-upgrade' command is modified to operate strictly on the OSDs
   within the CRUSH bucket and, if possible, meet the '--max' criteria when
   specified. When --max <num> is provided, the command returns up to <num>
   OSD IDs from the specified CRUSH bucket that can be safely stopped for
   simultaneous upgrade. This is useful when only a subset of OSDs within
   the bucket needs to be upgraded for performance or other reasons.

2. Modifies the standalone tests to reflect the above change.

3. Modifies the relevant documentation to reflect the change in behavior.

Fixes: https://tracker.ceph.com/issues/75681
Signed-off-by: Sridhar Seshasayee <[email protected]>
@sseshasa
sseshasa force-pushed the wip-fix-max-criteria-in-phase1 branch from 47a51dd to f18093f Compare March 31, 2026 13:48
Comment thread qa/standalone/misc/ok-to-upgrade.sh Resolved
@sseshasa

sseshasa commented Apr 7, 2026

Copy link
Copy Markdown
Contributor Author

@rzarzynski @kamoltat Please review this simplification. As per the request from Orchestrator folks, the search for OSDs is now limited only to the specified crush bucket. I hope to make this available soon on tentacle upstream and downstream branch so that QE can run tests. Thanks!

@sseshasa

Copy link
Copy Markdown
Contributor Author

@kamoltat @rzarzynski I have marked this 'needs-qa' as I want to merge it and make it available on upstream tentacle and eventually to downstream soon so that the Orchestrator team is unblocked. I will consider any comments that you may have in the next iteration. Thanks.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: I think when we are exercising the integrity of strict OSD search within the CRUSH bucket, we should check against OSD.ID and not the the expected num of OSDs. That way we can have a peace of mind that it is actually returning the OSDs in the crush bucket. I know your code already guarantee that, but it would be nice peace of mind.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @kamoltat . I will look into this in the next iteration or as part of the new tracker.

@sseshasa

Copy link
Copy Markdown
Contributor Author

@sseshasa
sseshasa merged commit acab673 into ceph:main Apr 13, 2026
6 checks passed
@github-actions

Copy link
Copy Markdown

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
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/24336722213

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