Bug #74696
closedmgr - Bug #73031: Implement a new ok-to-upgrade command
[ok-to-upgrade] ok-to-upgrade returns empty osds_ok_to_upgrade for OSDs with no PGs while ok-to-stop correctly identifies them as safe when osds of host are down.
0%
Description
Description of problem:
ceph osd ok-to-upgrade command fails to identify OSDs that have no Placement Groups (PGs)
assigned as safe to upgrade, even when the ceph osd ok-to-stop command correctly identifies
the same OSDs as safe to stop when one host's OSDs are stopped
Cluster configuration:
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 0.35010 root default
-9 0.08752 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
-3 0.08752 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
-7 0.08752 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
-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
Crush rules:
rule ssd_rule {
id 2
type replicated
step take default class ssd
step chooseleaf firstn 0 type host
step emit
}
rule hdd_rule {
id 3
type replicated
step take default class hdd
step chooseleaf firstn 0 type host
step emit
}
Pools are configured to use HDD devices.
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd pool ls detail
pool 1 '.mgr' replicated size 3 min_size 2 crush_rule 3 object_hash rjenkins pg_num 1 pgp_num 1 autoscale_mode on last_change 5324 flags hashpspool stripe_width 0 pg_num_max 32 pg_num_min 1 application mgr read_balance_score 12.00
pool 17 'hdd_pool' replicated size 3 min_size 2 crush_rule 3 object_hash rjenkins pg_num 512 pgp_num 512 autoscale_mode on last_change 5365 lfor 0/0/5344 flags hashpspool,bulk stripe_width 0 application rados read_balance_score 1.20
None of the OSDs are assigned to SSD devices.
OSD_STAT USED AVAIL USED_RAW TOTAL HB_PEERS PG_SUM PRIMARY_PG_SUM
3 75 MiB 15 GiB 75 MiB 15 GiB [0,2,4,5,6,8,9,10,20,21,22] 141 60
23 61 MiB 15 GiB 61 MiB 15 GiB [0,2,4,8,9,10,11,12,21,22] 0 0
22 78 MiB 15 GiB 78 MiB 15 GiB [4,5,15,16,17,19,20,21,23] 0 0
21 43 MiB 15 GiB 43 MiB 15 GiB [0,2,4,6,12,14,15,20,22,23] 0 0
20 78 MiB 15 GiB 78 MiB 15 GiB [11,15,16,18,19,21,22,23] 0 0
19 60 MiB 15 GiB 60 MiB 15 GiB [6,7,8,13,17,18,20,21,22,23] 0 0
18 79 MiB 15 GiB 79 MiB 15 GiB [0,5,7,15,16,19,20,22,23] 0 0
17 47 MiB 15 GiB 47 MiB 15 GiB [2,3,4,16,18,19,20,21,22,23] 0 0
16 78 MiB 15 GiB 78 MiB 15 GiB [11,15,18,19,20,21,22,23] 0 0
15 60 MiB 15 GiB 60 MiB 15 GiB [0,10,14,16,18,19,20,21,22,23] 0 0
14 79 MiB 15 GiB 79 MiB 15 GiB [3,9,15,16,19,20,21,22,23] 0 0
0 200 MiB 15 GiB 200 MiB 15 GiB [2,3,4,5,6,7,8,9,10,11,23] 124 57
13 43 MiB 15 GiB 43 MiB 15 GiB [4,11,12,14,15,18,19,20,22,23] 0 0
1 62 MiB 15 GiB 62 MiB 15 GiB [0,2,3,4,6,7,8,10,11,14,15,16] 0 0
2 185 MiB 15 GiB 185 MiB 15 GiB [0,3,4,5,6,7,8,9,10,11,19,20,21] 133 46
4 218 MiB 15 GiB 218 MiB 15 GiB [0,2,3,5,6,7,8,9,10,11,13,22] 118 44
5 62 MiB 15 GiB 62 MiB 15 GiB [0,2,3,4,6,7,8,9,10,11] 96 28
6 202 MiB 15 GiB 202 MiB 15 GiB [0,2,3,4,5,7,8,9,10,11,15,21] 132 49
7 61 MiB 15 GiB 61 MiB 15 GiB [0,2,4,5,6,8,9,10,16,18,21] 125 40
8 201 MiB 15 GiB 201 MiB 15 GiB [0,2,3,4,5,6,7,9,10,11,18,23] 122 40
9 63 MiB 15 GiB 63 MiB 15 GiB [0,2,3,4,6,7,8,10,11,23] 127 43
10 184 MiB 15 GiB 184 MiB 15 GiB [0,2,3,4,5,6,7,8,9,11,15,21] 128 56
11 83 MiB 15 GiB 83 MiB 15 GiB [0,2,4,5,6,7,8,9,10,12,16,17,18] 126 50
12 78 MiB 15 GiB 78 MiB 15 GiB [10,11,13,15,16,18,20,21,22,23] 0 0
All OSDs of host1 are ok-to-upgrade and ok-to-stop
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd ok-to-upgrade ceph-vipin-pr-jq06u8-node1-installer 20
{"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":[]}
Mon Feb 2 04:09:56 UTC 2026
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd ok-to-stop 3 7 11 15 19 23
{"ok_to_stop":true,"osds":[3,7,11,15,19,23],"num_ok_pgs":392,"num_not_ok_pgs":0,"ok_become_degraded":["1.0","17.0","17.1","17.3","17.5","17.6","17.8","17.9","17.c","17.d","17.f","17.10","17.11","17.12","17.13","17.15","17.16","17.17","17.18","17.19","17.1a","17.1c","17.1e","17.1f","17.20","17.21","17.22","17.23","17.24","17.25","17.27","17.28","17.2c","17.2f","17.31","17.33","17.35","17.36","17.37","17.3b","17.3d","17.3e","17.3f","17.40","17.41","17.42","17.43","17.45","17.46","17.47","17.48","17.49","17.4a","17.4c","17.4d","17.4e","17.50","17.51","17.52","17.54","17.55","17.56","17.59","17.5a","17.5b","17.5c","17.5d","17.5e","17.5f","17.60","17.62","17.64","17.65","17.66","17.67","17.68","17.69","17.6a","17.6b","17.6d","17.6e","17.6f","17.70","17.71","17.72","17.73","17.74","17.75","17.76","17.77","17.78","17.7a","17.7c","17.7e","17.80","17.81","17.82","17.83","17.84","17.85","17.86","17.87","17.88","17.89","17.8b","17.8c","17.8d","17.8f","17.90","17.91","17.92","17.93","17.94","17.95","17.97","17.98","17.9a","17.9b","17.9c","17.9f","17.a0","17.a1","17.a2","17.a4","17.a6","17.a8","17.a9","17.aa","17.ab","17.ac","17.ad","17.ae","17.af","17.b0","17.b1","17.b4","17.b5","17.b6","17.b7","17.b8","17.b9","17.ba","17.bc","17.bd","17.be","17.bf","17.c0","17.c1","17.c2","17.c3","17.c4","17.c6","17.c9","17.ca","17.cb","17.cc","17.cd","17.ce","17.cf","17.d1","17.d3","17.d4","17.d7","17.d9","17.db","17.dc","17.dd","17.de","17.e0","17.e1","17.e3","17.e4","17.e6","17.e7","17.e8","17.ea","17.eb","17.ec","17.ed","17.ee","17.ef","17.f0","17.f2","17.f3","17.f4","17.f5","17.f6","17.f8","17.f9","17.fa","17.fb","17.fc","17.ff","17.100","17.101","17.102","17.103","17.105","17.107","17.108","17.109","17.10a","17.10e","17.110","17.111","17.112","17.113","17.114","17.115","17.116","17.118","17.119","17.11b","17.11c","17.11d","17.11e","17.11f","17.120","17.121","17.122","17.123","17.124","17.125","17.127","17.129","17.12a","17.12c","17.12d","17.12e","17.12f","17.130","17.132","17.136","17.139","17.13b","17.13d","17.13e","17.141","17.144","17.146","17.148","17.149","17.14a","17.14c","17.14d","17.14e","17.14f","17.152","17.153","17.154","17.155","17.156","17.158","17.159","17.15a","17.15b","17.15c","17.15e","17.15f","17.160","17.161","17.162","17.163","17.164","17.165","17.166","17.167","17.169","17.16b","17.16e","17.16f","17.170","17.171","17.173","17.174","17.175","17.176","17.178","17.179","17.17a","17.17b","17.17c","17.17d","17.17e","17.17f","17.180","17.181","17.182","17.184","17.186","17.187","17.188","17.189","17.18a","17.18b","17.18c","17.18d","17.18e","17.18f","17.190","17.191","17.193","17.194","17.195","17.196","17.197","17.198","17.199","17.19b","17.19c","17.19d","17.19e","17.19f","17.1a0","17.1a1","17.1a2","17.1a3","17.1a4","17.1a5","17.1a6","17.1a7","17.1a8","17.1a9","17.1aa","17.1ab","17.1ac","17.1ae","17.1b0","17.1b1","17.1b2","17.1b3","17.1b4","17.1b5","17.1b7","17.1b9","17.1ba","17.1bb","17.1bc","17.1bd","17.1c0","17.1c1","17.1c2","17.1c4","17.1c5","17.1c6","17.1c7","17.1c9","17.1ca","17.1cb","17.1cc","17.1cd","17.1ce","17.1cf","17.1d0","17.1d1","17.1d2","17.1d3","17.1d5","17.1d6","17.1d7","17.1d9","17.1da","17.1db","17.1dc","17.1dd","17.1e0","17.1e1","17.1e2","17.1e3","17.1e6","17.1e7","17.1e8","17.1e9","17.1ea","17.1eb","17.1ec","17.1ed","17.1ee","17.1ef","17.1f0","17.1f1","17.1f3","17.1f5","17.1f6","17.1f7","17.1f8","17.1f9","17.1fa","17.1fb","17.1fc","17.1fe","17.1ff"]}
Mon Feb 2 04:10:11 UTC 2026
Simulate the unavailability of 1 replica, Since we use size 3 and min_size 2.
[root@ceph-vipin-pr-jq06u8-node6 ~]# for i in 1 5 9 13 17 21; do ceph orch daemon stop osd.$i; done
Scheduled to stop osd.1 on host 'ceph-vipin-pr-jq06u8-node2'
Scheduled to stop osd.5 on host 'ceph-vipin-pr-jq06u8-node2'
Scheduled to stop osd.9 on host 'ceph-vipin-pr-jq06u8-node2'
Scheduled to stop osd.13 on host 'ceph-vipin-pr-jq06u8-node2'
Scheduled to stop osd.17 on host 'ceph-vipin-pr-jq06u8-node2'
Scheduled to stop osd.21 on host 'ceph-vipin-pr-jq06u8-node2'
Mon Feb 2 04:10:40 UTC 2026
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 0.35004 root default
-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
-3 0.08751 host ceph-vipin-pr-jq06u8-node2
1 hdd 0.01459 osd.1 down 1.00000 1.00000
5 hdd 0.01459 osd.5 down 1.00000 1.00000
9 hdd 0.01459 osd.9 down 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
-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
-5 0.08751 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
The SSD OSDs (15, 19, 23) of Host1 which does not have any PG assigned are safe to upgrade.
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd ok-to-stop 15 19 23
{"ok_to_stop":true,"osds":[15,19,23],"num_ok_pgs":0,"num_not_ok_pgs":0}
Mon Feb 2 04:11:27 UTC 2026
But ok-to-upgrade command does not return the SSD OSDs (15, 19, 23) of Host1 which does not have any PG assigned and are safe to upgrade.
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd ok-to-upgrade ceph-vipin-pr-jq06u8-node1-installer 20
{"ok_to_upgrade":false,"all_osds_upgraded":false,"osds_in_crush_bucket":[3,7,11,15,19,23],"osds_ok_to_upgrade":[],"osds_upgraded":[],"bad_no_version":[]}
Error EBUSY: unsafe to upgrade osd(s) at this time (97 PGs are or would become offline)
Mon Feb 2 04:11:16 UTC 2026
Executing ok-to-upgrade on individual OSDs (15, 19, 23) returns the correct result.
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd ok-to-upgrade osd.15 20
{"ok_to_upgrade":true,"all_osds_upgraded":false,"osds_in_crush_bucket":[15],"osds_ok_to_upgrade":[15],"osds_upgraded":[],"bad_no_version":[]}
Mon Feb 2 04:24:36 UTC 2026
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd ok-to-upgrade osd.19 20
{"ok_to_upgrade":true,"all_osds_upgraded":false,"osds_in_crush_bucket":[19],"osds_ok_to_upgrade":[19],"osds_upgraded":[],"bad_no_version":[]}
Mon Feb 2 04:24:43 UTC 2026
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd ok-to-upgrade osd.23 20
{"ok_to_upgrade":true,"all_osds_upgraded":false,"osds_in_crush_bucket":[23],"osds_ok_to_upgrade":[23],"osds_upgraded":[],"bad_no_version":[]}
Mon Feb 2 04:24:45 UTC 2026
Steps to Reproduce:
1. Deploy a 4-node Ceph cluster with mixed HDD and SSD OSDs (6 OSDs per node: 3 HDD + 3 SSD)
2. Create CRUSH rules for HDD and SSD device classes
3. Configure all pools to use only HDD devices (hdd_rule with crush_rule 3)
4. Verify SSD OSDs have 0 PGs assigned (ceph osd df shows PG_SUM=0 for SSD OSDs)
5. Confirm all OSDs on host1 are ok-to-upgrade: ceph osd ok-to-upgrade <host1> 20
6. Stop all OSDs on host2 to simulate partial unavailability: for i in 1 5 9 13 17 21; do ceph orch daemon stop osd.$i; done
7. Verify SSD OSDs (15, 19, 23) on host1 are ok-to-stop: ceph osd ok-to-stop 15 19 23
8. Check if SSD OSDs on host1 are ok-to-upgrade: ceph osd ok-to-upgrade <host1> 20
Actual results:
- ceph osd ok-to-stop 15 19 23 returns: {"ok_to_stop":true,"osds":[15,19,23],"num_ok_pgs":0,"num_not_ok_pgs":0}
- ceph osd ok-to-upgrade <host1> 20 returns: {"ok_to_upgrade":false,"all_osds_upgraded":false,"osds_in_crush_bucket":[3,7,11,15,19,23],"osds_ok_to_upgrade":[],...}
Error EBUSY: unsafe to upgrade osd(s) at this time (97 PGs are or would become offline)
- The SSD OSDs (15, 19, 23) which have no PGs are NOT returned in osds_ok_to_upgrade list
Expected results:
- The ok-to-upgrade command should return SSD OSDs (15, 19, 23) in the osds_ok_to_upgrade list since they have no PGs assigned
- Response should be: {"ok_to_upgrade":true,...,"osds_ok_to_upgrade":[15,19,23],...} for OSDs with 0 PGs
- Behavior should be consistent with ok-to-stop which correctly identifies these OSDs as safe
Version-Release number of selected component (if applicable):
How reproducible:
2/2
Additional info:
Files
VM Updated by Vipin M S 10 months ago
- File 74696.mgr.log.zip 74696.mgr.log.zip added
VM Updated by Vipin M S 10 months ago
Here are the observations when ok-to-stop is executed with all OSDs of host1.
ok-to-stop of all the OSDs returned Error EBUSY same as ok-to-upgrade.
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd ok-to-stop 3 7 11 15 19 23 20
{"ok_to_stop":false,"osds":[3,7,11,15,19,20,23],"num_ok_pgs":123,"num_not_ok_pgs":269,"bad_become_inactive":["1.0","17.1","17.6","17.8","17.f","17.10","17.11","17.13","17.15","17.16","17.17","17.19","17.1c","17.1e","17.20","17.22","17.23","17.24","17.27","17.28","17.2c","17.2f","17.31","17.33","17.35","17.3b","17.3d","17.3f","17.40","17.41","17.42","17.46","17.47","17.48","17.49","17.4c","17.4d","17.4e","17.51","17.52","17.54","17.55","17.56","17.59","17.5a","17.5b","17.5c","17.5d","17.5f","17.60","17.62","17.65","17.69","17.6a","17.6d","17.6e","17.6f","17.70","17.71","17.72","17.74","17.75","17.76","17.77","17.78","17.7c","17.7e","17.80","17.81","17.82","17.83","17.85","17.88","17.89","17.8d","17.8f","17.90","17.91","17.92","17.93","17.94","17.95","17.97","17.98","17.9a","17.9b","17.9f","17.a1","17.a2","17.a4","17.a8","17.a9","17.aa","17.ab","17.ac","17.ad","17.ae","17.b1","17.b4","17.b8","17.b9","17.ba","17.bd","17.c1","17.c2","17.c3","17.c4","17.c6","17.ca","17.cb","17.cc","17.cd","17.cf","17.d1","17.d4","17.d7","17.d9","17.dc","17.dd","17.de","17.e1","17.e3","17.e4","17.e8","17.ea","17.eb","17.ec","17.ed","17.f2","17.f3","17.f8","17.f9","17.fb","17.ff","17.100","17.101","17.103","17.105","17.107","17.109","17.10a","17.111","17.112","17.113","17.118","17.119","17.11d","17.11e","17.121","17.122","17.123","17.125","17.127","17.129","17.12a","17.12c","17.12f","17.132","17.139","17.13b","17.13d","17.13e","17.141","17.144","17.146","17.14a","17.14d","17.14e","17.14f","17.152","17.153","17.158","17.159","17.15c","17.15e","17.15f","17.162","17.164","17.165","17.166","17.169","17.16e","17.16f","17.170","17.171","17.175","17.179","17.17a","17.17b","17.17c","17.17d","17.17e","17.17f","17.180","17.181","17.182","17.184","17.186","17.188","17.189","17.18a","17.18b","17.18c","17.18e","17.18f","17.190","17.191","17.193","17.195","17.196","17.198","17.199","17.19c","17.19d","17.19f","17.1a0","17.1a1","17.1a2","17.1a3","17.1a4","17.1a5","17.1a7","17.1a8","17.1a9","17.1aa","17.1ac","17.1ae","17.1b0","17.1b3","17.1b4","17.1b5","17.1ba","17.1bb","17.1bc","17.1bd","17.1c0","17.1c1","17.1c2","17.1c4","17.1c5","17.1c7","17.1c9","17.1cb","17.1ce","17.1cf","17.1d0","17.1d1","17.1d3","17.1d5","17.1d9","17.1da","17.1dc","17.1dd","17.1e0","17.1e2","17.1e3","17.1e6","17.1e7","17.1e9","17.1eb","17.1ed","17.1ee","17.1ef","17.1f0","17.1f3","17.1f5","17.1fc","17.1fe","17.1ff"],"ok_become_degraded":["17.0","17.3","17.5","17.9","17.c","17.d","17.12","17.18","17.1a","17.1f","17.21","17.25","17.36","17.37","17.3e","17.43","17.45","17.4a","17.50","17.5e","17.64","17.66","17.67","17.68","17.6b","17.73","17.7a","17.84","17.86","17.87","17.8b","17.8c","17.9c","17.a0","17.a6","17.af","17.b0","17.b5","17.b6","17.b7","17.bc","17.be","17.bf","17.c0","17.c9","17.ce","17.d3","17.db","17.e0","17.e6","17.e7","17.ee","17.ef","17.f0","17.f4","17.f5","17.f6","17.fa","17.fc","17.102","17.108","17.10e","17.110","17.114","17.115","17.116","17.11b","17.11c","17.11f","17.120","17.124","17.12d","17.12e","17.130","17.136","17.148","17.149","17.14c","17.154","17.155","17.156","17.15a","17.15b","17.160","17.161","17.163","17.167","17.16b","17.173","17.174","17.176","17.178","17.187","17.18d","17.194","17.197","17.19b","17.19e","17.1a6","17.1ab","17.1b1","17.1b2","17.1b7","17.1b9","17.1c6","17.1ca","17.1cc","17.1cd","17.1d2","17.1d6","17.1d7","17.1db","17.1e1","17.1e8","17.1ea","17.1ec","17.1f1","17.1f6","17.1f7","17.1f8","17.1f9","17.1fa","17.1fb"]}
Error EBUSY: unsafe to stop osd(s) at this time (269 PGs are or would become offline)
Performed a experiment as below:-
1)Replace the device class for CRUSH rule to SSD.
2) All the HDD devices now have 0 PG
3) All the SSD devices now have PGs.
Observing different results in this case. The HDD osds (3,7,11) are now populated in ok_to_upgrade list.
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 0.35004 root default
-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
-3 0.08751 host ceph-vipin-pr-jq06u8-node2
1 hdd 0.01459 osd.1 down 1.00000 1.00000
5 hdd 0.01459 osd.5 down 1.00000 1.00000
9 hdd 0.01459 osd.9 down 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
-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
-5 0.08751 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
OSD_STAT USED AVAIL USED_RAW TOTAL HB_PEERS PG_SUM PRIMARY_PG_SUM
3 77 MiB 15 GiB 77 MiB 15 GiB [2,4,6,7,8,10,11,12,20,22] 0 0
23 80 MiB 15 GiB 80 MiB 15 GiB [0,2,3,4,12,14,16,18,20,22] 117 47
22 79 MiB 15 GiB 79 MiB 15 GiB [0,2,3,4,12,15,16,19,20,23] 121 48
21 45 MiB 15 GiB 45 MiB 15 GiB [10,12,14,15,16,18,19,20,22,23] 0 0
20 81 MiB 15 GiB 81 MiB 15 GiB [0,4,10,11,14,15,18,19,22,23] 126 54
19 81 MiB 15 GiB 81 MiB 15 GiB [0,6,8,12,14,16,18,20,22,23] 148 60
18 81 MiB 15 GiB 81 MiB 15 GiB [4,6,7,12,15,16,19,20,22,23] 132 58
17 48 MiB 15 GiB 48 MiB 15 GiB [2,3,12,14,15,16,18,19,20,22,23] 0 0
16 80 MiB 15 GiB 80 MiB 15 GiB [3,4,6,14,15,18,19,20,22,23] 138 75
15 79 MiB 15 GiB 79 MiB 15 GiB [0,8,10,12,14,16,18,19,20,22] 118 66
14 81 MiB 15 GiB 81 MiB 15 GiB [3,4,8,12,15,16,18,19,20,23] 128 49
0 201 MiB 15 GiB 201 MiB 15 GiB [2,3,4,6,7,8,10,11,12,23] 0 0
13 46 MiB 15 GiB 46 MiB 15 GiB [4,12,14,15,16,18,19,20,22,23] 0 0
1 46 MiB 15 GiB 46 MiB 15 GiB [0,2,6,7,8,10,11,14,15,16] 0 0
2 221 MiB 15 GiB 221 MiB 15 GiB [0,3,4,7,8,10,11,16,19,20] 0 0
4 237 MiB 15 GiB 237 MiB 15 GiB [3,6,7,8,10,11,12,14,15,22] 0 0
5 46 MiB 15 GiB 46 MiB 15 GiB [0,2,3,4,6,7,8,10,11,12] 0 0
6 220 MiB 15 GiB 220 MiB 15 GiB [0,4,7,8,10,11,12,15,19,20] 0 0
7 80 MiB 15 GiB 80 MiB 15 GiB [6,8,10,11,12,14,15,16,18,19] 0 0
8 220 MiB 15 GiB 220 MiB 15 GiB [7,10,11,12,14,15,16,18,22,23] 0 0
9 46 MiB 15 GiB 46 MiB 15 GiB [0,2,3,4,6,7,8,10,11,23] 0 0
10 185 MiB 15 GiB 185 MiB 15 GiB [0,4,7,8,11,12,14,15,16,18] 0 0
11 83 MiB 15 GiB 83 MiB 15 GiB [7,8,10,12,14,15,16,18,19,20] 0 0
12 79 MiB 15 GiB 79 MiB 15 GiB [2,10,11,14,15,16,18,19,22,23] 124 56
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd ok-to-stop 3 7 11 15 19 23 20
{"ok_to_stop":false,"osds":[3,7,11,15,19,20,23],"num_ok_pgs":80,"num_not_ok_pgs":342,"bad_become_inactive":["1.0","17.0","17.1","17.5","17.6","17.8","17.9","17.a","17.b","17.d","17.e","17.f","17.10","17.11","17.12","17.14","17.15","17.16","17.18","17.19","17.1a","17.1d","17.1f","17.20","17.21","17.23","17.24","17.25","17.26","17.27","17.28","17.29","17.2c","17.2d","17.2e","17.2f","17.31","17.32","17.33","17.36","17.37","17.38","17.39","17.3b","17.3d","17.3e","17.3f","17.41","17.43","17.44","17.45","17.48","17.49","17.4b","17.4c","17.4e","17.50","17.51","17.52","17.55","17.56","17.57","17.5b","17.5c","17.5d","17.5e","17.5f","17.61","17.62","17.63","17.64","17.65","17.66","17.67","17.6b","17.6c","17.6d","17.6e","17.6f","17.72","17.74","17.76","17.77","17.78","17.79","17.80","17.81","17.82","17.84","17.87","17.88","17.89","17.8a","17.8c","17.91","17.92","17.93","17.94","17.95","17.96","17.97","17.98","17.99","17.9b","17.9c","17.9f","17.a0","17.a2","17.a4","17.a6","17.a8","17.a9","17.ab","17.ac","17.ad","17.ae","17.af","17.b0","17.b2","17.b3","17.b6","17.b7","17.b8","17.b9","17.ba","17.bb","17.bc","17.bd","17.be","17.bf","17.c0","17.c1","17.c2","17.c3","17.c4","17.c5","17.c6","17.c7","17.c9","17.cb","17.cd","17.ce","17.cf","17.d0","17.d1","17.d3","17.d6","17.d8","17.da","17.db","17.dc","17.dd","17.e3","17.e5","17.e6","17.e9","17.eb","17.ec","17.ee","17.ef","17.f1","17.f2","17.f3","17.f4","17.f5","17.f6","17.f9","17.fb","17.fc","17.fd","17.fe","17.ff","17.102","17.103","17.105","17.106","17.109","17.10d","17.10e","17.10f","17.110","17.111","17.112","17.113","17.114","17.117","17.11a","17.11b","17.11c","17.11d","17.11e","17.11f","17.120","17.122","17.124","17.126","17.127","17.128","17.129","17.12a","17.12b","17.12c","17.12e","17.12f","17.131","17.133","17.134","17.135","17.136","17.137","17.138","17.139","17.13b","17.13c","17.13d","17.13f","17.140","17.141","17.142","17.144","17.145","17.147","17.148","17.149","17.14a","17.14c","17.14d","17.14e","17.14f","17.150","17.152","17.153","17.155","17.157","17.158","17.159","17.15a","17.15b","17.15c","17.15e","17.15f","17.160","17.161","17.163","17.164","17.165 ..... <redacted> ...........
Error EBUSY: unsafe to stop osd(s) at this time (342 PGs are or would become offline)
Mon Feb 2 07:48:08 UTC 2026
[root@ceph-vipin-pr-jq06u8-node6 ~]# ceph osd ok-to-upgrade ceph-vipin-pr-jq06u8-node1-installer 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],"osds_upgraded":[],"bad_no_version":[]}
Mon Feb 2 07:48:51 UTC 2026
RZ Updated by Radoslaw Zarzynski 10 months ago
- Assignee set to Sridhar Seshasayee
Hi @Sridhar Seshasayee! Could you please take a look?
LF Updated by Laura Flores 10 months ago
- Related to Bug #74610: [ok-to-upgrade] ceph osd ok-to-upgrade command accepts empty strings and random strings for ceph version parameter added
RZ Updated by Radoslaw Zarzynski 10 months ago
Checking with Sridhar whether this is already tackled.
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
- Parent task set to #73031
@[email protected] Can you please re-try this scenario with the latest changes
and check? As usual, please collect logs.
As already described in https://tracker.ceph.com/issues/74640#note-5, the ok-to-upgrade
command works over a couple of phases and especially works differently in phase 1
when compared to ok-to-stop command. This contributes to the differences in behavior
between the two commands.
Based on the test result, we can take the next steps.
VM Updated by Vipin M S 10 months ago
Hi Sridhar, I have tested the workflow with latest fixes. I am still observing the same issue.
I am observing the issue with ok-to-upgrade command. ok-to-stop added just for reference. Command executions are added along with their timestamps and debug_mgr 20 log attached.
When one node is down, The ok-to-upgrade command does not return correct list of ok-to-upgrade OSDs.
Steps to reproduce:-
1) Deploy Ceph cluster with crush hierarchy as below. 4 racks and 1 host within each rack and 6 OSDs in each host. All the PGs are on HDD OSDs and No Pgs are present on SSD OSDs.
2) Make the OSDs of Node2 down
ceph orch daemon stop osd.<id>
3) Execute ok-to-upgrade command
Outputs of steps:-
1) Deploy Ceph cluster with crush hierarchy as below. 4 racks and 1 host within each rack and 6 OSDs in each host. All the PGs are on HDD OSDs and No Pgs are present on SSD OSDs.
[root@vipin-upstream-6 ceph]# ceph osd tree ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF -1 0.70306 root default -11 0.17577 rack rack0 -5 0.17577 host vipin-upstream-2 1 hdd 0.02930 osd.1 up 1.00000 1.00000 4 hdd 0.02930 osd.4 up 1.00000 1.00000 7 hdd 0.02930 osd.7 up 1.00000 1.00000 10 ssd 0.02930 osd.10 up 1.00000 1.00000 14 ssd 0.02930 osd.14 up 1.00000 1.00000 17 ssd 0.02930 osd.17 up 1.00000 1.00000 -13 0.17577 rack rack1 -3 0.17577 host vipin-upstream-3 0 hdd 0.02930 osd.0 up 1.00000 1.00000 3 hdd 0.02930 osd.3 up 1.00000 1.00000 6 hdd 0.02930 osd.6 up 1.00000 1.00000 9 ssd 0.02930 osd.9 up 1.00000 1.00000 12 ssd 0.02930 osd.12 up 1.00000 1.00000 15 ssd 0.02930 osd.15 up 1.00000 1.00000 -15 0.17577 rack rack2 -19 0.17577 host vipin-upstream-0 24 hdd 0.02930 osd.24 up 1.00000 1.00000 25 hdd 0.02930 osd.25 up 1.00000 1.00000 26 hdd 0.02930 osd.26 up 1.00000 1.00000 27 ssd 0.02930 osd.27 up 1.00000 1.00000 28 ssd 0.02930 osd.28 up 1.00000 1.00000 29 ssd 0.02930 osd.29 up 1.00000 1.00000 -17 0.17577 rack rack3 -7 0.17577 host vipin-upstream-1 2 hdd 0.02930 osd.2 up 1.00000 1.00000 5 hdd 0.02930 osd.5 up 1.00000 1.00000 8 hdd 0.02930 osd.8 up 1.00000 1.00000 11 ssd 0.02930 osd.11 up 1.00000 1.00000 16 ssd 0.02930 osd.16 up 1.00000 1.00000 18 ssd 0.02930 osd.18 up 1.00000 1.00000
OSD_STAT USED AVAIL USED_RAW TOTAL HB_PEERS PG_SUM PRIMARY_PG_SUM 29 48 MiB 30 GiB 48 MiB 30 GiB [1,2,4,7,8,11,16,17,25,28] 0 0 12 49 MiB 30 GiB 49 MiB 30 GiB [2,11,14,16,17,18,24,25,26,27] 0 0 11 49 MiB 30 GiB 49 MiB 30 GiB [4,7,8,10,14,16,17,26,27,29] 0 0 10 49 MiB 30 GiB 49 MiB 30 GiB [2,8,11,14,16,24,25,26,27,28] 0 0 9 48 MiB 30 GiB 48 MiB 30 GiB [5,7,8,10,11,14,16,17,18,27] 0 0 8 153 MiB 30 GiB 153 MiB 30 GiB [1,4,7,10,11,14,17,24,25,26] 29 16 7 66 MiB 30 GiB 66 MiB 30 GiB [2,5,8,10,11,17,18,24,25,26] 41 16 6 48 MiB 30 GiB 48 MiB 30 GiB [1,2,4,5,7,8,10,16,24,25,26] 0 0 5 119 MiB 30 GiB 119 MiB 30 GiB [1,4,7,8,10,11,24,25,26,29] 44 17 4 83 MiB 30 GiB 83 MiB 30 GiB [2,5,8,11,14,16,24,25,26,28] 33 18 3 50 MiB 30 GiB 50 MiB 30 GiB [1,2,4,5,7,8,17,24,25,26,27] 0 0 2 83 MiB 30 GiB 83 MiB 30 GiB [1,4,5,7,17,18,24,25,26,28] 27 13 1 83 MiB 30 GiB 83 MiB 30 GiB [2,4,5,8,16,24,25,26,28,29] 37 13 0 50 MiB 30 GiB 50 MiB 30 GiB [1,2,4,5,7,8,10,11,24,25,26,29] 0 0 14 49 MiB 30 GiB 49 MiB 30 GiB [2,4,5,7,8,11,16,17,18,26] 0 0 15 49 MiB 30 GiB 49 MiB 30 GiB [1,11,14,16,17,18,24,25,26,27] 0 0 16 49 MiB 30 GiB 49 MiB 30 GiB [1,5,10,14,17,18,26,27,28,29] 0 0 17 49 MiB 30 GiB 49 MiB 30 GiB [1,2,16,18,24,25,26,27,28,29] 0 0 18 49 MiB 30 GiB 49 MiB 30 GiB [4,7,10,17,24,25,26,27,28,29] 0 0 24 117 MiB 30 GiB 117 MiB 30 GiB [1,2,4,5,7,8,11,18,25,26] 40 17 25 82 MiB 30 GiB 82 MiB 30 GiB [1,2,4,5,7,10,16,24,26,27] 25 9 26 83 MiB 30 GiB 83 MiB 30 GiB [1,2,4,5,7,8,14,18,25,27] 29 10 27 48 MiB 30 GiB 48 MiB 30 GiB [1,2,5,10,16,17,18,26,28,29] 0 0 28 48 MiB 30 GiB 48 MiB 30 GiB [1,4,5,7,11,14,16,25,27,29] 0 0
2) Mark all the OSDs of 2nd node down
[root@vipin-upstream-6 ceph]# ceph osd tree ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF -1 0.70306 root default -11 0.17577 rack rack0 -5 0.17577 host vipin-upstream-2 1 hdd 0.02930 osd.1 up 1.00000 1.00000 4 hdd 0.02930 osd.4 up 1.00000 1.00000 7 hdd 0.02930 osd.7 up 1.00000 1.00000 10 ssd 0.02930 osd.10 up 1.00000 1.00000 14 ssd 0.02930 osd.14 up 1.00000 1.00000 17 ssd 0.02930 osd.17 up 1.00000 1.00000 -13 0.17577 rack rack1 -3 0.17577 host vipin-upstream-3 0 hdd 0.02930 osd.0 down 1.00000 1.00000 3 hdd 0.02930 osd.3 down 1.00000 1.00000 6 hdd 0.02930 osd.6 down 1.00000 1.00000 9 ssd 0.02930 osd.9 down 1.00000 1.00000 12 ssd 0.02930 osd.12 down 1.00000 1.00000 15 ssd 0.02930 osd.15 down 1.00000 1.00000 -15 0.17577 rack rack2 -19 0.17577 host vipin-upstream-0 24 hdd 0.02930 osd.24 up 1.00000 1.00000 25 hdd 0.02930 osd.25 up 1.00000 1.00000 26 hdd 0.02930 osd.26 up 1.00000 1.00000 27 ssd 0.02930 osd.27 up 1.00000 1.00000 28 ssd 0.02930 osd.28 up 1.00000 1.00000 29 ssd 0.02930 osd.29 up 1.00000 1.00000 -17 0.17577 rack rack3 -7 0.17577 host vipin-upstream-1 2 hdd 0.02930 osd.2 up 1.00000 1.00000 5 hdd 0.02930 osd.5 up 1.00000 1.00000 8 hdd 0.02930 osd.8 up 1.00000 1.00000 11 ssd 0.02930 osd.11 up 1.00000 1.00000 16 ssd 0.02930 osd.16 up 1.00000 1.00000 18 ssd 0.02930 osd.18 up 1.00000 1.00000
3) Execute the ok-to-upgrade command. In Rack rack0 we can observed total 6 OSDs 1,4,7,10,14,17.
HDD - 1,4,7 ( PGs are present on HDD OSDs )
SSD - 10,14,17 ( 0 PGs are present on SSD OSDs )
When ok-to-upgrade command is executed.
As expected osd.1, osd.4 and osd.7 are not safe to uprade.
osd.10, osd.14 and osd.17 which does not have PGs should be ok-to-upgrade. But they are not added to the list.
Executing ok-to-upgrade command on osd.10, osd.14 and osd.17 individually displays OSDs are safe to upgrade.
[root@vipin-upstream-6 ceph]# ceph osd ok-to-upgrade rack0 20.1.0-144.el9cp
{"ok_to_upgrade":false,"all_osds_upgraded":false,"osds_in_crush_bucket":[1,4,7,10,14,17],"osds_ok_to_upgrade":[],"osds_upgraded":[],"bad_no_version":[]}
Error EBUSY: unsafe to upgrade osd(s) at this time (15 PGs are or would become offline)
Thu Feb 12 09:23:57 AM UTC 2026
[root@vipin-upstream-6 ceph]# ceph osd ok-to-upgrade osd.1 20.1.0-144.el9cp
{"ok_to_upgrade":false,"all_osds_upgraded":false,"osds_in_crush_bucket":[1],"osds_ok_to_upgrade":[],"osds_upgraded":[],"bad_no_version":[]}
Error EBUSY: unsafe to upgrade osd(s) at this time (15 PGs are or would become offline)
Thu Feb 12 09:24:06 AM UTC 2026
[root@vipin-upstream-6 ceph]# ceph osd ok-to-upgrade osd.10 20.1.0-144.el9cp
{"ok_to_upgrade":true,"all_osds_upgraded":false,"osds_in_crush_bucket":[10],"osds_ok_to_upgrade":[10],"osds_upgraded":[],"bad_no_version":[]}
Thu Feb 12 09:24:13 AM UTC 2026
[root@vipin-upstream-6 ceph]# ceph osd ok-to-upgrade osd.14 20.1.0-144.el9cp
{"ok_to_upgrade":true,"all_osds_upgraded":false,"osds_in_crush_bucket":[14],"osds_ok_to_upgrade":[14],"osds_upgraded":[],"bad_no_version":[]}
Thu Feb 12 09:24:19 AM UTC 2026
[root@vipin-upstream-6 ceph]# ceph osd ok-to-upgrade osd.17 20.1.0-144.el9cp
{"ok_to_upgrade":true,"all_osds_upgraded":false,"osds_in_crush_bucket":[17],"osds_ok_to_upgrade":[17],"osds_upgraded":[],"bad_no_version":[]}
Thu Feb 12 09:24:25 AM UTC 2026
[root@vipin-upstream-6 ceph]# ceph osd ok-to-upgrade osd.4 20.1.0-144.el9cp
{"ok_to_upgrade":false,"all_osds_upgraded":false,"osds_in_crush_bucket":[4],"osds_ok_to_upgrade":[],"osds_upgraded":[],"bad_no_version":[]}
Error EBUSY: unsafe to upgrade osd(s) at this time (4 PGs are or would become offline)
Thu Feb 12 09:24:56 AM UTC 2026
[root@vipin-upstream-6 ceph]# ceph osd ok-to-upgrade osd.7 20.1.0-144.el9cp
{"ok_to_upgrade":false,"all_osds_upgraded":false,"osds_in_crush_bucket":[7],"osds_ok_to_upgrade":[],"osds_upgraded":[],"bad_no_version":[]}
Error EBUSY: unsafe to upgrade osd(s) at this time (14 PGs are or would become offline)
Thu Feb 12 09:25:07 AM UTC 2026
SS Updated by Sridhar Seshasayee 10 months ago
- Status changed from Need More Info to Fix Under Review
- Assignee changed from Vipin M S to Sridhar Seshasayee
Update:
The fix for this issue is pushed to https://github.com/ceph/ceph/pull/66108/.
The fix involves re-ordering the crush bucket OSDs based on the number of
PGs hosted on them before running the offline pg test. Based on the test
results on a larger cluster, the next steps will be taken.
RZ Updated by Radoslaw Zarzynski 10 months ago
- Pull request ID set to 66108
UB Updated by Upkeep Bot 9 months ago
- Status changed from Fix Under Review to Resolved
- Merge Commit set to 0fac0045d13ef23fc2cfb8f1fca90f2500d589a6
- Fixed In set to v20.3.0-5503-g0fac0045d1
- Upkeep Timestamp set to 2026-02-23T12:53:46+00:00
UB Updated by Upkeep Bot about 1 month ago
- Released In set to v21.2.0~1208
- Upkeep Timestamp changed from 2026-02-23T12:53:46+00:00 to 2026-10-24T01:43:11+00:00