Bug #74640
closedmgr - Bug #73031: Implement a new ok-to-upgrade command
[ok-to-upgrade] Inconsistent result of ceph osd ok-to-upgrade command when some of the OSDs are stopped across different racks
0%
Description
Description of problem:
Inconsistent result of ceph osd ok-to-upgrade command when some of the OSDs are stopped across different racks. The stopped OSDs from rack1 are included in osds_ok_to_upgrade, but the stopped OSDs from rack2,rack3,rack4 are not included in osds_ok_to_upgrade.
Steps to Reproduce:
1. Deploy Ceph cluster with below configuration:-
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 0.35005 root default
-11 0 host ceph-vipin-pr-jq06u8-node5
-12 0.08751 rack rack1
-9 0.08751 host ceph-vipin-pr-jq06u8-node1-installer
3 hdd 0.01459 osd.3 up 1.00000 1.00000
7 hdd 0.01459 osd.7 up 1.00000 1.00000
11 hdd 0.01459 osd.11 up 1.00000 1.00000
15 ssd 0.01459 osd.15 up 1.00000 1.00000
19 ssd 0.01459 osd.19 up 1.00000 1.00000
23 ssd 0.01459 osd.23 up 1.00000 1.00000
-13 0.08751 rack rack2
-3 0.08751 host ceph-vipin-pr-jq06u8-node2
1 hdd 0.01459 osd.1 up 1.00000 1.00000
5 hdd 0.01459 osd.5 up 1.00000 1.00000
9 hdd 0.01459 osd.9 up 1.00000 1.00000
13 ssd 0.01459 osd.13 up 1.00000 1.00000
17 ssd 0.01459 osd.17 up 1.00000 1.00000
21 ssd 0.01459 osd.21 up 1.00000 1.00000
-14 0.08751 rack rack3
-7 0.08751 host ceph-vipin-pr-jq06u8-node3
2 hdd 0.01459 osd.2 up 1.00000 1.00000
6 hdd 0.01459 osd.6 up 1.00000 1.00000
10 hdd 0.01459 osd.10 up 1.00000 1.00000
14 ssd 0.01459 osd.14 up 1.00000 1.00000
18 ssd 0.01459 osd.18 up 1.00000 1.00000
22 ssd 0.01459 osd.22 up 1.00000 1.00000
-15 0.08752 rack rack4
-5 0.08752 host ceph-vipin-pr-jq06u8-node4
0 hdd 0.01459 osd.0 up 1.00000 1.00000
4 hdd 0.01459 osd.4 up 1.00000 1.00000
8 hdd 0.01459 osd.8 up 1.00000 1.00000
12 ssd 0.01459 osd.12 up 1.00000 1.00000
16 ssd 0.01459 osd.16 up 1.00000 1.00000
20 ssd 0.01459 osd.20 up 1.00000 1.00000
Thu Jan 29 07:40:04 UTC 2026
2. Create a pool with below configuration:-
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd pool create hdd_pool hdd_rule
pool 'hdd_pool' created
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd crush rule dump hdd_rule
{
"rule_id": 3,
"rule_name": "hdd_rule",
"type": 1,
"steps": [
{
"op": "take",
"item": -2,
"item_name": "default~hdd"
},
{
"op": "chooseleaf_firstn",
"num": 0,
"type": "rack"
},
{
"op": "emit"
}
]
}
3. ceph pg dump
OSD_STAT USED AVAIL USED_RAW TOTAL HB_PEERS PG_SUM PRIMARY_PG_SUM
23 81 MiB 15 GiB 81 MiB 15 GiB [0,2,4,9,16,17,18,20,21,22] 0 0
22 80 MiB 15 GiB 80 MiB 15 GiB [4,12,13,14,15,16,17,19,21,23] 0 0
21 44 MiB 15 GiB 44 MiB 15 GiB [0,12,14,15,16,18,19,20,22,23] 0 0
20 79 MiB 15 GiB 79 MiB 15 GiB [1,11,13,14,17,18,19,21,22,23] 0 0
19 80 MiB 15 GiB 80 MiB 15 GiB [6,8,12,13,14,16,18,20,21,22] 0 0
18 81 MiB 15 GiB 81 MiB 15 GiB [0,3,5,12,13,15,16,17,19,20,21,23] 0 0
17 48 MiB 15 GiB 48 MiB 15 GiB [2,7,12,14,15,16,18,20,22,23] 0 0
16 79 MiB 15 GiB 79 MiB 15 GiB [1,13,14,15,17,18,19,21,22,23] 0 0
15 79 MiB 15 GiB 79 MiB 15 GiB [0,1,10,14,16,17,18,20,21,22] 0 0
14 81 MiB 15 GiB 81 MiB 15 GiB [7,9,12,13,15,16,17,19,20,21,23] 0 0
13 44 MiB 15 GiB 44 MiB 15 GiB [4,12,14,15,16,18,19,20,22,23] 0 0
0 184 MiB 15 GiB 184 MiB 15 GiB [1,2,3,4,5,6,7,9,10,11,13,22,23] 136 50
1 46 MiB 15 GiB 46 MiB 15 GiB [0,2,3,4,6,7,8,10,11,14,15,16] 126 45
2 169 MiB 15 GiB 169 MiB 15 GiB [0,1,3,4,5,7,8,9,11,16,19,20,21] 130 45
3 240 MiB 15 GiB 240 MiB 15 GiB [0,1,2,4,5,6,7,8,9,10,16,18,20,21,22] 136 40
4 203 MiB 15 GiB 203 MiB 15 GiB [0,1,2,3,5,6,7,9,10,11,13,21,22] 118 44
5 47 MiB 15 GiB 47 MiB 15 GiB [0,1,2,3,4,6,7,8,10,11] 120 28
6 203 MiB 15 GiB 203 MiB 15 GiB [0,1,3,4,5,7,8,9,11,13,15,16,17,19,23] 124 44
7 184 MiB 15 GiB 184 MiB 15 GiB [0,1,2,3,4,5,6,8,9,10,12,13,14,16,18] 109 26
8 204 MiB 15 GiB 204 MiB 15 GiB [0,1,2,3,5,6,7,9,10,11,17,18,21,23] 120 48
9 447 MiB 15 GiB 447 MiB 15 GiB [0,2,3,4,6,7,8,10,11,23] 152 50
10 152 MiB 15 GiB 152 MiB 15 GiB [0,1,3,4,5,7,8,9,11,15,16,20,23] 140 48
11 221 MiB 15 GiB 221 MiB 15 GiB [0,1,2,4,5,6,7,8,9,10,12,16,18] 128 45
12 79 MiB 15 GiB 79 MiB 15 GiB [1,10,11,13,14,17,18,21,22,23] 0 0
4. Execute ceph osd ok-to-upgrade with max as 30
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd ok-to-upgrade rack1 20 30
{"ok_to_upgrade":true,"all_osds_upgraded":false,"osds_in_crush_bucket":[3,7,11,15,19,23],"osds_ok_to_upgrade":[3,7,11,12,13,14,15,16,17,18,19,20,21,22,23],"osds_upgraded":[],"bad_no_version":[]}
Thu Jan 29 07:40:56 UTC 2026
5. Stop SSD OSDs which does not have PGs.
OSD 12,13,14,15,16,17,18,19,20,21,22,23
[root@ceph-vipin-pr-jq06u8-node6 ~]#
ceph orch daemon stop osd.15
ceph orch daemon stop osd.19
ceph orch daemon stop osd.23
ceph orch daemon stop osd.13
ceph orch daemon stop osd.17
ceph orch daemon stop osd.21
ceph orch daemon stop osd.14
ceph orch daemon stop osd.18
ceph orch daemon stop osd.22
ceph orch daemon stop osd.12
ceph orch daemon stop osd.16
ceph orch daemon stop osd.20
Thu Jan 29 07:41:57 UTC 2026
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 0.35005 root default
-11 0 host ceph-vipin-pr-jq06u8-node5
-12 0.08751 rack rack1
-9 0.08751 host ceph-vipin-pr-jq06u8-node1-installer
3 hdd 0.01459 osd.3 up 1.00000 1.00000
7 hdd 0.01459 osd.7 up 1.00000 1.00000
11 hdd 0.01459 osd.11 up 1.00000 1.00000
15 ssd 0.01459 osd.15 down 1.00000 1.00000
19 ssd 0.01459 osd.19 down 1.00000 1.00000
23 ssd 0.01459 osd.23 down 1.00000 1.00000
-13 0.08751 rack rack2
-3 0.08751 host ceph-vipin-pr-jq06u8-node2
1 hdd 0.01459 osd.1 up 1.00000 1.00000
5 hdd 0.01459 osd.5 up 1.00000 1.00000
9 hdd 0.01459 osd.9 up 1.00000 1.00000
13 ssd 0.01459 osd.13 down 1.00000 1.00000
17 ssd 0.01459 osd.17 down 1.00000 1.00000
21 ssd 0.01459 osd.21 down 1.00000 1.00000
-14 0.08751 rack rack3
-7 0.08751 host ceph-vipin-pr-jq06u8-node3
2 hdd 0.01459 osd.2 up 1.00000 1.00000
6 hdd 0.01459 osd.6 up 1.00000 1.00000
10 hdd 0.01459 osd.10 up 1.00000 1.00000
14 ssd 0.01459 osd.14 down 1.00000 1.00000
18 ssd 0.01459 osd.18 down 1.00000 1.00000
22 ssd 0.01459 osd.22 down 1.00000 1.00000
-15 0.08752 rack rack4
-5 0.08752 host ceph-vipin-pr-jq06u8-node4
0 hdd 0.01459 osd.0 up 1.00000 1.00000
4 hdd 0.01459 osd.4 up 1.00000 1.00000
8 hdd 0.01459 osd.8 up 1.00000 1.00000
12 ssd 0.01459 osd.12 down 1.00000 1.00000
16 ssd 0.01459 osd.16 down 1.00000 1.00000
20 ssd 0.01459 osd.20 down 1.00000 1.00000
Thu Jan 29 07:42:36 UTC 2026
6. Wait till cluster stabilize and Execute ceph osd ok-to-upgrade with max as 30
Observe:-
(1) Stopped OSDs from rack1 (i.e 15,19,23) are included in osds_ok_to_upgrade
(2) Stopped OSDs from rack2,rack3,rack4 (i.e 13,17,21,14,18,22,12,16,20) are not included in osds_ok_to_upgrade
(3) If stopped OSDs from rack1 is included in osds_ok_to_upgrade, then the stopped OSDs from rack2,rack3,rack4 should be included in osds_ok_to_upgrade.
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd ok-to-upgrade rack1 20 30
{"ok_to_upgrade":true,"all_osds_upgraded":false,"osds_in_crush_bucket":[3,7,11,15,19,23],"osds_ok_to_upgrade":[3,7,11,15,19,23],"osds_upgraded":[],"bad_no_version":[]}
Thu Jan 29 08:54:05 UTC 2026
Version-Release number of selected component (if applicable):
Ceph build created from PR https://github.com/ceph/ceph/pull/66108
How reproducible:
2/2
Actual results:
Stopped OSDs from rack1 (i.e 15,19,23) are included in osds_ok_to_upgrade
Stopped OSDs from rack2,rack3,rack4 (i.e 13,17,21,14,18,22,12,16,20) are not included in osds_ok_to_upgrade
Expected results:
If stopped OSDs from rack1 is included in osds_ok_to_upgrade, then the stopped OSDs from rack2,rack3,rack4 should be included in osds_ok_to_upgrade.
Additional info:
Files
VM Updated by Vipin M S 10 months ago
Comments on Step #4
4. Execute ceph osd ok-to-upgrade with max as 30, observe all the OSDs of rack1 + OSDs without any PG are ok-to-upgrade.
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd ok-to-upgrade rack1 20 30
{"ok_to_upgrade":true,"all_osds_upgraded":false,"osds_in_crush_bucket":[3,7,11,15,19,23],"osds_ok_to_upgrade":[3,7,11,12,13,14,15,16,17,18,19,20,21,22,23],"osds_upgraded":[],"bad_no_version":[]}
Thu Jan 29 07:40:56 UTC 2026
VM Updated by Vipin M S 10 months ago
- File ok-to-stop.mgr.logs ok-to-stop.mgr.logs added
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd ok-to-stop 3 7 11 15 19 23 13 17 21 14 18 22 12 16 20
{"ok_to_stop":true,"osds":[3,7,11,12,13,14,15,16,17,18,19,20,21,22,23],"num_ok_pgs":373,"num_not_ok_pgs":0,"ok_become_degraded":["1.0","17.0","17.1","17.2","17.6","17.7","17.9","17.a","17.b","17.c","17.e","17.11","17.12","17.13","17.15","17.17","17.18","17.1a","17.1b","17.1c","17.1d","17.1e","17.1f","17.20","17.22","17.23","17.24","17.25","17.26","17.27","17.28","17.29","17.2a","17.2b","17.2c","17.2d","17.30","17.31","17.32","17.33","17.34","17.36","17.37","17.39","17.3a","17.3c","17.3e","17.41","17.43","17.46","17.47","17.48","17.4a","17.4b","17.4c","17.4e","17.4f","17.50","17.51","17.52","17.54","17.55","17.57","17.58","17.5a","17.5b","17.5d","17.5e","17.60","17.65","17.67","17.68","17.69","17.6a","17.6b","17.6c","17.6d","17.6e","17.72","17.73","17.74","17.75","17.77","17.78","17.7c","17.7e","17.7f","17.80","17.81","17.83","17.84","17.86","17.88","17.8d","17.8e","17.8f","17.90","17.91","17.92","17.93","17.94","17.95","17.96","17.99","17.9c","17.9d","17.9e","17.9f","17.a0","17.a1","17.a2","17.a6","17.a7","17.a8","17.aa","17.ac","17.ae","17.af","17.b0","17.b1","17.b2","17.b4","17.b5","17.b6","17.b7","17.b8","17.b9","17.ba","17.bc","17.bf","17.c0","17.c1","17.c3","17.c4","17.c5","17.c7","17.c8","17.c9","17.ca","17.cb","17.cc","17.cf","17.d0","17.d1","17.d2","17.d3","17.d6","17.d7","17.d9","17.da","17.db","17.dc","17.de","17.df","17.e0","17.e1","17.e2","17.e3","17.e4","17.e5","17.e6","17.e8","17.ea","17.eb","17.ec","17.ed","17.ee","17.ef","17.f0","17.f1","17.f2","17.f3","17.f4","17.f6","17.f7","17.f8","17.f9","17.fa","17.fb","17.fe","17.ff","17.100","17.102","17.103","17.104","17.105","17.106","17.107","17.108","17.109","17.10a","17.10c","17.10d","17.10e","17.10f","17.110","17.111","17.112","17.113","17.114","17.115","17.118","17.119","17.11a","17.11b","17.11d","17.11f","17.121","17.122","17.124","17.125","17.126","17.127","17.128","17.12c","17.12d","17.12e","17.130","17.131","17.132","17.134","17.137","17.138","17.139","17.13a","17.13b","17.13d","17.13e","17.13f","17.140","17.142","17.145","17.146","17.148","17.149","17.14a","17.14c","17.14e","17.14f","17.150","17.151","17.152","17.153","17.154","17.155","17.156","17.157","17.158","17.159","17.15a","17.15b","17.15c","17.15d","17.15e","17.15f","17.160","17.161","17.162","17.164","17.166","17.167","17.168","17.16a","17.16b","17.16e","17.16f","17.170","17.171","17.172","17.174","17.175","17.178","17.179","17.17a","17.17b","17.17d","17.17f","17.180","17.181","17.182","17.184","17.185","17.186","17.187","17.188","17.189","17.18a","17.18d","17.18e","17.18f","17.190","17.191","17.192","17.193","17.194","17.195","17.196","17.197","17.198","17.19a","17.19b","17.19c","17.19e","17.19f","17.1a0","17.1a1","17.1a2","17.1a3","17.1a4","17.1a5","17.1a7","17.1a8","17.1a9","17.1aa","17.1ab","17.1ad","17.1ae","17.1af","17.1b0","17.1b1","17.1b3","17.1b5","17.1b6","17.1b7","17.1b8","17.1b9","17.1bc","17.1bf","17.1c0","17.1c1","17.1c3","17.1c4","17.1c5","17.1c6","17.1c7","17.1c8","17.1c9","17.1ca","17.1cd","17.1cf","17.1d0","17.1d1","17.1d2","17.1d3","17.1d4","17.1d5","17.1d8","17.1d9","17.1da","17.1db","17.1dd","17.1de","17.1df","17.1e1","17.1e2","17.1e4","17.1e5","17.1e8","17.1e9","17.1eb","17.1ed","17.1ee","17.1ef","17.1f2","17.1f4","17.1f5","17.1f6","17.1f7","17.1f8","17.1f9","17.1fd","17.1fe","17.1ff"]}
Thu Jan 29 09:22:03 UTC 2026
SS Updated by Sridhar Seshasayee 10 months ago
- Assignee set to Sridhar Seshasayee
RZ Updated by Radoslaw Zarzynski 10 months ago
Bump up.
SS Updated by Sridhar Seshasayee 10 months ago · Edited
- Status changed from New to Need More Info
- Assignee changed from Sridhar Seshasayee to Vipin M S
@[email protected] , I am outlining the logic behind both the commands below in
order to explain the observations.
Both ok-to-stop and ok-to-upgrade have two phases which identify OSDs that
can be safely stopped. If 'max' was not passed to the command, it is set to
the number of OSDs passed to the command.
The first phase calls _check_offlines_pgs() with all the OSDs passed to the
command. If the outcome is that all the specified OSDs can be safely stopped,
the command returns if the number of OSDs found is >= max. Otherwise, the
logic moves to the second phase to identify more OSDs if possible.
The second phase considers new OSDs to add only if their states are UP.
OSDs in any other state, for e.g., DOWN are not considered. I am not sure
why OSDs not in UP state are not considered in phase 2. This has been the
behavior so far and I prefer to retain this across both the commands for
now.
Here are the logs from the ok-to-stop command:
2026-01-29T09:22:03.088+0000 7f7ea5c13640 0 log_channel(audit) log [DBG] : from='client.68070 -' entity='client.admin' cmd=[{"prefix": "osd ok-to-stop", "ids": ["3", "7", "11", "15", "19", "23", "13", "17", "21", "14", "18", "22", "12", "16", "20"], "target": ["mon-mgr", ""]}]: dispatch
2026-01-29T09:22:03.088+0000 7f7ea5c13640 20 mgr.server _maximize_ok_to_stop_set orig_osds 3,7,11,12,13,14,15,16,17,18,19,20,21,22,23 max 15
2026-01-29T09:22:03.090+0000 7f7ea5c13640 20 mgr.server _check_offlines_pgs 3,7,11,12,13,14,15,16,17,18,19,20,21,22,23 -> 373 ok, 0 not ok, 0 unknown
2026-01-29T09:22:03.090+0000 7f7ea5c13640 20 mgr.server reply success
The above shows that 'max' was set to 15 which is the total number of
OSDs passed to the command. The first phase of the _check_offlines_pgs()
resulted in all the OSDs considered as safe to stop. Therefore, based on
the logic of phase 1 described above, the command returns success since
the total number of OSDs identified is >= max as seen above in the logs.
Contrast the above with the ok-to-upgrade command. Parameter 'max' is set
to 30. This forces the execution of phase 2. But in phase 2 as described
above, OSDs in DOWN state are ignored. This is the reason why only OSDs
without any PGs are considered. Shown below are log from ok-to-upgrade
command.
2026-01-29T08:54:05.540+0000 7f7ea5c13640 0 log_channel(audit) log [DBG] : from='client.76930 -' entity='client.admin' cmd=[{"prefix": "osd ok-to-upgrade", "crush_bucket": "rack1", "ceph_version": "20", "max": 30, "target": ["mon-mgr", ""]}]: dispatch
2026-01-29T08:54:05.540+0000 7f7ea5c13640 20 mgr.server _maximize_ok_to_upgrade_set orig_osds 3,7,11,15,19,23 new ceph_version 20
2026-01-29T08:54:05.540+0000 7f7ea5c13640 20 mgr.server _maximize_ok_to_upgrade_set found osd.3 to upgrade
2026-01-29T08:54:05.540+0000 7f7ea5c13640 20 mgr.server _maximize_ok_to_upgrade_set found osd.7 to upgrade
2026-01-29T08:54:05.540+0000 7f7ea5c13640 20 mgr.server _maximize_ok_to_upgrade_set found osd.11 to upgrade
2026-01-29T08:54:05.540+0000 7f7ea5c13640 20 mgr.server _maximize_ok_to_upgrade_set found osd.15 to upgrade
2026-01-29T08:54:05.540+0000 7f7ea5c13640 20 mgr.server _maximize_ok_to_upgrade_set found osd.19 to upgrade
2026-01-29T08:54:05.540+0000 7f7ea5c13640 20 mgr.server _maximize_ok_to_upgrade_set found osd.23 to upgrade
2026-01-29T08:54:05.541+0000 7f7ea5c13640 20 mgr.server _check_offlines_pgs 3,7,11,15,19,23 -> 373 ok, 0 not ok, 0 unknown
2026-01-29T08:54:05.541+0000 7f7ea5c13640 20 mgr.server _maximize_ok_to_upgrade_set found 6 OSDs that are safe to upgrade
2026-01-29T08:54:05.541+0000 7f7ea5c13640 20 mgr.server _maximize_ok_to_upgrade_set parent -9 children 3,7,11,15,19,23
2026-01-29T08:54:05.541+0000 7f7ea5c13640 20 mgr.server _maximize_ok_to_upgrade_set parent -12 children -9,3,7,11,15,19,23
2026-01-29T08:54:05.541+0000 7f7ea5c13640 20 mgr.server _maximize_ok_to_upgrade_set parent -1 children -15,-14,-13,-12,-11,-9,-7,-5,-3,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23
2026-01-29T08:54:05.541+0000 7f7ea5c13640 20 mgr.server _check_offlines_pgs 0,3,7,11,15,19,23 -> 339 ok, 85 not ok, 0 unknown
2026-01-29T08:54:05.541+0000 7f7ea5c13640 20 mgr.server _check_offlines_pgs 1,3,7,11,15,19,23 -> 341 ok, 79 not ok, 0 unknown
2026-01-29T08:54:05.541+0000 7f7ea5c13640 20 mgr.server _check_offlines_pgs 2,3,7,11,15,19,23 -> 323 ok, 90 not ok, 0 unknown
2026-01-29T08:54:05.541+0000 7f7ea5c13640 20 mgr.server _check_offlines_pgs 3,4,7,11,15,19,23 -> 327 ok, 82 not ok, 0 unknown
2026-01-29T08:54:05.542+0000 7f7ea5c13640 20 mgr.server _check_offlines_pgs 3,5,7,11,15,19,23 -> 329 ok, 82 not ok, 0 unknown
2026-01-29T08:54:05.542+0000 7f7ea5c13640 20 mgr.server _check_offlines_pgs 3,6,7,11,15,19,23 -> 355 ok, 71 not ok, 0 unknown
2026-01-29T08:54:05.542+0000 7f7ea5c13640 20 mgr.server _check_offlines_pgs 3,7,8,11,15,19,23 -> 359 ok, 67 not ok, 0 unknown
2026-01-29T08:54:05.542+0000 7f7ea5c13640 20 mgr.server _check_offlines_pgs 3,7,9,11,15,19,23 -> 331 ok, 97 not ok, 0 unknown
2026-01-29T08:54:05.542+0000 7f7ea5c13640 20 mgr.server _check_offlines_pgs 3,7,10,11,15,19,23 -> 327 ok, 93 not ok, 0 unknown
2026-01-29T08:54:05.542+0000 7f7ea5c13640 20 mgr.server _maximize_ok_to_upgrade_set hit some peer failures
2026-01-29T08:54:05.542+0000 7f7ea5c13640 20 mgr.server reply success
The above confirms that only OSDs in UP state were attempted in the second
phase i.e., lines after the following:
2026-01-29T08:54:05.541+0000 7f7ea5c13640 20 mgr.server _maximize_ok_to_upgrade_set found 6 OSDs that are safe to upgrade
Therefore, this is expected behavior with both commands.
The behavior observed with ok-to-upgrade can be replicated by passing
'--max 30' to the ok-to-stop command for e.g.,
$ ceph osd ok-to-stop --ids 3 7 11 15 19 23 --max 30
The above should show the same result as observed with ok-to-upgrade command.
If so, then this tracker may be closed. Let me know if there any questions.
SS Updated by Sridhar Seshasayee 10 months ago
- Parent task set to #73031
VM Updated by Vipin M S 10 months ago
Hi Sridhar, As explained above I am observing Down OSDs not being considered in 2nd phase for both commands. The output of ok-to-stop command does not list down OSDs from other racks, but down osds from same rack is being list.
[root@vipin-upstream-6 ceph]# ceph osd ok-to-stop 1 4 7 10 14 17 --max 30
{"ok_to_stop":true,"osds":[1,4,7,10,14,17],"num_ok_pgs":33,"num_not_ok_pgs":0,"ok_become_degraded":["3.1","3.2","3.4","3.5","3.6","3.8","3.b","3.11","3.1a","3.1d","3.1e","3.22","3.24","3.29","3.2a","3.2b","3.2d","3.2e","3.33","3.3d","3.46","3.4a","3.50","3.53","3.54","3.58","3.59","3.62","3.64","3.67","3.6e","3.6f","3.77"]}
Thu Feb 12 02:33:51 AM EST 2026
SS Updated by Sridhar Seshasayee 10 months ago · Edited
- Status changed from Need More Info to Closed
- Assignee changed from Vipin M S to Sridhar Seshasayee
Update:
As noted by submitter in comment #note-7, the behavior when OSDs are marked down
across racks is the same across ok-to-stop and ok-to-upgrade commands. At this
time I would prefer this behavior to be consistent across both the commands.
I am therefore marking this closed for now. This can be revisited if any
optimizations around this are needed in the future.
Workaround:
Explicitly specify rack host crush bucket in the command to consider down osds in the first phase.