deployment/baremetal: fix clean_disks skipping virtio-blk on KVM/Fyre#14915
Conversation
The previous clean_disks used `lsblk -e252` to exclude device-mapper devices, but on KVM/Fyre platforms major 252 is assigned to virtio-blk, so OSD disks (vdb, vdc) were silently skipped during cleanup. Fix: drop the global lsblk scan with the major-number exclusion. Instead, rely on disks_available_to_cleanup (which already filters by boot-disk detection and nbd/loop exclusion) to get the eligible disk list, then query each disk's size individually via a targeted `lsblk /dev/<disk>` call. Also pass namespace through to disks_available_to_cleanup so both functions are consistent, and add a libtest (test_disks_available_to_cleanup) that verifies the per-disk size lookup works correctly on a live cluster without wiping any disks. Signed-off-by: Itzhak Kave <ikave@ibm.com>
ocs-ci
left a comment
There was a problem hiding this comment.
PR validation on existing cluster
Cluster Name: ikave-lso13-421
Cluster Configuration: conf/deployment/vsphere/upi_1az_rhcos_vsan_lso_vmdk_3m_3w.yaml
PR Test Suite: libtest
PR Test Path: tests/libtest/test_disks_available_to_cleanup.py
Additional Test Params:
OCP VERSION: 4.22
OCS VERSION: 4.22
tested against branch: master
Job UNSTABLE (some or all tests failed).
|
The Pr validation error above is related to a Ceph health issue, and not to the test. |
ocs-ci
left a comment
There was a problem hiding this comment.
PR validation on existing cluster
Cluster Name: ikave-lso13-421
Cluster Configuration: conf/deployment/vsphere/upi_1az_rhcos_vsan_lso_vmdk_3m_3w.yaml
PR Test Suite: libtest
PR Test Path: tests/libtest/test_disks_available_to_cleanup.py
Additional Test Params:
OCP VERSION: 4.22
OCS VERSION: 4.22
tested against branch: master
dahorak
left a comment
There was a problem hiding this comment.
LGTM, but it should be verified also in the Baremetal environment UPI/AI deployment type (at least one of them, better both).
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dahorak, petr-balogh, yitzhak12 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Verification job on BM UPI deployment passed: https://url.corp.redhat.com/7f411c6 |
The previous clean_disks used
lsblk -e252to exclude device-mapper devices, but on KVM/Fyre platforms major 252 is assigned to virtio-blk, so OSD disks (vdb, vdc) were silently skipped during cleanup.Fix: drop the global lsblk scan with the major-number exclusion. Instead, rely on
disks_available_to_cleanup(which already filters by boot-disk detection and nbd/loop exclusion) to get the eligible disk list, then query each disk's size individually via a targetedlsblk /dev/<disk>call.Also pass namespace through to
disks_available_to_cleanupso both functions are consistent, and add a libtest(
test_disks_available_to_cleanup) that verifies the per-disk size lookup works correctly on a live cluster without wiping any disks.