all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH installer v2 0/6] add early disk and network sanity checks
@ 2025-04-29 14:09 Michael Köppl
  2025-04-29 14:09 ` [pve-devel] [PATCH pve-installer v2 1/6] auto: add early answer file sanity check for RAID configurations Michael Köppl
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Michael Köppl @ 2025-04-29 14:09 UTC (permalink / raw)
  To: pve-devel

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
* LVM: check if maxroot < hdsize/4
* Duplicate disks in answer file disk selection
* Networking: check if IPv4 address is valid within subnet (RFC)

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 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 v1 and his suggestions.

pve-installer:

Michael Köppl (6):
  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 and maxroot
  auto: add check for duplicate disks in answer file
  common: add more descriptive errors for invalid network configs
  common: add checks for valid subnet mask and IPv4 address within
    subnet

 Proxmox/Install.pm                            |  16 ++
 proxinstall                                   |   5 +-
 proxmox-auto-install-assistant/src/main.rs    |   7 +-
 proxmox-auto-installer/src/utils.rs           |  46 ++++-
 proxmox-auto-installer/tests/parse-answer.rs  |  12 +-
 .../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_maxroot_greater_than_maximum.json     |   3 +
 .../lvm_maxroot_greater_than_maximum.toml     |  16 ++
 .../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   | 174 +++++++-----------
 proxmox-installer-common/src/options.rs       |  91 +++++++++
 proxmox-installer-common/src/utils.rs         |  84 +++++++--
 proxmox-tui-installer/src/views/bootdisk.rs   |  13 +-
 25 files changed, 482 insertions(+), 137 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_maxroot_greater_than_maximum.json
 create mode 100644 proxmox-auto-installer/tests/resources/parse_answer_fail/lvm_maxroot_greater_than_maximum.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:
  25 files changed, 482 insertions(+), 137 deletions(-)

-- 
Generated by git-murpp 0.8.0


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-05-27 16:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-29 14:09 [pve-devel] [PATCH installer v2 0/6] add early disk and network sanity checks Michael Köppl
2025-04-29 14:09 ` [pve-devel] [PATCH pve-installer v2 1/6] auto: add early answer file sanity check for RAID configurations Michael Köppl
2025-04-29 14:09 ` [pve-devel] [PATCH pve-installer v2 2/6] move RAID setup checks to RAID level enum implementations Michael Köppl
2025-04-29 14:09 ` [pve-devel] [PATCH pve-installer v2 3/6] close #5887: add sanity check for LVM swapsize and maxroot Michael Köppl
2025-05-06 11:48   ` Christoph Heiss
2025-05-09 11:07     ` Michael Köppl
2025-05-27 16:19       ` Michael Köppl
2025-04-29 14:09 ` [pve-devel] [PATCH pve-installer v2 4/6] auto: add check for duplicate disks in answer file Michael Köppl
2025-04-29 14:09 ` [pve-devel] [PATCH pve-installer v2 5/6] common: add more descriptive errors for invalid network configs Michael Köppl
2025-04-29 14:09 ` [pve-devel] [RFC PATCH pve-installer v2 6/6] common: add checks for valid subnet mask and IPv4 address within subnet Michael Köppl
2025-05-06  9:21   ` Christoph Heiss
2025-05-09  8:51     ` Michael Köppl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal