From 32fae5ca4942f80a9604c6aa123442449594284e Mon Sep 17 00:00:00 2001 From: Adam King Date: Tue, 8 Apr 2025 13:42:46 -0400 Subject: [PATCH] cephadm: check "ceph_device_lvm" field instead of "ceph_device" during zap This field was renamed as part of https://github.com/ceph/ceph/commit/4941d098e337f2b7ad8c6f7c90be3ae252d22f7b but the cephadm piece was still looking for "ceph_device" meaning we would never zap any devices. Worth noting this won't get caught by teuthology as we make OSDs in that env directly on top of LVs made out of a split up nvme drive and ceph-volume inventory doesn't list LVs. Signed-off-by: Adam King (cherry picked from commit fd8a05b2cb97370fe770ca18b50ad1c3ab763447) --- src/cephadm/cephadm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cephadm/cephadm.py b/src/cephadm/cephadm.py index 6854fa22b23..5758e7c258b 100755 --- a/src/cephadm/cephadm.py +++ b/src/cephadm/cephadm.py @@ -4290,7 +4290,7 @@ def _zap_osds(ctx: CephadmContext) -> None: raise Error(f'Invalid JSON in ceph-volume inventory: {e}') for i in ls: - matches = [lv.get('cluster_fsid') == ctx.fsid and i.get('ceph_device') for lv in i.get('lvs', [])] + matches = [lv.get('cluster_fsid') == ctx.fsid and i.get('ceph_device_lvm') for lv in i.get('lvs', [])] if any(matches) and all(matches): _zap(ctx, i.get('path')) elif any(matches): -- 2.39.5