[pve-devel] [PATCH installer 3/4] tui: add missing argument for low-level installer test-session

2023-11-21 Thread Christoph Heiss
This broke running the TUI installer in debug mode, does not effect release builds in any way. Fixes: 4b4dfa1 ("low level: testmode: take path to disk image instead of using /dev/null") Signed-off-by: Christoph Heiss --- proxmox-installer-common/src/setup.rs | 2 +- 1 file changed, 1

[pve-devel] [PATCH container] setup: nixos: set cmode to console by default

2023-11-21 Thread Christoph Heiss
. With this, the mentioned tarballs [0] work out-of-the-box. [0] https://hydra.nixos.org/job/nixos/trunk-combined/nixos.containerTarball.x86_64-linux Signed-off-by: Christoph Heiss --- src/PVE/LXC/Setup/NixOS.pm | 5 + 1 file changed, 5 insertions(+) diff --git a/src/PVE/LXC/Setup/NixOS.pm b/src/PVE/LXC/Setup

[pve-devel] [PATCH installer 2/2] tui: install progress: use ok/cancel as button text for installer prompt

2023-11-17 Thread Christoph Heiss
The GTK installer/UI module in the low-level installer does the same. Messages used with this are worded for this, using yes/no instead can be quite confusing (e.g. Proxmox::Install::ask_existing_vg_rename_or_abort()) Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/main.rs

[pve-devel] [RFC PATCH installer 1/2] ui: stdio: replace newlines with whitespaces in prompt messages

2023-11-17 Thread Christoph Heiss
. Will be reworked properly later on. Signed-off-by: Christoph Heiss --- Proxmox/UI/StdIO.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/Proxmox/UI/StdIO.pm b/Proxmox/UI/StdIO.pm index 0ee6311..f734c0b 100644 --- a/Proxmox/UI/StdIO.pm +++ b/Proxmox/UI/StdIO.pm @@ -36,6 +36,7 @@ sub finished

Re: [pve-devel] applied: [PATCH installer] tui: fix changing between non-LVM and LVM filesystem in bootdisk chooser

2023-11-17 Thread Christoph Heiss
Thanks! On Fri, Nov 17, 2023 at 01:20:31PM +0100, Thomas Lamprecht wrote: > > Am 17/11/2023 um 13:12 schrieb Christoph Heiss: > > Happens due to a force-unwrap() under the false assumption that the > > disk for LVM configurations always exists when switching to a

[pve-devel] [PATCH installer] tui: fix changing between non-LVM and LVM filesystem in bootdisk chooser

2023-11-17 Thread Christoph Heiss
: use correct defaults in advanced dialog") Reported-by: Christian Ebner Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/views/bootdisk.rs | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/proxmox-tui-installer/src/views/bootdisk.rs b/p

[pve-devel] [PATCH installer] run env: strip out domain name from hostname

2023-11-17 Thread Christoph Heiss
t;foo.bar.bar" as hostname/FQDN. Fixes: a805423 ("run env: do not store emtpy hostname") Signed-off-by: Christoph Heiss --- Tested this with various possible settings for the `host-name` DHCP option, also including e.g. if `host-name` is set to "" in the lease (which

Re: [pve-devel] applied: [PATCH installer] run env: do not store emtpy hostname

2023-11-17 Thread Christoph Heiss
On Fri, Nov 17, 2023 at 06:37:08AM +0100, Thomas Lamprecht wrote: > > Am 16/11/2023 um 20:59 schrieb Stoiko Ivanov: > > without this patch the hostname ends up as the empty string in > > run-env-info.json, which results in a parse-error in the TUI code > > (an empty string is not None, but still

[pve-devel] [PATCH installer v2 1/8] tui: move install progress dialog into own view module

2023-11-10 Thread Christoph Heiss
While at it, convert it to a proper `View`-impl, instead of a functional component. No functional changes. Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * moved separation of progress task function to separate patch proxmox-tui-installer/src/main.rs |

[pve-devel] [PATCH installer v2 2/8] tui: install_progress: move progress task into own function

2023-11-10 Thread Christoph Heiss
No functional changes. Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * new patch, separated out from patch #1 * use static member function instead of top-level function .../src/views/install_progress.rs | 299 +- 1 file changed, 152 insertions(+),

[pve-devel] [PATCH installer v2 6/8] tui: install_progress: handle errors in ui message loop more gracefully

2023-11-10 Thread Christoph Heiss
This at least gives _some_ feedback to the user he can potentially report or try to address, instead of a single, hardcoded message. Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * no changes .../src/views/install_progress.rs | 33 +-- 1 file changed,

[pve-devel] [PATCH installer v2 5/8] tui: install_progress: split out prompt logic into own function

2023-11-10 Thread Christoph Heiss
No functional changes. Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * use static member function instead of top-level function .../src/views/install_progress.rs | 42 ++- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/proxmox-tui-instal

[pve-devel] [PATCH installer v2 3/8] tui: install_progress: split out low-level installer spawing into own function

2023-11-10 Thread Christoph Heiss
No functional changes. Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * moved spawn_low_level_installer() to common crate proxmox-installer-common/src/setup.rs | 22 - .../src/views/install_progress.rs | 24 ++- 2 files changed,

[pve-devel] [PATCH installer v2 4/8] tui: install_progress: split out reboot handling into own function

2023-11-10 Thread Christoph Heiss
No functional changes. Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * use static member function instead of top-level function .../src/views/install_progress.rs | 54 ++- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/proxmox-tui-instal

[pve-devel] [PATCH installer v2 8/8] low-level, tui: count down auto-reboot timeout

2023-11-10 Thread Christoph Heiss
The GUI installer already has the same functionality, with this the TUI installer gains the same. It is a nice touch anyway, primarily to indicate to the user that the installer is not frozen or similar. Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * no changes proxmox-low-le

[pve-devel] [PATCH installer v2 7/8] low-level: avoid open-coding config reading, parsing and merging

2023-11-10 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * no changes proxmox-low-level-installer | 45 +++-- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/proxmox-low-level-installer b/proxmox-low-level-installer index 0f2bf4f..b8269d7 100

[pve-devel] [PATCH installer v2 0/8] refactor and improve installation progress

2023-11-10 Thread Christoph Heiss
tch its GUI counterpart. v1: https://lists.proxmox.com/pipermail/pve-devel/2023-July/058510.html Notable changes v1 -> v2: * rebased on latest master * added patch #2, split out from #1 Christoph Heiss (8): tui: move install progress dialog into own view module tui: install_progress

[pve-devel] [PATCH installer v2] low level: testmode: take path to disk image instead of using /dev/null

2023-11-09 Thread Christoph Heiss
.. in exactly the same way GUI and TUI installer do, streamlining them. Up until now, testing the TUI installer often involved hand-editing the `run-env-info.json` to put some proper disk sizes > 0 in place. This makes this process a lot easier. Signed-off-by: Christoph Heiss --- v1: ht

[pve-devel] [PATCH installer v3 0/2] fix #4856: tui: bootdisk: use correct defaults in advanced dialog

2023-11-09 Thread Christoph Heiss
sed series on latest master Changes v2 -> v3: * rebased series on latest master * dropped patch #2, which was obsoleted by other changes Christoph Heiss (2): tui: bootdisk: refactor Rc> type into custom type fix #4856: tui: bootdisk: use correct defaults in advanced dialog pr

[pve-devel] [PATCH installer v3 2/2] fix #4856: tui: bootdisk: use correct defaults in advanced dialog

2023-11-09 Thread Christoph Heiss
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 --- proxmox-tui-installer/src/views/bootdisk.rs | 162 ++-- 1 file chan

[pve-devel] [PATCH installer v3 1/2] tui: bootdisk: refactor Rc> type into custom type

2023-11-09 Thread Christoph Heiss
Will be used/passed around quite a lot of times due to future changes, so simplify it a bit. No functional changes. Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/views/bootdisk.rs | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/proxmox-tui

Re: [pve-devel] applied: [PATCH installer v4 0/6] fix #4829: wire up `arc_max` ZFS option to GUI/TUI for PVE

2023-11-08 Thread Christoph Heiss
On Tue, Nov 07, 2023 at 04:50:31PM +0100, Thomas Lamprecht wrote: > > Am 07/11/2023 um 13:20 schrieb Christoph Heiss: > > run env: remove debug print > > install: use correct variable names in zfs_setup_module_conf() > > proxinstall: expose `arc_max` ZFS opti

[pve-devel] [PATCH installer] tui: fix same "Administrator" typo in password and summary view

2023-11-07 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/main.rs| 2 +- proxmox-tui-installer/src/options.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proxmox-tui-installer/src/main.rs b/proxmox-tui-installer/src/main.rs index 2e5a194..82ae1bb 100644

[pve-devel] [PATCH installer v4 4/6] test: add tests for zfs_arc_max calculations

2023-11-07 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- Makefile| 3 ++ debian/control | 1 + test/Makefile | 10 ++ test/zfs-arc-max.pl | 81 + 4 files changed, 95 insertions(+) create mode 100644 test/Makefile create mode 100755 test/zfs

[pve-devel] [PATCH installer v4 6/6] tui: bootdisk: expose `arc_max` ZFS option for PVE installations

2023-11-07 Thread Christoph Heiss
To set the maximum value for arc_max accordingly, simply pass down `RuntimeInfo` directly instead of the disks array to the views. Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/main.rs | 2 +- proxmox-tui-installer/src/views/bootdisk.rs | 68

[pve-devel] [PATCH installer v4 5/6] common: add ZFS `arc_max` installer setup option

2023-11-07 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- proxmox-installer-common/src/options.rs | 62 +++-- proxmox-installer-common/src/setup.rs | 2 + proxmox-tui-installer/src/views/bootdisk.rs | 18 -- 3 files changed, 71 insertions(+), 11 deletions(-) diff --git a/proxmox

[pve-devel] [PATCH installer v4 0/6] fix #4829: wire up `arc_max` ZFS option to GUI/TUI for PVE

2023-11-07 Thread Christoph Heiss
dropped already applied patches from series * added new patch to drop debug print * added new patch fixing zfs_arc_max modprobe setting Christoph Heiss (6): run env: remove debug print install: use correct variable names in zfs_setup_module_conf() proxinstall: expose `arc_max` ZFS option for P

[pve-devel] [PATCH installer v4 3/6] proxinstall: expose `arc_max` ZFS option for PVE installations

2023-11-07 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- proxinstall | 15 +++ 1 file changed, 15 insertions(+) diff --git a/proxinstall b/proxinstall index 113bf37..857281d 100755 --- a/proxinstall +++ b/proxinstall @@ -1162,6 +1162,21 @@ my $create_raid_advanced_grid = sub { $spinbutton_copies

[pve-devel] [PATCH installer v4 2/6] install: use correct variable names in zfs_setup_module_conf()

2023-11-07 Thread Christoph Heiss
That's what happens when you do some last-minute variable renaming and trust that nothing broke .. Fixes: 42aa2fa ("fix #4829: install: add new ZFS `arc_max` setup option") Signed-off-by: Christoph Heiss --- Proxmox/Install.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletion

[pve-devel] [PATCH installer v4 1/6] run env: remove debug print

2023-11-07 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- Proxmox/Install/RunEnv.pm | 1 - 1 file changed, 1 deletion(-) diff --git a/Proxmox/Install/RunEnv.pm b/Proxmox/Install/RunEnv.pm index 9116397..5f68d82 100644 --- a/Proxmox/Install/RunEnv.pm +++ b/Proxmox/Install/RunEnv.pm @@ -319,7 +319,6 @@ sub

[pve-devel] [PATCH installer 0/2] rustfmt & clippy warning fix

2023-11-03 Thread Christoph Heiss
First patch is just a mechanical rustfmt, which I apparently missed to check during review - that's on me. Second patch fixes a longer-standing clippy warning. Christoph Heiss (2): tui, common: run rustfmt tui: fix clippy warning proxmox-installer-common/src/setup.rs | 1

[pve-devel] [PATCH installer 2/2] tui: fix clippy warning

2023-11-03 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxmox-tui-installer/src/main.rs b/proxmox-tui-installer/src/main.rs index 3216868..2e5a194 100644 --- a/proxmox-tui-installer/src/main.rs +++ b/proxmox-tui

[pve-devel] [PATCH installer 1/2] tui, common: run rustfmt

2023-11-03 Thread Christoph Heiss
While at it, move rustfmt.toml to the repo root, to share it with the other crate. Signed-off-by: Christoph Heiss --- proxmox-installer-common/src/setup.rs | 1 - proxmox-tui-installer/src/options.rs | 12 ++-- proxmox-tui-installer/src/setup.rs

[pve-devel] [PATCH installer v3 8/8] fix #4829: tui: bootdisk: expose new `arc_max` ZFS option for PVE installations

2023-10-31 Thread Christoph Heiss
To set the maximum value for arc_max accordingly, simply pass down `RuntimeInfo` directly instead of the disks array to the views. Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * fix ZFS_ARC_MIN_SIZE to be MiB rather than bytes Changes v2 -> v3: * renamed `ZFS_ARC_MI

[pve-devel] [PATCH installer v3 5/8] fix #4829: proxinstall: expose new `arc_max` ZFS option for PVE installations

2023-10-31 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * no changes Changes v2 -> v3: * no changes proxinstall | 15 +++ 1 file changed, 15 insertions(+) diff --git a/proxinstall b/proxinstall index 64c8bab..f1a3c02 100755 --- a/proxinstall +++ b/proxinstall @@ -1162,6 +1

[pve-devel] [PATCH installer v3 2/8] tui: views: add optional suffix label for `NumericEditView`s

2023-10-31 Thread Christoph Heiss
Most of the churn here is due to changing the inner view from an `EditView` to a `LinearLayout`. Also prompted the introduction of two small helpers .inner() and .inner_mut() to simplify things everywhere else in the view. Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * no chan

[pve-devel] [PATCH installer v3 1/8] run env: add comment for query_total_memory()

2023-10-31 Thread Christoph Heiss
This is mainly to explicitly document the unit of its return value. No functional changes. Signed-off-by: Christoph Heiss --- Changes v2 -> v3: * new patch Proxmox/Install/RunEnv.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Proxmox/Install/RunEnv.pm b/Proxmox/Install/RunEnv

[pve-devel] [PATCH installer v3 7/8] fix #4829: tui: setup: add new ZFS `arc_max` option

2023-10-31 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * updated comment for ZfsBootdiskOptions::defaults_from() accordingly Changes v2 -> v2: * documented the unit of the return value of default_zfs_arc_max() proxmox-tui-installer/src/options.rs| 57 +++-- p

[pve-devel] [PATCH installer v3 6/8] fix #4829: test: add tests for new zfs_arc_max calculations

2023-10-31 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * no changes Changes v2 -> v3: * no changes Makefile| 3 ++ debian/control | 1 + test/Makefile | 10 ++ test/zfs-arc-max.pl | 81 + 4 files changed, 95 inse

[pve-devel] [PATCH installer v3 4/8] fix #4829: install: add new ZFS `arc_max` setup option

2023-10-31 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * no changes Changes v2 -> v3: * better documented calculation and renamed some variables to reflect its unit (thanks Thomas!) * moved modprobe config setup into separate sub Proxmox/Install.pm| 14 P

[pve-devel] [PATCH installer v3 3/8] tui: bootdisk: simplify product handling by passing the config directly

2023-10-31 Thread Christoph Heiss
No functional changes. Signed-off-by: Christoph Heiss --- Changes v2 -> v3: * new patch proxmox-tui-installer/src/views/bootdisk.rs | 50 - 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/proxmox-tui-installer/src/views/bootdisk.rs b/proxmox-tui-instal

[pve-devel] [PATCH installer v3 0/8] fix #4829: set up lower default limit for ZFS ARC in installer

2023-10-31 Thread Christoph Heiss
sed on latest master * new patch explaining query_total_memory, which is used extensively in this patchset * new patch unifying product handling a bit * documented all calculations better w.r.t. to their units * moved modprobe setup into separate sub Christoph Heiss (8):

[pve-devel] [PATCH installer] buildsys: copy over `proxmox-installer-common` crate to build directory

2023-10-27 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 111fe4b..e792e0e 100644 --- a/Makefile +++ b/Makefile @@ -43,6 +43,7 @@ $(BUILDDIR): proxinstall \ proxmox-low-level-installer \ proxmox-tui

Re: [pve-devel] [PATCH 00/12] installer: add crate for common code

2023-10-27 Thread Christoph Heiss
ick follow-up patch for that, so you don't have to necessarily re-spin the whole series just for a single, trivial line. LGTM; thus please consider the whole series: Reviewed-by: Christoph Heiss Tested-by: Christoph Heiss On Wed, Oct 25, 2023 at 05:59:59PM +0200, Aaron Lauterer wrote: >

Re: [pve-devel] [PATCH 02/12] common: copy common code from tui-installer

2023-10-27 Thread Christoph Heiss
Simple code move/copy, so LGTM. Reviewed-by: Christoph Heiss On Wed, Oct 25, 2023 at 06:00:01PM +0200, Aaron Lauterer wrote: > > Copy code that is common to its own crate. > > Signed-off-by: Aaron Lauterer > --- > proxmox-installer-common/Cargo.toml | 2 + &g

Re: [pve-devel] [PATCH 12/12] tui: remove unused read_json function

2023-10-27 Thread Christoph Heiss
Could be squased into the previous patch IMO if you do send a v2, but not a blocker either for me if not. In any case: Reviewed-by: Christoph Heiss On Wed, Oct 25, 2023 at 06:00:11PM +0200, Aaron Lauterer wrote: > > Signed-off-by: Aaron Lauterer > --- > proxmox-tui-installer/

Re: [pve-devel] [PATCH 01/12] add proxmox-installer-common crate

2023-10-27 Thread Christoph Heiss
The .deb fails to build with this patch applied, `proxmox-installer-common/` must also be copied to the build directory (see `$(BUILDIR)` target in the Makefile). On Wed, Oct 25, 2023 at 06:00:00PM +0200, Aaron Lauterer wrote: > > It will be used for code shared among the different crates in

Re: [pve-devel] [PATCH installer v2 1/6] fix #4829: install: add new ZFS `arc_max` setup option

2023-10-27 Thread Christoph Heiss
On Wed, Oct 25, 2023 at 07:09:00PM +0200, Thomas Lamprecht wrote: > > Am 25/10/2023 um 10:28 schrieb Christoph Heiss: > > On Tue, Oct 24, 2023 at 08:59:36AM -0300, Gilberto Ferreira via pve-devel > > wrote: > > > > Currently, this isn't planned, although -

[pve-devel] [PATCH installer v2 1/3] tui: refactor `NetworkOptions` to have a `defaults_from()` function

2023-10-25 Thread Christoph Heiss
This aligns it with the other constructors for options struct by introducing a `::defaults_from()` function. Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/main.rs| 15 +++--- proxmox-tui-installer/src/options.rs | 75 +--- proxmox-tui-installer/src

[pve-devel] [PATCH installer v2 2/3] tui: bootdisk: pass down product info to advanced dialog

2023-10-25 Thread Christoph Heiss
Enables the advanced and LVM dialog to determine what options (max root/data size and Btrfs RAIDs) by itself, without needing to resort to the global `setup_info()` function. Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/views/bootdisk.rs | 74 ++--- 1 file

[pve-devel] [PATCH installer v2 0/3] tui: remove global, unsafe setup info

2023-10-25 Thread Christoph Heiss
by Aaron for pulling out non-TUI-related code into a separate, shared crate. No functional changes overall. v1: https://lists.proxmox.com/pipermail/pve-devel/2023-October/059335.html Changes v1 -> v2: * Rebased on latest master, no actual changes otherwise Christoph Heiss (3): tui: refac

[pve-devel] [PATCH installer v2 3/3] tui: remove obsolete, global `SetupInfo` state

2023-10-25 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/main.rs | 21 ++--- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/proxmox-tui-installer/src/main.rs b/proxmox-tui-installer/src/main.rs index a342a08..81fe3ca 100644 --- a/proxmox-tui-installer/src

Re: [pve-devel] [PATCH installer v2 1/6] fix #4829: install: add new ZFS `arc_max` setup option

2023-10-25 Thread Christoph Heiss
On Tue, Oct 24, 2023 at 08:59:36AM -0300, Gilberto Ferreira via pve-devel wrote: > Date: Tue, 24 Oct 2023 08:59:36 -0300 > From: Gilberto Ferreira > To: Proxmox VE development discussion > Subject: Re: [pve-devel] [PATCH installer v2 1/6] fix #4829: install: add > new ZFS `arc_max` setup

Re: [pve-devel] [PATCH installer v2 1/6] fix #4829: install: add new ZFS `arc_max` setup option

2023-10-25 Thread Christoph Heiss
Thanks for the review! I will refactor all the points mentioned and send a v2 soon. On Tue, Oct 24, 2023 at 05:05:15PM +0200, Thomas Lamprecht wrote: > > Am 24/10/2023 um 13:55 schrieb Christoph Heiss: > > Signed-off-by: Christoph Heiss > > --- > > Changes v1 -

[pve-devel] [PATCH installer v2 6/6] fix #4829: tui: bootdisk: expose new `arc_max` ZFS option for PVE installations

2023-10-24 Thread Christoph Heiss
To set the maximum value for arc_max accordingly, simply pass down `RuntimeInfo` directly instead of the disks array to the views. Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * Fix ZFS_ARC_MIN_SIZE to be MiB rather than bytes proxmox-tui-installer/src/main.rs |

[pve-devel] [PATCH installer v2 3/6] fix #4829: test: add tests for new zfs_arc_max calculations

2023-10-24 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * No changes Makefile| 3 ++ debian/control | 1 + test/Makefile | 10 ++ test/zfs-arc-max.pl | 81 + 4 files changed, 95 insertions(+) create mode 100644 t

[pve-devel] [PATCH installer v2 2/6] fix #4829: proxinstall: expose new `arc_max` ZFS option for PVE installations

2023-10-24 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * No changes proxinstall | 15 +++ 1 file changed, 15 insertions(+) diff --git a/proxinstall b/proxinstall index 64c8bab..f1a3c02 100755 --- a/proxinstall +++ b/proxinstall @@ -1162,6 +1162,21 @@ my $create_raid_advanced_g

[pve-devel] [PATCH installer v2 5/6] fix #4829: tui: setup: add new ZFS `arc_max` option

2023-10-24 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * Updated comment for ZfsBootdiskOptions::defaults_from() accordingly proxmox-tui-installer/src/options.rs| 52 +++-- proxmox-tui-installer/src/setup.rs | 2 + proxmox-tui-installer/src/views/bootdisk

[pve-devel] [PATCH installer v2 4/6] tui: views: add optional suffix label for `NumericEditView`s

2023-10-24 Thread Christoph Heiss
Most of the churn here is due to changing the inner view from an `EditView` to a `LinearLayout`. Also prompted the introduction of two small helpers .inner() and .inner_mut() to simplify things everywhere else in the view. Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * No chan

[pve-devel] [PATCH installer v2 0/6] fix #4829: set up lower default limit for ZFS ARC in installer

2023-10-24 Thread Christoph Heiss
el/2023-August/058830.html Notable changes v1 -> v2: * Rebased on latest master * Fix arc_max value set in TUI not being applied correctly Christoph Heiss (6): fix #4829: install: add new ZFS `arc_max` setup option fix #4829: proxinstall: expose new `arc_max` ZFS option for PVE in

[pve-devel] [PATCH installer v2 1/6] fix #4829: install: add new ZFS `arc_max` setup option

2023-10-24 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * No changes Proxmox/Install.pm| 4 Proxmox/Install/Config.pm | 1 + Proxmox/Install/RunEnv.pm | 38 ++ 3 files changed, 43 insertions(+) diff --git a/Proxmox/Install.pm b/Prox

Re: [pve-devel] applied-series: [PATCH installer 0/5] use hostname from DHCP lease if available

2023-10-24 Thread Christoph Heiss
On Fri, Oct 20, 2023 at 05:21:41PM +0200, Thomas Lamprecht wrote: > > Am 20/10/2023 um 11:46 schrieb Christoph Heiss: > > DHCP servers can set option 12 ("host-name") for client leases [0], > > telling them about their hostname. It's very much non-invasive and f

[pve-devel] [PATCH installer 5/5] tui: add some tests for `NetworkInfo` -> `NetworkOptions` conversion

2023-10-20 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/options.rs | 110 ++- proxmox-tui-installer/src/utils.rs | 2 +- 2 files changed, 110 insertions(+), 2 deletions(-) diff --git a/proxmox-tui-installer/src/options.rs b/proxmox-tui-installer/src/options.rs

[pve-devel] [PATCH installer 3/5] proxinstall: use hostname from run env if available

2023-10-20 Thread Christoph Heiss
This now tries to use the hostname from the DHCP lease if it was set, falling back to the product name as before. Signed-off-by: Christoph Heiss --- proxinstall | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/proxinstall b/proxinstall index 88f194f..4d61fa7 100755

[pve-devel] [PATCH installer 0/5] use hostname from DHCP lease if available

2023-10-20 Thread Christoph Heiss
ery useful feature too have. I have tested this with the "host-name" entry set and unset, as well as any combinations of that with the domain name being set or unset. [0] https://datatracker.ietf.org/doc/html/rfc2132#section-3.14 Christoph Heiss (5): net: move hostname/fqdn regexes in

[pve-devel] [PATCH installer 2/5] run env: retrieve and store hostname from DHCP lease if available

2023-10-20 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- Proxmox/Install/RunEnv.pm | 4 Proxmox/Sys/Net.pm| 25 + 2 files changed, 29 insertions(+) diff --git a/Proxmox/Install/RunEnv.pm b/Proxmox/Install/RunEnv.pm index 19b5387..7589679 100644 --- a/Proxmox/Install/RunEnv.pm

[pve-devel] [PATCH installer 4/5] tui: use hostname from run env if available

2023-10-20 Thread Christoph Heiss
This now tries to use the hostname from the DHCP lease if it was set, falling back to the product name as before. Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/options.rs | 22 +++--- proxmox-tui-installer/src/setup.rs | 3 +++ 2 files changed, 18 insertions

[pve-devel] [PATCH installer 1/5] net: move hostname/fqdn regexes into common code

2023-10-20 Thread Christoph Heiss
Such that they can be re-used by other parts. No functional changes. Signed-off-by: Christoph Heiss --- Proxmox/Sys/Net.pm | 3 +++ proxinstall| 9 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Proxmox/Sys/Net.pm b/Proxmox/Sys/Net.pm index ba368c1..f5a9885

Re: [pve-devel] [PATCH manager v2] pvesh: decode streamed responses

2023-10-19 Thread Christoph Heiss
Ping, still applies. On Wed, Jun 07, 2023 at 04:15:11PM +0200, Christoph Heiss wrote: > > This allows to use `pvesh` on endpoints like /nodes/{node}/journal, > which return streamed (and possibly gzip'd) responses. > > Currently, e.g. `pvesh get /nodes/localhost/journal -

[pve-devel] [PATCH installer] run env: always re-create run env file in test mode

2023-10-18 Thread Christoph Heiss
When debugging or otherwise deliberately running the `dump-env` low-level installer command in test mode, chances are that you'd want the run env file to be re-created as well. No impact on the normal installation flow. Signed-off-by: Christoph Heiss --- Noticed over time that I have to run `rm

Re: [pve-devel] [PATCH v2 installer] fix #4869: Make management interface selection more verbose

2023-10-13 Thread Christoph Heiss
See inline comments. Also, `cargo fmt` please :^) On Thu, Oct 12, 2023 at 03:02:08PM +0200, Filip Schauer wrote: > [..] > diff --git a/proxinstall b/proxinstall > index d5b2565..51170cd 100755 > --- a/proxinstall > +++ b/proxinstall > @@ -347,7 +347,9 @@ sub create_ipconf_view { > > my

Re: [pve-devel] [PATCH font-logos/manager v2 0/5] fix #2435: lxc: show distro and privileged status in summary

2023-10-11 Thread Christoph Heiss
Ping - still applies cleanly on current master of both repositories. On Wed, Jul 05, 2023 at 01:12:44PM +0200, Christoph Heiss wrote: > > This implements #2435 [0]. Show the unprivileged status in the summary > panel, the distro logo and name in the title of the summary panel. > &

Re: [pve-devel] [PATCH installer 1/1] fix #4869: Show state in management interface ComboBox

2023-10-10 Thread Christoph Heiss
On Tue, Oct 10, 2023 at 01:55:43PM +0200, Thomas Lamprecht wrote: > > Am 10/10/2023 um 13:33 schrieb Christoph Heiss: > > On Fri, Aug 04, 2023 at 12:26:46PM +0200, Filip Schauer wrote: > >> @@ -347,7 +347,7 @@ sub create_ipconf_view { > >> > >> my $ge

Re: [pve-devel] [PATCH installer 1/1] fix #4869: Show state in management interface ComboBox

2023-10-10 Thread Christoph Heiss
Needs to be done for the TUI installer as well. Easiest way here is to add `state` to each interface in Proxmox::Sys::RunEnv::query_netdevs(), then deserialize that in `setup::Interface`. Looking at it, adding the MAC address there too would be great, if you are already at it. On Fri, Aug 04,

[pve-devel] [PATCH installer 1/3] tui: refactor `NetworkOptions` to have a `defaults_from()` function

2023-10-04 Thread Christoph Heiss
This aligns it with the other constructors for options struct by introducing a `::defaults_from()` function. No functional changes. Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/main.rs| 15 ++-- proxmox-tui-installer/src/options.rs | 36

[pve-devel] [PATCH installer 3/3] tui: remove obsolete, global `SetupInfo` state

2023-10-04 Thread Christoph Heiss
No functional changes. Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/main.rs | 21 ++--- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/proxmox-tui-installer/src/main.rs b/proxmox-tui-installer/src/main.rs index ea8c8d9..49f378b 100644

[pve-devel] [PATCH installer 0/3] tui: remove global, unsafe setup info

2023-10-04 Thread Christoph Heiss
by Aaron for pulling out non-TUI-related code into a separate, shared crate. No functional changes overall. Christoph Heiss (3): tui: refactor `NetworkOptions` to have a `defaults_from()` function tui: bootdisk: pass down product info to advanced dialog tui: remove obsolete, global `SetupInfo

[pve-devel] [PATCH installer 2/3] tui: bootdisk: pass down product info to advanced dialog

2023-10-04 Thread Christoph Heiss
Enables the advanced and LVM dialog to determine what options (max root/data size and Btrfs RAIDs) by itself, without needing to resort to the global `setup_info()` function. No functional changes. Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/views/bootdisk.rs | 74

[pve-devel] [PATCH installer 2/7] tui: improve `FormView` error handling

2023-10-04 Thread Christoph Heiss
Mostly internal changes without any user-visible changes; replaces all optional return values in form with result that can hold more specific error causes. Signed-off-by: Christoph Heiss --- RFC; just a thought: It could make sense to introduce the `anyhow` crate here in the installer as well

[pve-devel] [PATCH installer 0/7] tui: add min/max constraints for bootdisk parameters

2023-10-04 Thread Christoph Heiss
ted. The same can be done for the GUI installer of course, but I didn't want to include in this series to avoid it being larger-than-necessary. series. Christoph Heiss (7): tui: fix setting content when using the `DiskSizeEditView` builder tui: improve `FormView` error handling tui: add optio

[pve-devel] [PATCH installer 7/7] tui: views: add some TUI component tests

2023-10-04 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/main.rs | 35 ++ proxmox-tui-installer/src/options.rs| 2 +- proxmox-tui-installer/src/views/mod.rs | 127 +++- proxmox-tui-installer/src/views/timezone.rs | 109 + 4 files

[pve-devel] [PATCH installer 6/7] tui: add min/max contraints for Btrfs bootdisk parameters

2023-10-04 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/views/bootdisk.rs | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/proxmox-tui-installer/src/views/bootdisk.rs b/proxmox-tui-installer/src/views/bootdisk.rs index bb421a1..66d909c 100644 --- a/proxmox-tui

[pve-devel] [PATCH installer 1/7] tui: fix setting content when using the `DiskSizeEditView` builder

2023-10-04 Thread Christoph Heiss
Previously, it would throw away all other settings (like `max_value`), if a construct like DiskSizeEditView::new().max_value(8.0).content(8.0) was used, due to simply replacing the inner view. Instead, modify the inner view. Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/views

[pve-devel] [PATCH installer 5/7] tui: add min/max contraints for LVM bootdisk parameters

2023-10-04 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/views/bootdisk.rs | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/proxmox-tui-installer/src/views/bootdisk.rs b/proxmox-tui-installer/src/views/bootdisk.rs index 8b5b5d2..bb421a1 100644

[pve-devel] [PATCH installer 3/7] tui: add optional min-value constraint to `NumericEditView` and `DiskSizeEditView`

2023-10-04 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/views/mod.rs | 46 ++ 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/proxmox-tui-installer/src/views/mod.rs b/proxmox-tui-installer/src/views/mod.rs index 7efd487..0fe715e 100644 --- a/proxmox

[pve-devel] [PATCH installer 4/7] tui: add min/max constraints for ZFS bootdisk parameters

2023-10-04 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/views/bootdisk.rs | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/proxmox-tui-installer/src/views/bootdisk.rs b/proxmox-tui-installer/src/views/bootdisk.rs index 46bdd9f..8b5b5d2 100644

[pve-devel] [PATCH installer] low level: testmode: take path to disk image instead of using /dev/null

2023-10-03 Thread Christoph Heiss
.. in exactly the same way `proxinstall` does, streamlining them both. Up until now, testing the TUI installer often involved hand-editing the `run-env-info.json` to put some proper disk sizes > 0 in place. This makes this process just a lot easier. Signed-off-by: Christoph Heiss --- Makef

Re: [pve-devel] [PATCH manager 0/2] ui: fw: allow selecting network interface for rules using combogrid

2023-09-26 Thread Christoph Heiss
Ping. While it does not apply cleanly on current master anymore, I'd like to collect some general feedback on the approach before rebasing + resending w/o any actual changes. On Thu, May 11, 2023 at 11:46:18AM +0200, Christoph Heiss wrote: > > For nodes, VMs and CTs we can show the user

[pve-devel] [PATCH container v2] setup: fix architecture detection for NixOS containers

2023-09-25 Thread Christoph Heiss
PBS backup, as well as migrating both container. Signed-off-by: Christoph Heiss --- v1: https://lists.proxmox.com/pipermail/pve-devel/2023-February/055949.html Changes since v1: * Moved detect_architecture() to PVE::LXC::Tools to avoid a cyclic include * Properly log/report errors from

Re: [pve-devel] [RFC installer 2/6] add proxmox-auto-installer

2023-09-21 Thread Christoph Heiss
On Thu, Sep 21, 2023 at 01:30:33PM +0200, Thomas Lamprecht wrote: > > Am 21/09/2023 um 13:16 schrieb Christoph Heiss: [..] > > Sending simple JSON-formatted logs to an HTTP endpoint or even using > > the rsyslog protocol come to mind and would be a good solution for &

[pve-devel] [PATCH installer] sys: block: fix inverted check when detecting block size

2023-09-21 Thread Christoph Heiss
We do actually want the block size if it is integer - currently, it is always set to `undef` (and then `null` in the serialized JSON). Fixes: 15b2cd7 ("sys: block: fix possible use of `undef`-value when detecting disk sizes") Signed-off-by: Christoph Heiss --- Proxmox/Sys/Block.pm

Re: [pve-devel] [RFC installer 2/6] add proxmox-auto-installer

2023-09-21 Thread Christoph Heiss
Some general notes: - The overall approach seems fine too me. Did some cursory testing too, worked fine - although I did not really test out the filtering/matching much. - Probably just due to it being still a bit early, but all these `.unwrap()/.expect()` should be replaced with proper

[pve-devel] [PATCH installer] tui: honor test mode flag when starting low-level install session

2023-09-20 Thread Christoph Heiss
Even if the installer is run in release mode, the test-mode flag should be honored on whether to start a test-installation or not. The test mode is always forced on in debug builds, so the cfg() conditionals can be dropped. Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/main.rs

Re: [pve-devel] [RFC installer 3/6] add answer file fetch script

2023-09-20 Thread Christoph Heiss
I think this can be part of the auto-installer itself, instead of introducing another shell script somewhere. While yes, "do one thing and do it well", its a rather small part and not unreasonable to move it directly into the auto-installer. Or have a separate Rust-written executable for this,

Re: [pve-devel] [PATCH installer 5/6] sys: block: fix possible use of `undef`-value when detecting disk sizes

2023-08-23 Thread Christoph Heiss
On Wed, Aug 23, 2023 at 10:31:29AM +0200, Wolfgang Bumiller wrote: > > On Wed, Aug 09, 2023 at 03:44:24PM +0200, Christoph Heiss wrote: > > [..] > > diff --git a/Proxmox/Sys/Block.pm b/Proxmox/Sys/Block.pm > > index 26085e3..f76e0f1 100644 > > --- a/Proxmox/Sys/

Re: [pve-devel] [PATCH container] setup: Fix architecture detection for NixOS containers

2023-08-22 Thread Christoph Heiss
Thanks for the review! On Mon, Aug 21, 2023 at 02:50:28PM +0200, Fiona Ebner wrote: > > Am 28.02.23 um 11:59 schrieb Christoph Heiss: > > diff --git a/src/PVE/LXC/Setup.pm b/src/PVE/LXC/Setup.pm > > index 891231f..4346c5e 100644 > > --- a/src/PVE/LXC/Setup.pm > &

[pve-devel] [PATCH installer 3/6] fix #4829: test: add tests for new zfs_arc_max calculations

2023-08-22 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- Makefile| 3 ++ debian/control | 1 + test/Makefile | 10 ++ test/zfs-arc-max.pl | 81 + 4 files changed, 95 insertions(+) create mode 100644 test/Makefile create mode 100755 test/zfs

[pve-devel] [PATCH installer 0/6] fix #4829: set up a lower default limit for the ZFS ARC in the installer

2023-08-22 Thread Christoph Heiss
BS and PMG. For PVE, checked that the `zfs` module option gets correctly written & applied, the latter by looking at the output of `arc_summary`. For PBS and PMG, verified that no modprobe options file is created and the ARC size is set to default. Christoph Heiss (6): fix #4829: instal

[pve-devel] [PATCH installer 6/6] fix #4829: tui: bootdisk: expose new `arc_max` ZFS option for PVE installations

2023-08-22 Thread Christoph Heiss
To set the maximum value for arc_max accordingly, simply pass down `RuntimeInfo` directly instead of the disks array to the views - which accounts for about half the churn here. Signed-off-by: Christoph Heiss --- proxmox-tui-installer/src/main.rs | 2 +- proxmox-tui-installer/src

[pve-devel] [PATCH installer 1/6] fix #4829: install: add new ZFS `arc_max` setup option

2023-08-22 Thread Christoph Heiss
Signed-off-by: Christoph Heiss --- Proxmox/Install.pm| 4 Proxmox/Install/Config.pm | 1 + Proxmox/Install/RunEnv.pm | 38 ++ 3 files changed, 43 insertions(+) diff --git a/Proxmox/Install.pm b/Proxmox/Install.pm index 1c4811d..d23a04b 100644

<    1   2   3   4   5   6   >