Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Call
wipefs -a
in LonghornV2Provisioner.Format()
Format should really be a no-op for V2 disks given they just take the whole device, but for NVMe devices where Longhorn decides to use the nvme bdev driver, device activation will fail if there's an existing filesystem on the device, so we need to make sure to wipe before use. Without this, we'll potentially have devices stuck unschedulable with an obscure error message like this: Disk c1fd02d173a3f4b9176705e9b2e37d39(0003:03:00.0) on node altra is not ready: failed to generate disk config: error: rpc error: code = Internal desc = rpc error: code = Internal desc = failed to add disk block device: failed to create disk bdev: failed to attach NVMe disk 0003:03:00.0: error sending message, id 3126, method bdev_nvme_attach_controller, params {c1fd02d173a3f4b9176705e9b2e37d39 {PCIe 0003:03:00.0 } 30 2 15 disable}: {"code": -19,"message": "No such device"} Related issue: harvester/harvester#6828 Signed-off-by: Tim Serong <tserong@suse.com> (cherry picked from commit b258580)
- Loading branch information