harvester / harvester

Open source hyperconverged infrastructure (HCI) software

Home Page:https://harvesterhci.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] `harvester.install.wipe_disks=true` will attempt to wipe USB disk for ISO installation

irishgordo opened this issue · comments

Describe the bug
harvester.install.wipe_disks=true will attempt to wipe a USB disk for ISO installation and error out.
Or via config:

install:
  wipe_disks: true

To Reproduce
Steps to reproduce the behavior:

  1. USB ISO Installation
  2. Pass in either a config.yaml link to a fileserver or just the GRUB param e on GRUB boot screen
  3. Install is trying to wipe /dev/sdc which is the USB Drive that's intended to preform the installation

Workaround

  • Do not use a USB Interactive ISO installation and pass in that GRUB param

Expected behavior
Parse sudo dmesg results and perform an analysis to avoid trying to "wipe_disks" on USB drives:

[1126607.779465] usb 3-1: new high-speed USB device number 27 using xhci_hcd
[1126607.936040] usb 3-1: New USB device found, idVendor=0781, idProduct=5567, bcdDevice= 1.27
[1126607.936044] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1126607.936045] usb 3-1: Product: Cruzer Blade
[1126607.936046] usb 3-1: Manufacturer: SanDisk
[1126607.936047] usb 3-1: SerialNumber: 4C530001670602121305
[1126607.938472] usb-storage 3-1:1.0: USB Mass Storage device detected
[1126607.938777] scsi host1: usb-storage 3-1:1.0
[1126608.952417] scsi 1:0:0:0: Direct-Access     SanDisk  Cruzer Blade     1.27 PQ: 0 ANSI: 6
[1126608.954341] sd 1:0:0:0: Attached scsi generic sg1 type 0
[1126608.955473] sd 1:0:0:0: [sdb] 15223808 512-byte logical blocks: (7.79 GB/7.26 GiB)
[1126608.956711] sd 1:0:0:0: [sdb] Write Protect is off
[1126608.956714] sd 1:0:0:0: [sdb] Mode Sense: 43 00 00 00
[1126608.957146] sd 1:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[1126608.968852]  sdb: sdb1 sdb2
[1126608.968960] sd 1:0:0:0: [sdb] Attached SCSI removable disk

^ From that we can determine that a USB Mass Storage Device was detected and attached to /dev/sdb for instance.

Environment

  • Harvester ISO version: v1.3-head
  • Underlying Infrastructure: hp-dl160 bare-metal

Additional context
Screenshot from 2024-05-16 12-12-14