From: "Michael Köppl" <m.koeppl@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] superseded: [PATCH docs/installer v4 0/9] add early disk and network sanity checks
Date: Tue, 15 Jul 2025 11:50:22 +0200 [thread overview]
Message-ID: <a6ca818b-9812-4e1f-8c3c-849cf266177c@proxmox.com> (raw)
In-Reply-To: <20250711162711.133248-1-m.koeppl@proxmox.com>
Superseded-by:
https://lore.proxmox.com/pve-devel/20250715094021.154914-1-m.koeppl@proxmox.com
On 7/11/25 18:27, Michael Köppl wrote:
> The goal of this series is to add additional sanity checks to the
> auto-installer and the TUI and GUI installers. The following checks were
> added:
> * Btrfs / ZFS RAID: check if the required number of disks is available
> * LVM: check if swapsize < hdsize
> * Duplicate disks in answer file disk selection
> * Networking: check if IPv4 address is valid within subnet (RFC)
>
> Additionally, the documentation regarding maxroot is adapted to remove
> the maximum maxroot size requirement since there was no check and adding
> a sanity check would have prevented users from installing on setups with
> very small disks even if the installation could have succeeded.
>
> The disk-related checks aim to close [0], whereas the IPv4 check would
> partially close [1].
>
> [0] https://bugzilla.proxmox.com/show_bug.cgi?id=5887
> [1] https://bugzilla.proxmox.com/show_bug.cgi?id=5757
>
> Changes since v3:
> - Rebased on master
> - Moved unit tests for ZfsRaidLevel and BtrfsRaidLevel to
> proxmox_installer_common::otions
> - Rename check_disks() proxmox_installer_common to check_raid_disks_setup()
> - Move dummy_disk() function for tests into Disk struct
> - Add new patch that unifies error messages regarding disk and RAID
> setup checks across TUI and GUI (mostly, see comment in 8/8)
> - Use anyhow::Result to handle errors in LVM disk setups (swapsize, ...)
> - Move the refactoring of CidrAddressParseError's Display implementation
> to an earlier patch instead of rewriting later on
> - Add FIXME to CidrAddressEditView's FormViewGetValue implementation
> regarding the proper return type that should be used, needs a bigger
> refactoring
>
> Changes since v2:
> - Rebased on master
> - Removed maxroot check and instead adapted documentation
> - Remove some changes that were the result of formatting otherwise
> unchanged lines of code
> - Added patch to improve error handling when checking CIDR address TUI
> network dialog
> - In installer 7/7, use the limit variable for the check_mask_limit
> function instead of hardcoded 32
>
> Changes since v1:
> - Removed rustfmt patch
> - Removed patch that changed check_zfs_raid_config (replaced with patch
> below)
> - Added patch that moves implementation of RAID setup checks to
> implementation of ZfsRaidLevel and BtrfsRaidLevel
> - Adapted tests for RAID setup validity
> - Added configured values in GiB to error messages for invalid
> swapsize and maxroot
> - Changed maximum allowed swapsize to hdsize/8
> - De-duplicated swapsize and maxroot check implementations in
> autoinstaller utils and common's disk_checks
> - Added patch that adds a check for duplicate disks in answer file disk
> selection
> - Refactored Display implementation of CidrAddressParseError
> - Simplified Deserialize implementation of CidrAddress
> - Explicitly allow /31 and /32 subnets in CIDR validity check
>
> Thanks to @Christoph for reviewing the previous versions and his suggestions.
>
> pve-docs:
>
> Michael Köppl (1):
> installation: remove maxroot size requirement and mention default
> instead
>
> pve-installation.adoc | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>
> pve-installer:
>
> Michael Köppl (8):
> auto: add early answer file sanity check for RAID configurations
> move RAID setup checks to RAID level enum implementations
> close #5887: add sanity check for LVM swapsize
> auto: add check for duplicate disks in answer file
> common: add more descriptive errors for invalid network configs
> tui: change get_value return type for easier error handling
> common: add checks for valid subnet mask and IPv4 address within
> subnet
> tui, gui: streamline error messages around disk and RAID checks
>
> Proxmox/Install.pm | 24 ++-
> proxinstall | 10 +-
> proxmox-auto-install-assistant/src/main.rs | 3 +-
> proxmox-auto-installer/src/utils.rs | 38 +++-
> proxmox-auto-installer/tests/parse-answer.rs | 9 +-
> .../parse_answer/ipv4_and_subnet_31.json | 19 ++
> .../parse_answer/ipv4_and_subnet_31.toml | 18 ++
> .../btrfs_raid_single_disk.json | 3 +
> .../btrfs_raid_single_disk.toml | 15 ++
> .../parse_answer_fail/duplicate_disk.json | 3 +
> .../parse_answer_fail/duplicate_disk.toml | 15 ++
> .../ipv4_and_subnet_addr_is_network.json | 3 +
> .../ipv4_and_subnet_addr_is_network.toml | 18 ++
> .../ipv4_and_subnet_mask_33.json | 3 +
> .../ipv4_and_subnet_mask_33.toml | 18 ++
> .../lvm_swapsize_greater_than_hdsize.json | 3 +
> .../lvm_swapsize_greater_than_hdsize.toml | 16 ++
> .../zfs_raid_single_disk.json | 3 +
> .../zfs_raid_single_disk.toml | 15 ++
> proxmox-installer-common/src/disk_checks.rs | 168 +++---------------
> proxmox-installer-common/src/options.rs | 147 +++++++++++++++
> proxmox-installer-common/src/utils.rs | 85 +++++++--
> proxmox-tui-installer/Cargo.toml | 1 +
> proxmox-tui-installer/src/main.rs | 8 +-
> proxmox-tui-installer/src/views/bootdisk.rs | 17 +-
> proxmox-tui-installer/src/views/mod.rs | 9 +-
> 26 files changed, 488 insertions(+), 183 deletions(-)
> create mode 100644 proxmox-auto-installer/tests/resources/parse_answer/ipv4_and_subnet_31.json
> create mode 100644 proxmox-auto-installer/tests/resources/parse_answer/ipv4_and_subnet_31.toml
> create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/btrfs_raid_single_disk.json
> create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/btrfs_raid_single_disk.toml
> create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/duplicate_disk.json
> create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/duplicate_disk.toml
> create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/ipv4_and_subnet_addr_is_network.json
> create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/ipv4_and_subnet_addr_is_network.toml
> create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/ipv4_and_subnet_mask_33.json
> create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/ipv4_and_subnet_mask_33.toml
> create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/lvm_swapsize_greater_than_hdsize.json
> create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/lvm_swapsize_greater_than_hdsize.toml
> create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/zfs_raid_single_disk.json
> create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/zfs_raid_single_disk.toml
>
>
> Summary over all repositories:
> 27 files changed, 491 insertions(+), 184 deletions(-)
>
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2025-07-15 9:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-11 16:27 [pve-devel] " Michael Köppl
2025-07-11 16:27 ` [pve-devel] [PATCH docs v4 1/1] installation: remove maxroot size requirement and mention default instead Michael Köppl
2025-07-11 16:27 ` [pve-devel] [PATCH installer v4 1/8] auto: add early answer file sanity check for RAID configurations Michael Köppl
2025-07-11 16:27 ` [pve-devel] [PATCH installer v4 2/8] move RAID setup checks to RAID level enum implementations Michael Köppl
2025-07-11 16:27 ` [pve-devel] [PATCH installer v4 3/8] close #5887: add sanity check for LVM swapsize Michael Köppl
2025-07-11 17:54 ` Thomas Lamprecht
2025-07-15 9:43 ` Michael Köppl
2025-07-11 16:27 ` [pve-devel] [PATCH installer v4 4/8] auto: add check for duplicate disks in answer file Michael Köppl
2025-07-11 16:27 ` [pve-devel] [PATCH installer v4 5/8] common: add more descriptive errors for invalid network configs Michael Köppl
2025-07-11 16:27 ` [pve-devel] [PATCH installer v4 6/8] tui: change get_value return type for easier error handling Michael Köppl
2025-07-11 16:27 ` [pve-devel] [PATCH installer v4 7/8] common: add checks for valid subnet mask and IPv4 address within subnet Michael Köppl
2025-07-11 16:27 ` [pve-devel] [PATCH installer v4 8/8] tui, gui: streamline error messages around disk and RAID checks Michael Köppl
2025-07-15 9:50 ` Michael Köppl [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a6ca818b-9812-4e1f-8c3c-849cf266177c@proxmox.com \
--to=m.koeppl@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox