Re: [pve-devel] [PATCH pve-installer 1/6] auto: add early answer file sanity check for RAID configurations

2025-04-29 Thread Michael Köppl
On 4/29/25 10:26, Christoph Heiss wrote: ZFS actually lets one create RAIDZ{1,2,3} pools with 2, 3 and 4 disks, respectively. While maybe not really _that_ practical for real-world usecases (starting with the overhead), do we want to still allow it? I personally don't like putting too many cons

Re: [pve-devel] [PATCH pve-installer 1/6] auto: add early answer file sanity check for RAID configurations

2025-04-29 Thread Christoph Heiss
On Tue Apr 29, 2025 at 11:32 AM CEST, Michael Köppl wrote: > On 4/29/25 10:26, Christoph Heiss wrote: ZFS actually lets one create RAIDZ{1,2,3} pools with 2, 3 and 4 disks, respectively. While maybe not really _that_ practical for real-world usecases (starting with the overhead), do

Re: [pve-devel] [PATCH ha-manager 09/15] manager: apply colocation rules when selecting service nodes

2025-04-29 Thread Daniel Kral
On 4/28/25 16:33, Fiona Ebner wrote: Am 28.04.25 um 14:26 schrieb Fiona Ebner: Am 25.03.25 um 16:12 schrieb Daniel Kral: + + delete $allowed_nodes->{$node}; + } +} elsif (scalar keys %$possible_nodes) { + # limit to the possible nodes the service should be on, if there

Re: [pve-devel] [PATCH ha-manager 09/15] manager: apply colocation rules when selecting service nodes

2025-04-29 Thread Daniel Kral
On 4/28/25 14:26, Fiona Ebner wrote: Am 25.03.25 um 16:12 schrieb Daniel Kral: Add a mechanism to the node selection subroutine, which enforces the colocation rules defined in the rules config. The algorithm manipulates the set of nodes directly, which the service is allowed to run on, dependin

[pve-devel] [PATCH proxmox_dart_api_client/pve_flutter_frontend_null 0/2] fix #4976

2025-04-29 Thread Alexander Abraham
This patches fixes bug 4976 in which the UI for nodes that are offline was reporting a "null" error. In the API client, error-handling for POST requests was changed to be more explicit and in the app's UI the case of a node suddenly being offline was handled. Viewing the information for a node that

[pve-devel] [PATCH flutter_frontend 1/1] fix #4976: ui: Nodes offline

2025-04-29 Thread Alexander Abraham
This commit adds functionality for not letting users click on nodes that are offline in the general overview screen. Furthermore, functionality was added to send the user back to the general overview screen if a node is suddenly offline while the user is viewing information on that node. Signed-of

[pve-devel] [PATCH dart_api_client 1/1] fix #4976: Request errors are

2025-04-29 Thread Alexander Abraham
This commit adds more explicit error-handling for when a host is possibly offline. Signed-off-by: Alexander Abraham --- lib/src/client.dart | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/src/client.dart b/lib/src/client.dart index f597c28..7c118d8 100644 -

[pve-devel] [PATCH pve_flutter_frontend v2] navigation: replace deprecated `onPopInvoked` callback

2025-04-29 Thread Shan Shaji
The `onPopInvoked` callback is deprecated as of Flutter v3.22.0-23.0.pre. This patch replaces it with the `onPopInvokedWithResult` callback. This patch also includes the removal of library declaration as it's a linting issue and not necessary anymore in the newer version of flutter. Signed-off-by

[pve-devel] [PATCH pve-storage v3 1/3] lvm: create: use multiple lines for lvcreate command line

2025-04-29 Thread Friedrich Weber
Makes the definition more amenable for future additions. No functional change intended. Signed-off-by: Friedrich Weber --- Notes: changes since v2: none new in v2 src/PVE/Storage/LVMPlugin.pm | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/PVE/Stor

[pve-devel] [RFC storage/manager v3 0/6] fix #4997: lvm, lvm-thin: avoid autoactivating LVs

2025-04-29 Thread Friedrich Weber
# Summary With default settings, LVM autoactivates LVs when it sees a new VG, e.g. after boot or iSCSI login. In a cluster with guest disks on a shared LVM VG (e.g. on top of iSCSI/Fibre Channel (FC)/direct-attached SAS), this can indirectly cause guest creation or migration to fail. See bug #4997

[pve-devel] [PATCH pve-manager stable-8 v3 1/3] cli: create pve8to9 script as a copy of pve7to8

2025-04-29 Thread Friedrich Weber
Signed-off-by: Friedrich Weber --- Notes: new in v3 PVE/CLI/Makefile |1 + PVE/CLI/pve8to9.pm | 1543 bin/Makefile | 12 +- bin/pve8to9|8 + 4 files changed, 1563 insertions(+), 1 deletion(-) create mode 100644 PVE/CLI/

[pve-devel] [PATCH pve-manager stable-8 v3 3/3] pve8to9: detect and (if requested) disable LVM autoactivation

2025-04-29 Thread Friedrich Weber
Starting with PVE 9, the LVM and LVM-thin plugins create new LVs with the `--setautoactivation n` flag to fix #4997 [1]. However, this does not affect already existing LVs of setups upgrading from PVE 8. Hence, add a new `updatelvm` subcommand to `pve8to9` that finds guest volume LVs with autoacti

[pve-devel] [PATCH pve-storage v3 2/3] fix #4997: lvm: create: disable autoactivation for new logical volumes

2025-04-29 Thread Friedrich Weber
When discovering a new volume group (VG), for example on boot, LVM triggers autoactivation. With the default settings, this activates all logical volumes (LVs) in the VG. Activating an LV creates a device-mapper device and a block device under /dev/mapper. This is not necessarily problematic for l

[pve-devel] [PATCH pve-storage v3 3/3] lvmthin: disable autoactivation for new logical volumes

2025-04-29 Thread Friedrich Weber
When discovering a new volume group (VG), for example on boot, LVM triggers autoactivation. With the default settings, this activates all logical volumes (LVs) in the VG. Activating an LV creates a device-mapper device and a block device under /dev/mapper. Autoactivation is problematic for shared

[pve-devel] [PATCH pve-manager stable-8 v3 2/3] pve8to9: move checklist to dedicated subcommand

2025-04-29 Thread Friedrich Weber
This allows to introduce other subcommands, e.g. for manual actions rqeuired before the upgrade. TODO: Update the manpage. Signed-off-by: Friedrich Weber --- Notes: new in v3 PVE/CLI/pve8to9.pm | 4 +++- bin/Makefile | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --g

Re: [pve-devel] [RFC PATCH pve-installer 3/6] close #5887: add sanity check for LVM swapsize and maxroot

2025-04-29 Thread Michael Köppl
On 4/28/25 14:00, Christoph Heiss wrote: On Tue Apr 22, 2025 at 6:27 PM CEST, Michael Köppl wrote: Check that the configured swapsize is not greater than the total size of the disk and that maxroot is at most hdsize / 4. Define the behavior for the auto-installer as well as the TUI and GUI insta

[pve-devel] [PATCH installer 2/2] auto: answer: simplify `BTreeMap` handling in deserialization

2025-04-29 Thread Christoph Heiss
Instead of using an `Option>`, we can use a `BTreeMap` directly and let serde default to an empty map. No functional changes. Signed-off-by: Christoph Heiss --- proxmox-auto-installer/src/answer.rs | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/prox

[pve-devel] [PATCH installer 1/2] auto: answer: drop unneeded #[serde(default)] attributes

2025-04-29 Thread Christoph Heiss
For `Option<>`s, serde automatically defaults to `None` for deserialization in case the key is missing in the source. No functional changes. Signed-off-by: Christoph Heiss --- proxmox-auto-installer/src/answer.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/proxmox-auto-installer/src/an

Re: [pve-devel] [PATCH pve_flutter_frontend] navigation: replace deprecated `onPopInvoked` callback

2025-04-29 Thread Shan Shaji
Hey, thank you for the review. Removal of the library declaration was intentional as it's a linting issue and not necessary anymore in the newer versions of flutter. Added it in the same patch as it was a small change. Removal of `async` keyword was not intentional and will revert the change.

Re: [pve-devel] [PATCH storage/zfsonlinux v2 0/3] fix #4997: lvm: avoid autoactivating (new) LVs after boot

2025-04-29 Thread Friedrich Weber
Superseded-by: https://lore.proxmox.com/pve-devel/20250429113646.25738-1-f.we...@proxmox.com/ Some comments inline. On 12/03/2025 09:39, Friedrich Weber wrote: > On 11/03/2025 11:40, Fabian Grünbichler wrote: >> On March 10, 2025 3:01 pm, Friedrich Weber wrote: >>> On 07/03/2025 13:14, Fabian Grü

[pve-devel] [PATCH manager 7/7] ui: guest import: make sure an external link has target _blank

2025-04-29 Thread Aaron Lauterer
otherwise it will most likely open in the current tab and not in a new one. Signed-off-by: Aaron Lauterer --- www/manager6/window/GuestImport.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/manager6/window/GuestImport.js b/www/manager6/window/GuestImport.js index 107a

[pve-devel] [PATCH docs 3/7] pvecm: add anchor for corosync exernal vote support

2025-04-29 Thread Aaron Lauterer
so we can reference the chapter. Manually set the automatically generated one to avoid breaking existing deep links. Signed-off-by: Aaron Lauterer --- pvecm.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/pvecm.adoc b/pvecm.adoc index a38351c..3b9cfc4 100644 --- a/pvecm.adoc +++ b/pvecm

[pve-devel] [PATCH docs 2/7] pvecm: add anchor for cluster requirements

2025-04-29 Thread Aaron Lauterer
so we can link help buttons to it Signed-off-by: Aaron Lauterer --- pvecm.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvecm.adoc b/pvecm.adoc index 47e42e2..a38351c 100644 --- a/pvecm.adoc +++ b/pvecm.adoc @@ -54,7 +54,7 @@ Grouping nodes into a cluster has the follo

[pve-devel] [PATCH docs 1/7] pvecm: drop notes about old version incompatibilities

2025-04-29 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer --- pvecm.adoc | 12 1 file changed, 12 deletions(-) diff --git a/pvecm.adoc b/pvecm.adoc index 18f7389..47e42e2 100644 --- a/pvecm.adoc +++ b/pvecm.adoc @@ -77,18 +77,6 @@ Requirements * Online migration of virtual machines is only supported when node

[pve-devel] [PATCH docs 4/7] pvecm: extend cluster Requirements

2025-04-29 Thread Aaron Lauterer
by expanding on best practices with background information as to how and why. Signed-off-by: Aaron Lauterer --- pvecm.adoc | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/pvecm.adoc b/pvecm.adoc index 3b9cfc4..c50ec15 100644 --- a/pvecm.adoc +++ b/pvecm.a

[pve-devel] [PATCH manager 6/7] ui: cluster create: add recommendations for cluster networks

2025-04-29 Thread Aaron Lauterer
adding a short list of recommendations regarding the cluster network right where the cluster is created will hopefully reduce the amount of clusters that don't follow best practices. We also point the help button to the requirements a little bit earlier in the docs than what it used to be. Signed

[pve-devel] [PATCH docs, manager 0/7] add and expand on cluster recommendations

2025-04-29 Thread Aaron Lauterer
by expanding on it in the docs and the UI. the doc patches have some cleanup and new anchor patches the second ui patch is to fix an external link that I noticed and is just a drive-by patch. docs: Aaron Lauterer (5): pvecm: drop notes about old version incompatibilities pvecm: add anchor for

[pve-devel] [PATCH docs 5/7] ha-manager: expand requirements

2025-04-29 Thread Aaron Lauterer
* make it clear that the corosync/cluster communication is important * mark hardware watchdogs as optional Signed-off-by: Aaron Lauterer --- ha-manager.adoc | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ha-manager.adoc b/ha-manager.adoc index 3d6fc4a..592ef96 100644 -

Re: [pve-devel] [PATCH ha-manager 05/15] rules: add colocation rule plugin

2025-04-29 Thread Fiona Ebner
Am 29.04.25 um 10:37 schrieb Daniel Kral: > On 4/25/25 16:06, Fiona Ebner wrote: >> Am 11.04.25 um 13:04 schrieb Daniel Kral: >>> On 4/3/25 14:16, Fabian Grünbichler wrote: On March 25, 2025 4:12 pm, Daniel Kral wrote: >>> Also, I was curious about how that would work out for the case where a

Re: [pve-devel] [PATCH ha-manager 09/15] manager: apply colocation rules when selecting service nodes

2025-04-29 Thread Daniel Kral
On 4/28/25 14:46, Fiona Ebner wrote: I feel like we should trigger auto-migration for strict colocation rules. I.e. apply the rules earlier in select_service_node(), before the "keep current node" early return. With nofailback=0, we do not keep the current node when node priorities change for HA

Re: [pve-devel] [PATCH ha-manager 09/15] manager: apply colocation rules when selecting service nodes

2025-04-29 Thread Fiona Ebner
Am 29.04.25 um 11:07 schrieb Daniel Kral: > On 4/28/25 14:46, Fiona Ebner wrote: >> I feel like we should trigger auto-migration for strict colocation >> rules. I.e. apply the rules earlier in select_service_node(), before the >> "keep current node" early return. >> >> With nofailback=0, we do not

Re: [pve-devel] [PATCH ha-manager 07/15] manager: read and update rules config

2025-04-29 Thread Daniel Kral
On 4/25/25 16:30, Fiona Ebner wrote: Am 25.03.25 um 16:12 schrieb Daniel Kral: +my $new_rules = $haenv->read_rules_config(); + +# TODO We should also check for a service digest here, but we would've to +# calculate it here independently or also expose it through read_service_co

Re: [pve-devel] [PATCH pve_flutter_frontend] navigation: replace deprecated `onPopInvoked` callback

2025-04-29 Thread Shannon Sterz
On Mon Apr 28, 2025 at 4:03 PM CEST, Shan Shaji wrote: > The `onPopInvoked` callback is deprecated as of > Flutter v3.22.0-12.0.pre. This patch replaces it > with the `onPopInvokedWithResult` callback. > > Signed-off-by: Shan Shaji > --- > lib/pages/main_layout_slim.dart | 2 +- > lib/st

Re: [pve-devel] [PATCH pve-installer 1/6] auto: add early answer file sanity check for RAID configurations

2025-04-29 Thread Christoph Heiss
>> ZFS actually lets one create RAIDZ{1,2,3} pools with 2, 3 and 4 disks, >> respectively. While maybe not really _that_ practical for real-world >> usecases (starting with the overhead), do we want to still allow it? > > I personally don't like putting too many constraints on what users can > do.

Re: [pve-devel] [PATCH ha-manager 05/15] rules: add colocation rule plugin

2025-04-29 Thread Daniel Kral
Agree with all here, but I propose to remove the merging for any colocation rules in the last comment, if there's nothing speaking against it. On 4/25/25 16:06, Fiona Ebner wrote: Am 11.04.25 um 13:04 schrieb Daniel Kral: On 4/3/25 14:16, Fabian Grünbichler wrote: On March 25, 2025 4:12 pm,

Re: [pve-devel] Consideration of contributing Apparmor for KVM

2025-04-29 Thread Fabian Grünbichler
> Sven Springer via pve-devel hat am 28.04.2025 > 15:50 CEST geschrieben: > Hello, > > for a project we are working on a simple Apparmor profile for KVM-based > VMs in Proxmox. > For now it's a POC with a static profile for the qemu-system-x86_64 > binary. The next step would be to patch the P

Re: [pve-devel] [PATCH ha-manager 05/15] rules: add colocation rule plugin

2025-04-29 Thread Daniel Kral
On 4/25/25 16:05, Fiona Ebner wrote: Not much to add to Fabian's review :) Am 25.03.25 um 16:12 schrieb Daniel Kral: diff --git a/src/PVE/HA/Rules/Colocation.pm b/src/PVE/HA/Rules/Colocation.pm new file mode 100644 index 000..808d48e --- /dev/null +++ b/src/PVE/HA/Rules/Colocation.pm @@ -0,

Re: [pve-devel] [PATCH ha-manager 14/15] test: ha tester: add test cases in more complex scenarios

2025-04-29 Thread Fiona Ebner
Am 25.03.25 um 16:12 schrieb Daniel Kral: > diff --git a/src/test/test-crs-static-rebalance-coloc3/README > b/src/test/test-crs-static-rebalance-coloc3/README > new file mode 100644 > index 000..e54a2d4 > --- /dev/null > +++ b/src/test/test-crs-static-rebalance-coloc3/README > @@ -0,0 +1,14 @@

Re: [pve-devel] [PATCH ha-manager 14/15] test: ha tester: add test cases in more complex scenarios

2025-04-29 Thread Fiona Ebner
Am 25.03.25 um 16:12 schrieb Daniel Kral: > diff --git a/src/test/test-crs-static-rebalance-coloc1/README > b/src/test/test-crs-static-rebalance-coloc1/README > new file mode 100644 > index 000..c709f45 > --- /dev/null > +++ b/src/test/test-crs-static-rebalance-coloc1/README > @@ -0,0 +1,26 @@

[pve-devel] [PATCH pve-common] fix #5034: Updated the schema for the Email attribute to include a dash

2025-04-29 Thread Alexander Abraham
This patch fixes bug #5034. A user was having the problem of attempting to login to PVE with an LDAP server that had a different mail attribute ID configured. The schema of PVE's LDAP attribute ID validation didn't accept an extra hyphen in the attribute ID. This has now been fixed. I was unable t

[pve-devel] [PATCH pve_flutter_frontend] ui: replace use of `background` property

2025-04-29 Thread Shan Shaji
As of flutter v3.22 the `background` property is deprecated. The material guidelines suggest using the surface color for backgrounds. https://m3.material.io/styles/color/roles#8562cf18-5cc0-44ae-b783-2e38bdb39585 Due to the difference between the current background color and surface color, this p

Re: [pve-devel] [PATCH installer 0/6] add early disk and network sanity checks

2025-04-29 Thread Michael Köppl
Superseded-by: https://lore.proxmox.com/pve-devel/20250429140940.161711-1-m.koe...@proxmox.com On 4/28/25 14:25, Christoph Heiss wrote: Thanks for tackling this. Reviewed the series and left some comments on the individual patches, mostly some thoughts and nits. Also tested `proxmox-auto-inst

[pve-devel] [PATCH pve-installer v2 4/6] auto: add check for duplicate disks in answer file

2025-04-29 Thread Michael Köppl
Signed-off-by: Michael Köppl --- proxmox-auto-installer/src/utils.rs | 12 +++- proxmox-auto-installer/tests/parse-answer.rs | 1 + .../parse_answer_fail/duplicate_disk.json | 3 +++ .../parse_answer_fail/duplicate_disk.toml | 15 +++ 4 fil

[pve-devel] [RFC PATCH pve-installer v2 6/6] common: add checks for valid subnet mask and IPv4 address within subnet

2025-04-29 Thread Michael Köppl
Add checks for valid subnet mask (greater than /0 and at most /32 for IPv4). In addition, check if the address entered by the user is valid within the given subnet, i.e. not a network address or broadcast address. /31 is considered an exception in accordance with RFC3021 [0], considering any of the

[pve-devel] [PATCH pve-installer v2 1/6] auto: add early answer file sanity check for RAID configurations

2025-04-29 Thread Michael Köppl
The GUI and TUI installers already implement checks to ensure systems have the minimum required number of disks available for the various RAID configurations (min 2 disks for RAID1, min 4 disks for RAID10, etc). This change adds an early check of the answer file to the auto-installer, improving the

[pve-devel] [PATCH pve-installer v2 3/6] close #5887: add sanity check for LVM swapsize and maxroot

2025-04-29 Thread Michael Köppl
Check that the configured swapsize is not greater than hdsize / 8 as stated in the admin guide [0]. Additionally check that maxroot is at most hdsize / 4. Define the behavior for the auto-installer as well as the TUI and GUI installers. [0] https://pve.proxmox.com/pve-docs/pve-admin-guide.html#adv

[pve-devel] [PATCH installer v2 0/6] add early disk and network sanity checks

2025-04-29 Thread Michael Köppl
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 d

[pve-devel] [PATCH pve-installer v2 2/6] move RAID setup checks to RAID level enum implementations

2025-04-29 Thread Michael Köppl
Instead of having parts of the RAID setup checks scattered in multiple places, move the core of the checks to implementations of the ZfsRaidLevel and BtrfsRaidLevel enums. Signed-off-by: Michael Köppl --- proxmox-installer-common/src/disk_checks.rs | 156 proxmox-installer-c

[pve-devel] [PATCH pve-installer v2 5/6] common: add more descriptive errors for invalid network configs

2025-04-29 Thread Michael Köppl
Signed-off-by: Michael Köppl --- proxmox-installer-common/src/utils.rs | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/proxmox-installer-common/src/utils.rs b/proxmox-installer-common/src/utils.rs index 8adcec0..1fe6a74 100644 --- a/proxmox-installer-common

[pve-devel] [PATCH proxmox_login_manager 1/1] fix #4281: login_manager: UI changes for enabling login with Open ID

2025-04-29 Thread Alexander Abraham
This commit adds an authorization flow for logging a user in with Open ID in the Flutter App's UI. An authorization URL is obtained and opened in a webview. From there, the user types in their credentials and the login is processed and the user is logged in to the PVE app. Signed-off-by: Alexander

[pve-devel] [PATCH proxmox_dart_api_client 1/1] fix #4281: dart_api_client: Added functions for login with Open ID.

2025-04-29 Thread Alexander Abraham
This commit contains a module for the Dart API client for the PVE Flutter app focussed on logging in with Open ID. The module provides a function for obtaining an authorization URL from an Open ID provider and a function for obtaining a ticket from the PVE API from the redirect URL an Open ID

[pve-devel] [PATCH manager 1/1] fix #4281: manager: Enabled logging in with Open ID

2025-04-29 Thread Alexander Abraham
This commit adds an authorization flow for logging in a user using Open ID on the PVE web frontend in the mobile view. Signed-off-by: Alexander Abraham --- www/mobile/Login.js | 148 ++-- 1 file changed, 116 insertions(+), 32 deletions(-) diff --git a/www

[pve-devel] [PATCH manager/proxmox{_dart_api_client, _login_manager} 0/3] fix #4281

2025-04-29 Thread Alexander Abraham
This patch series fixes the login with Open ID for the mobile Flutter app and the mobile (web) frontend for PVE manager. A user reported that they could not login using Open ID on the PVE mobile (web) frontend and in the PVE Flutter app. proxmox_dart_api_client: Alexander Abraham (1): fix #428