Project

General

Profile

Actions

Bug #75681

closed
AJ SS

[osd upgrade] ok-to-upgrade does not honour the specified max requested upgradable OSDs

Bug #75681: [osd upgrade] ok-to-upgrade does not honour the specified max requested upgradable OSDs

Added by Ashwin Joshi 8 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
-
Due date:
% Done:

100%

Source:
Backport:
tentacle
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Tags (freeform):
Fixed In:
v21.0.0-429-gacab6731d4
Released In:
v21.2.0~810
Upkeep Timestamp:
2026-10-24T02:01:44+00:00

Description

The ok-to-upgrade should return only the specified max number OSDs. the bug is that it returns more than the required OSDs. Ideally the command should provide maximum OSDs limited by ”max” OSDs within the specified crush_bucket.

The following tests are for a setup with more than 16 OSDs.


[ceph: root@ceph-node-0 /]# ceph osd ok-to-upgrade --crush_bucket ceph-node-1 --ceph_version 20.3.0-5843-g82e79171 --max 4
{"ok_to_upgrade":true,"all_osds_upgraded":false,"osds_in_crush_bucket":[0,2,4,7,9,11,15,17,19,21,23,25,27,29,31,33,13],"osds_ok_to_upgrade":[0,2,4,7,9,11,15,17,19,21,23,25,27,29,31,33,13],"osds_upgraded":[],"bad_no_version":[]}

[ceph: root@ceph-node-0 /]# ceph osd ok-to-upgrade --crush_bucket ceph-node-1 --ceph_version 20.3.0-5843-g82e79171
{"ok_to_upgrade":true,"all_osds_upgraded":false,"osds_in_crush_bucket":[0,2,4,7,9,11,15,17,19,21,23,25,27,29,31,33,13],"osds_ok_to_upgrade":[0,2,4,7,9,11,15,17,19,21,23,25,27,29,31,33,13],"osds_upgraded":[],"bad_no_version":[]}

[ceph: root@ceph-node-0 /]# ceph version
ceph version 20.3.0-5843-g82e79171 (82e791713c4862f9eead667e9df1e90728255bae) tentacle (dev - RelWithDebInfo)


Subtasks 1 (0 open — 1 closed)

Bug #75548: [osd ok-to-upgrade] When few of the OSDs are upgraded in the cluster, the upgraded OSDs are part of osds_ok_to_upgrade list in `ceph osd ok-to-upgrade command`Won't FixSridhar Seshasayee

Actions

Related issues 1 (0 open — 1 closed)

Copied to RADOS - Backport #75981: tentacle: [osd upgrade] ok-to-upgrade does not honour the specified max requested upgradable OSDsResolvedSridhar Seshasayee

Actions

SS Updated by Sridhar Seshasayee 8 months ago Actions #1

  • Project changed from Ceph to RADOS
  • Category deleted (OSD)
  • Status changed from New to Triaged
  • Assignee set to Sridhar Seshasayee

The reason that the command in some cases return more than the 'max' specified OSDs is that ‘ok-to-upgrade’ command works in two phases:

Phase 1 : Checks if all OSDs in the specified crush bucket can be brought offline safely. If so, and even if it exceeds the specified ‘max’ parameter,
the command returns all the OSDs found in this phase. This is because the command attempts to maximize the upgrade set in phase1. If ‘max’ is
exceeded, the command terminates at this point and doesn’t move to phase2.

Phase 2 : If OSDs found in phase1 is lesser than ‘max’, phase2 attempts to find more OSDs either within the crush bucket or across the crush hierarchy.

Based on your comments regarding deterministic behaviour with both ‘--crush_bucket’ and ‘--max’ parameters, phase 2 I described above seems unnecessary.
By running phase 1 alone (eliminating phase 2) and ensuring only up to ‘max’ OSDs (if found) are returned, the requirements will be met.

Simplifying the logic by limiting the 'max' returned OSDs to within the specified crush also makes sense from a user/orchestrator perspective.
It may involve more cycles to complete the upgrade but ensures that,
- upgrades are performed per crush bucket
- simplifies logic to orchestrate the upgrade.

I will post a PR for this soon.

SS Updated by Sridhar Seshasayee 8 months ago Actions #2

  • Status changed from Triaged to In Progress

SS Updated by Sridhar Seshasayee 8 months ago Actions #3

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 68048

SS Updated by Sridhar Seshasayee 8 months ago Actions #4

  • Subtask #75548 added

LF Updated by Laura Flores 8 months ago Actions #5

Scrub note: PR under review

LF Updated by Laura Flores 8 months ago Actions #6

SS Updated by Sridhar Seshasayee 8 months ago Actions #7

  • Status changed from Fix Under Review to Resolved
  • Backport set to tentacle

UB Updated by Upkeep Bot 8 months ago Actions #8

  • Merge Commit set to acab6731d43164f8a3de9f955acbb71aa27e60bb
  • Fixed In set to v21.0.0-429-gacab6731d4
  • Upkeep Timestamp set to 2026-04-13T09:46:16+00:00

SS Updated by Sridhar Seshasayee 8 months ago Actions #9

  • Status changed from Resolved to Pending Backport

UB Updated by Upkeep Bot 8 months ago Actions #10

  • Copied to Backport #75981: tentacle: [osd upgrade] ok-to-upgrade does not honour the specified max requested upgradable OSDs added

UB Updated by Upkeep Bot 8 months ago Actions #11

  • Tags (freeform) set to backport_processed

SS Updated by Sridhar Seshasayee 8 months ago Actions #12

  • Status changed from Pending Backport to Resolved

UB Updated by Upkeep Bot 3 months ago Actions #13

  • Tags (freeform) deleted (backport_processed)
  • Upkeep Timestamp changed from 2026-04-13T09:46:16+00:00 to 2026-08-28T01:41:25+00:00

UB Updated by Upkeep Bot about 1 month ago Actions #14

  • Released In set to v21.2.0~810
  • Upkeep Timestamp changed from 2026-08-28T01:41:25+00:00 to 2026-10-24T02:01:44+00:00
Actions

Also available in: PDF Atom