]> git.proxmox.com Git - pve-installer.git/commit
fix #4856: tui: bootdisk: use correct defaults in advanced dialog
authorChristoph Heiss <c.heiss@proxmox.com>
Thu, 9 Nov 2023 09:40:56 +0000 (10:40 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 9 Nov 2023 13:47:03 +0000 (14:47 +0100)
commiteda9fa0c6c551aa77f0afceeaeba0d18b96783c9
tree722390c837502a9051cfad4aa0a177e0c0731212
parentd81cffcbb41c9d274f5ee862d92c0597f504bc86
fix #4856: tui: bootdisk: use correct defaults in advanced dialog

The size of the install disk was set to the size of the first disk,
regardless of what disk was selected. This only happened if the advanced
options dialog was never opened, and only a disk was selected in the
main bootdisk dialog.

Properly solving this involved restructuring the LVM advanced bootdisk
dialog, to also hold the selected disks, like the ZFS and Btrfs dialogs.
In addition to that, the `BootdiskOptionsRef` needs quite some passing
around, to cover all the cases, since the dialog also needs to be
"reentrant-safe".

I tested (among other things):
  * Only select disk, don't open the advanced dialog, go to summary,
    then back to the bootdisk dialog -> selected disk should be kept
  * Select disk, open advanced dialog but leave everything as is, go to
    summary, then go back again -> selected disk should be kept
  * Same as previous, but change the "Total size" for the disk, go to
    summary and back -> selected disk and size should be kept
  * Same as previous, but additionally change filesystem to XFS -> disk,
    filesystem and size should be kept
  * Same as previous, but then create a ZFS RAID, go to summary & back,
    ZFS RAID should be kept with all parameters
  * etc ..

Further I also verified that the correct disk size(s) get written into
the setup structure for the low-level installer.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
proxmox-tui-installer/src/views/bootdisk.rs