Re: [pve-devel] [PATCH installer v5 00/36] add automated/unattended installation

2024-04-17 Thread Aaron Lauterer
ah, sorry for missing that! Do you want me to send it again? On 2024-04-17 07:22, Thomas Lamprecht wrote: Am 16/04/2024 um 17:32 schrieb Aaron Lauterer: patches until 31 got a [0,1] Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss why don't these patches include above trailers the

Re: [pve-devel] [PATCH pve-flutter-frontend v2] node overview: add power settings menu

2024-04-17 Thread Folke Gleumes
On Wed, 2024-04-17 at 08:45 +0200, Dominik Csapak wrote: > similar to how it works for qemu, but add a confirmation dialog > so one does not accidentally shutdown or reboot a node. > > Signed-off-by: Dominik Csapak > --- > changes from v1: > * add an AlertDialog as confirmation before executing t

Re: [pve-devel] [PATCH pve-flutter-frontend v2] node overview: add power settings menu

2024-04-17 Thread Dominik Csapak
On 4/17/24 10:19, Folke Gleumes wrote: On Wed, 2024-04-17 at 08:45 +0200, Dominik Csapak wrote: similar to how it works for qemu, but add a confirmation dialog so one does not accidentally shutdown or reboot a node. Signed-off-by: Dominik Csapak --- changes from v1: * add an AlertDialog as con

[pve-devel] [PATCH pve-flutter-frontend v3] node overview: add power settings menu

2024-04-17 Thread Dominik Csapak
similar to how it works for qemu, but add a confirmation dialog so one does not accidentally shutdown or reboot a node. Signed-off-by: Dominik Csapak --- changes from v2: * reordered and renamed yes/no on the confirmation dialog * slightly adapted the confirmation text lib/bloc/pve_node_overvie

[pve-devel] [PATCH pve-flutter-frontend] update flutter_inappwebview to 6.0.0

2024-04-17 Thread Dominik Csapak
only 2 changes for the URI necessary Signed-off-by: Dominik Csapak --- lib/widgets/pve_console_menu_widget.dart | 4 +- pubspec.lock | 56 ++-- pubspec.yaml | 2 +- 3 files changed, 55 insertions(+), 7 deletions(-) di

[pve-devel] [PATCH v5 manager 0/2] add edit window for device passthrough

2024-04-17 Thread Filip Schauer
Changes since v4: * Simplify cbind * Fix selection of custom devid not being applied on creation in onGetValues Changes since v3: * Pass confid in via cbind instead of manually setting it in the view model * Check me.isCreate instead of !me.confid for whether to find the next free device slo

[pve-devel] [PATCH v5 manager 1/2] utils: clarify naming of LXC mount point utils

2024-04-17 Thread Filip Schauer
Clarify the naming of mount point utils to clearly indicate their relation to LXC containers. Signed-off-by: Filip Schauer --- www/manager6/Utils.js| 12 ++-- www/manager6/lxc/MPEdit.js | 4 ++-- www/manager6/lxc/MultiMPEdit.js | 4 ++-- www/m

[pve-devel] [PATCH v5 manager 2/2] ui: lxc: add edit window for device passthrough

2024-04-17 Thread Filip Schauer
Signed-off-by: Filip Schauer --- www/manager6/Makefile | 1 + www/manager6/Utils.js | 11 +++ www/manager6/lxc/DeviceEdit.js | 176 + www/manager6/lxc/Resources.js | 31 +- 4 files changed, 218 insertions(+), 1 deletion(-) create mode 10

Re: [pve-devel] [PATCH pve-flutter-frontend] update flutter_inappwebview to 6.0.0

2024-04-17 Thread Thomas Lamprecht
Am 17/04/2024 um 10:41 schrieb Dominik Csapak: > only 2 changes for the URI necessary > as mentioned off-list I tried this already locally, so pushed that similar change out instead replacing this: https://git.proxmox.com/?p=flutter/pve_flutter_frontend.git;a=commit;h=b7ea60bc40fb542bbf13835369e7

Re: [pve-devel] [PATCH v4 manager 2/2] ui: lxc: add edit window for device passthrough

2024-04-17 Thread Filip Schauer
Changed in patch v5. I also fixed a bug that ignored a custom devid when creating a device passthrough. https://lists.proxmox.com/pipermail/pve-devel/2024-April/063108.html On 16/04/2024 15:57, Fiona Ebner wrote: Am 16.04.24 um 14:10 schrieb Filip Schauer: + +cbind: { + confid: '{con

[pve-devel] applied: [PATCH pve-flutter-frontend v2] node overview: add power settings menu

2024-04-17 Thread Thomas Lamprecht
Am 17/04/2024 um 08:45 schrieb Dominik Csapak: > similar to how it works for qemu, but add a confirmation dialog > so one does not accidentally shutdown or reboot a node. > > Signed-off-by: Dominik Csapak > --- > changes from v1: > * add an AlertDialog as confirmation before executing the action

[pve-devel] [PATCH pve-flutter-frontend] node overview: power menu: reorder/reword confirm buttons

2024-04-17 Thread Dominik Csapak
move the confirm action to the right as mentioned in the material spec[0] also rewords the buttons to 'cancel' and 'shutdown/reboot' for that to work properly slightly rename the confirm message 0: https://m3.material.io/components/dialogs/guidelines#befd7f4d-1029-4957-b1b5-da13fc0bbf3c Signed-o

Re: [pve-devel] [PATCH storage 1/9] copy OVF.pm from qemu-server

2024-04-17 Thread Fiona Ebner
Am 16.04.24 um 17:02 schrieb Thomas Lamprecht: > Am 16/04/2024 um 15:18 schrieb Dominik Csapak: >> copies the OVF.pm and relevant ovf tests from qemu-server. >> We need it here, and it uses PVE::Storage already, and since there is no >> intermediary package/repository we could put it, it seems fitt

Re: [pve-devel] [PATCH storage 1/9] copy OVF.pm from qemu-server

2024-04-17 Thread Thomas Lamprecht
Am 17/04/2024 um 11:19 schrieb Fiona Ebner: > Am 16.04.24 um 17:02 schrieb Thomas Lamprecht: >> high-level nit: this, and most of the ESXi one, should go into another module >> name space, e.g. PVE::GuestImport:: (or if that's to long, or we really are >> sure >> that other stuff can be imported (

[pve-devel] [PATCH v3 storage] fix insecure migration failing if waiting on lock

2024-04-17 Thread Mira Limbeck
both STDOUT and STDERR are written into `$info` which is then parsed for IP and port of the target socket listening. when the ports file can't be locked immediately `trying to acquire lock...` is printed on STDERR and in turn written into `$info`. trying to parse the IP then fails, resulting in a m

[pve-devel] applied: [PATCH v5 manager 0/2] add edit window for device passthrough

2024-04-17 Thread Thomas Lamprecht
Am 17/04/2024 um 10:44 schrieb Filip Schauer: > Changes since v4: > * Simplify cbind > * Fix selection of custom devid not being applied on creation in > onGetValues > > Changes since v3: > * Pass confid in via cbind instead of manually setting it in the view > model > * Check me.isCreate inst

Re: [pve-devel] applied: [PATCH v5 manager 0/2] add edit window for device passthrough

2024-04-17 Thread Filip Schauer
That is already fixed by this commit to pve-container: https://git.proxmox.com/?p=pve-container.git;a=commitdiff;h=556ddd393165d51653fe32c1f8fe8628d1802219 On 17/04/2024 11:54, Thomas Lamprecht wrote: Also noticed something not related to the UI side: if I enter some bogus path, like `/dev/enoen

Re: [pve-devel] [PATCH storage 2/9] plugin: dir: implement import content type

2024-04-17 Thread Fiona Ebner
Am 16.04.24 um 15:18 schrieb Dominik Csapak: > in DirPlugin and not Plugin (because of cyclic dependency of > Plugin -> OVF -> Storage -> Plugin otherwise) > > only ovf is currently supported (though ova will be shown in import > listing), expects the files to not be in a subdir, and adjacent to t

[pve-devel] applied: [PATCH v3 storage] fix insecure migration failing if waiting on lock

2024-04-17 Thread Thomas Lamprecht
Am 17/04/2024 um 11:48 schrieb Mira Limbeck: > both STDOUT and STDERR are written into `$info` which is then parsed for > IP and port of the target socket listening. > when the ports file can't be locked immediately `trying to acquire > lock...` is printed on STDERR and in turn written into `$info`

Re: [pve-devel] [PATCH storage 3/9] plugin: dir: handle ova files for import

2024-04-17 Thread Fiona Ebner
Am 16.04.24 um 15:18 schrieb Dominik Csapak: > since we want to handle ova files (which are only ovf+vmdks bundled in a > tar file) for import, add code that handles that. > > we introduce a valid volname for files contained in ovas like this: > > storage:import/archive.ova/disk-1.vmdk > > by b

[pve-devel] [PATCH http-server v2] http: support Content-Encoding=deflate

2024-04-17 Thread Maximiliano Sandoval
Add support for compressing the body of responses with `Content-Encoding: deflate` following [RFC9110]. Note that in this context `deflate` is actually a "zlib" data format as defined in [RFC1950]. To preserve the current behavior we prefer `Content-Encoding: gzip` whenever `gzip` is listed as one

Re: [pve-devel] [PATCH storage 4/9] ovf: implement parsing the ostype

2024-04-17 Thread Fiona Ebner
Am 16.04.24 um 15:18 schrieb Dominik Csapak: > use the standards info about the ostypes to map to our own > (see comment for link to the relevant part of the dmtf schema) > > every type that is not listed we map to 'other', so no need to have it > in a list. > > Signed-off-by: Dominik Csapak > R

Re: [pve-devel] [PATCH storage 5/9] ovf: implement parsing out firmware type

2024-04-17 Thread Fiona Ebner
Am 16.04.24 um 15:18 schrieb Dominik Csapak: > it seems there is no part of the ovf standard that handles which type of > bios there is (at least i could not find it). Every ovf/ova i tested > either has no info about it, or has it in a vmware specific property > which we pare here. s/pare/parse/

Re: [pve-devel] [PATCH storage 6/9] ovf: implement rudimentary boot order

2024-04-17 Thread Fiona Ebner
Am 16.04.24 um 15:18 schrieb Dominik Csapak: > simply add all parsed disks to the boot order in the order we encounter > them (similar to the esxi plugin). > > Signed-off-by: Dominik Csapak > --- > src/PVE/Storage/OVF.pm| 6 ++ > src/test/run_ovf_tests.pl | 3 +++ > 2 files changed, 9 in

[pve-devel] [PATCH v3 access-control] fix #5335: stable sorting in user.cfg

2024-04-17 Thread Daniel Krambrock via pve-devel
--- Begin Message --- Stable sorting in user.cfg config file allows tracking changes by checking into git or when using automation like ansible. Signed-off-by: Daniel Krambrock --- changes since v2: * code-style fix src/PVE/AccessControl.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

[pve-devel] [PATCH v3 firewall] fix #5335: stable sorting in cluster.fw

2024-04-17 Thread Daniel Krambrock via pve-devel
--- Begin Message --- Stable sorting in cluster.fw config file allows tracking changes by checking into git or when using automation like ansible. Signed-off-by: Daniel Krambrock --- changes since v2: * code-style fix src/PVE/Firewall.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[pve-devel] [PATCH installer v5 13/36] auto-installer: add tests for answer file parsing

2024-04-17 Thread Aaron Lauterer
By matching the resulting json to be passed to the low level installer against known good ones. The environment info was gathered from one of our AMD Epyc Rome test servers to have a realistic starting point. Signed-off-by: Aaron Lauterer --- proxmox-auto-installer/tests/parse-answer.rs | 106

[pve-devel] [PATCH installer v5 13/36, follow-up] auto-installer: add tests for answer file parsing

2024-04-17 Thread Aaron Lauterer
By matching the resulting json to be passed to the low level installer against known good ones. The environment info was gathered from one of our AMD Epyc Rome test servers to have a realistic starting point. Signed-off-by: Aaron Lauterer --- please use this one, I messed up the enconding settin

Re: [pve-devel] [PATCH storage 7/9] ovf: implement parsing nics

2024-04-17 Thread Fiona Ebner
Am 16.04.24 um 15:19 schrieb Dominik Csapak: > by iterating over the relevant parts and trying to parse out the > 'ResourceSubType'. The content of that is not standardized, but I only > ever found examples that are compatible with vmware, meaning it's > either 'e1000', 'e1000e' or 'vmxnet3' (in va

[pve-devel] [PATCH installer v6 04/36] common: utils: add deserializer for CidrAddress

2024-04-17 Thread Aaron Lauterer
so it can be deserialized from a string Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- proxmox-installer-common/src/utils.rs | 11 +++ 1 file changed, 11 insertions(+) diff --git a/proxmox-installer-common/src/utils.rs b/proxmox-installer-co

[pve-devel] [PATCH installer v6 03/36] common: tui: use BTreeMap for predictable ordering

2024-04-17 Thread Aaron Lauterer
necessary for the disk selection and network interfaces maps to have tests with results that can be compared without much additional effort. Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- proxmox-installer-common/src/setup.rs | 8 proxmox-tui

[pve-devel] [PATCH installer v6 02/36] common: make InstallZfsOption members public

2024-04-17 Thread Aaron Lauterer
as they will be used directly by the auto installer Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- proxmox-installer-common/src/setup.rs | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/proxmox-installer-common/src/setup.

[pve-devel] [PATCH installer v6 16/36] unconfigured: add proxauto as option to start auto installer

2024-04-17 Thread Aaron Lauterer
Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- unconfigured.sh | 8 1 file changed, 8 insertions(+) diff --git a/unconfigured.sh b/unconfigured.sh index 2b371f0..f02336a 100755 --- a/unconfigured.sh +++ b/unconfigured.sh @@ -5,6 +5,7 @@ trap

[pve-devel] [PATCH installer v6 06/36] low-level: add dump-udev command

2024-04-17 Thread Aaron Lauterer
Fetches UDEV device properties prepended with 'E:' for NICs and disks. The result is stored in its own JSON file. This information is needed to filter for specific devices. Mainly for the auto-installer for now. Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauter

[pve-devel] [PATCH installer v6 20/36] common: add Display trait to ProxmoxProduct

2024-04-17 Thread Aaron Lauterer
Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- proxmox-installer-common/src/setup.rs | 10 ++ 1 file changed, 10 insertions(+) diff --git a/proxmox-installer-common/src/setup.rs b/proxmox-installer-common/src/setup.rs index 8432a2c..25d0e9e 1

[pve-devel] [PATCH installer v6 12/36] auto-installer: add simple logging

2024-04-17 Thread Aaron Lauterer
Log to stdout and the file the binary needs to set up. This is a first variant. By using the log crate macros we can change that in the future without too much effort. Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- proxmox-auto-installer/Cargo.toml |

[pve-devel] [PATCH installer v6 17/36] auto-installer: use glob crate for pattern matching

2024-04-17 Thread Aaron Lauterer
Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- proxmox-auto-installer/Cargo.toml | 1 + proxmox-auto-installer/src/utils.rs | 46 +++-- 2 files changed, 18 insertions(+), 29 deletions(-) diff --git a/proxmox-auto-installer/C

[pve-devel] [PATCH installer v6 00/36] add automated/unattended installation

2024-04-17 Thread Aaron Lauterer
patches until 31 got a [0,1] Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss changes since v5: some small style fixups and using cert_fingerprint or TLS instead of ssl_fingerprint and SSL in patches 32-36. changes since v4: Patches 32-36 finalize how to prepare an ISO for automated i

[pve-devel] [PATCH installer v6 29/36] common: skip target_hd when deserializing InstallConfig

2024-04-17 Thread Aaron Lauterer
as only the 'path' property is serialized -> deserialization is problematic. The information would be present in the 'run-env-info-json', but for now there is no need for it in any code that deserializes the low-level config. Therefore we are currently skipping it on deserialization If we need it

[pve-devel] [PATCH installer v6 32/36] fetch-answer: move get_answer_file to utils

2024-04-17 Thread Aaron Lauterer
and switch to accepting the full path to the answer file. This makes it possible to use it in more situations than just the partition case. Signed-off-by: Aaron Lauterer --- .../src/fetch_plugins/partition.rs| 23 +-- .../src/fetch_plugins/utils/mod.rs| 13

[pve-devel] [PATCH installer v6 23/36] auto-installer: fetch: add http post utility module

2024-04-17 Thread Aaron Lauterer
It sends a http(s) POST request with the sysinfo as payload and expects an answer file in return. In order to handle non FQDN URLs (e.g. IP addresses) and self signed certificates, it can optionally take an SHA256 fingerprint of the certificate. This can of course also be used to pin a certificate

[pve-devel] [PATCH installer v6 35/36] fetch-answer: dpcp: improve logging of steps taken

2024-04-17 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer --- proxmox-fetch-answer/src/fetch_plugins/http.rs | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/proxmox-fetch-answer/src/fetch_plugins/http.rs b/proxmox-fetch-answer/src/fetch_plugins/http.rs index 4093131..cd3775f 100644 --- a/proxm

[pve-devel] [PATCH installer v6 34/36] fetch-answer: use ISO specified configurations

2024-04-17 Thread Aaron Lauterer
This patch switches the behavior to use the settings that can be specified in the ISO. This means, that it is possible to control how the answer file should be fetched: * auto - as usually, go through the options until one works (partition, http) * included - the answer file is included in the

[pve-devel] [PATCH installer v6 36/36] autoinst-helper: add prepare-iso subcommand

2024-04-17 Thread Aaron Lauterer
This new subcommand makes it possible to prepare an ISO to use it for an automated installation. It is possible to control the behavior of the resulting automated ISO with optional parameters. If no target file is specified, the new ISO will be named with suffixes to indicate it as automated and a

[pve-devel] [PATCH installer v6 15/36] auto-installer: add fetch answer binary

2024-04-17 Thread Aaron Lauterer
it is supposed to be run first and fetch an answer file. The initial implementation searches for a partition/filesystem called 'proxmoxinst' or 'PROXMOXINST' with an 'answer.toml' file in the root directory. Once it has an answer file, it will call the 'proxmox-auto-installer' and pipe in the con

[pve-devel] [PATCH installer v6 19/36] auto-installer: add proxmox-autoinst-helper tool

2024-04-17 Thread Aaron Lauterer
It can parse an answer file to check against syntax errors, test match filters against the current hardware and list properties of the current hardware to match against. Since this tool should be able to run outside of the installer environment, it does not rely on the device information provided

[pve-devel] [PATCH installer v6 24/36] auto-installer: fetch: add http plugin to fetch answer

2024-04-17 Thread Aaron Lauterer
This plugin will send a HTTP POST request with identifying sysinfo to fetch an answer file. The provided sysinfo can be used to identify the system and generate a matching answer file on demand. The URL to send the request to, can be defined in two ways. Via a custom DHCP option or a TXT record on

[pve-devel] [PATCH installer v6 05/36] common: options: add Deserialize trait

2024-04-17 Thread Aaron Lauterer
For the Enums that will be used to deserialize an answer file. Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- proxmox-installer-common/src/options.rs | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/proxmox-installer-c

[pve-devel] [PATCH installer v6 01/36] tui: common: move InstallConfig struct to common crate

2024-04-17 Thread Aaron Lauterer
It describes the data structure expected by the low-level-installer. We do this so we can use it in more than the TUI installer, for example the planned auto installer. Make the members public so we can easily implement a custom From method for each dependent crate. Tested-by: Christoph Heiss Re

[pve-devel] [PATCH installer v6 10/36] auto-installer: add struct to hold udev info

2024-04-17 Thread Aaron Lauterer
Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- proxmox-auto-installer/src/lib.rs | 1 + proxmox-auto-installer/src/udevinfo.rs | 9 + 2 files changed, 10 insertions(+) create mode 100644 proxmox-auto-installer/src/udevinfo.rs diff --git

[pve-devel] [PATCH installer v6 08/36] auto-installer: add dependencies

2024-04-17 Thread Aaron Lauterer
Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- proxmox-auto-installer/Cargo.toml | 4 1 file changed, 4 insertions(+) diff --git a/proxmox-auto-installer/Cargo.toml b/proxmox-auto-installer/Cargo.toml index 75cfb2c..67218dd 100644 --- a/proxmox-

[pve-devel] [PATCH installer v6 07/36] add auto-installer crate

2024-04-17 Thread Aaron Lauterer
Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- Cargo.toml| 1 + Makefile | 1 + proxmox-auto-installer/Cargo.toml | 10 ++ proxmox-auto-installer/src/lib.rs | 0 4 files changed, 12 insertions

[pve-devel] [PATCH installer v6 18/36] auto-installer: utils: make get_udev_index functions public

2024-04-17 Thread Aaron Lauterer
because we will need to access them directly in the future from a separate binary Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- proxmox-auto-installer/src/utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxmox-auto-i

[pve-devel] [PATCH installer v6 25/36] control: update build depends for auto installer

2024-04-17 Thread Aaron Lauterer
Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- debian/control | 10 ++ 1 file changed, 10 insertions(+) diff --git a/debian/control b/debian/control index 3ca208b..1326400 100644 --- a/debian/control +++ b/debian/control @@ -8,10 +8,20 @@ Buil

[pve-devel] [PATCH installer v6 27/36] low-level: write low level config to /tmp

2024-04-17 Thread Aaron Lauterer
This helps to know how the system was set up in steps after the installation. For example in debug mode or when using post commands in the automatic/unattended installation. Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- proxmox-low-level-installer |

[pve-devel] [PATCH installer v6 09/36] auto-installer: add answer file definition

2024-04-17 Thread Aaron Lauterer
Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- proxmox-auto-installer/Cargo.toml| 1 + proxmox-auto-installer/src/answer.rs | 248 +++ proxmox-auto-installer/src/lib.rs| 1 + 3 files changed, 250 insertions(+) creat

[pve-devel] [PATCH installer v6 33/36] auto-installer: utils: define ISO specified settings

2024-04-17 Thread Aaron Lauterer
These will be expected on the ISO itself and define the behavior of the automated installation. Signed-off-by: Aaron Lauterer --- proxmox-auto-installer/src/utils.rs | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/proxmox-auto-installer/src/utils.rs b/pr

[pve-devel] [PATCH installer v6 14/36] auto-installer: add auto-installer binary

2024-04-17 Thread Aaron Lauterer
It expects the contents of an answer file via stdin. It will then be parsed and the JSON for the low level installer is generated. It then calls the low level installer directly. The output of the installaton progress is kept rather simple for now. If configured in the answer file, commands will

[pve-devel] [PATCH installer v6 28/36] common: add deserializer for FsType

2024-04-17 Thread Aaron Lauterer
Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- proxmox-installer-common/Cargo.toml | 1 + proxmox-installer-common/src/options.rs | 10 ++--- proxmox-installer-common/src/setup.rs | 30 ++--- 3 files changed, 35 insertion

[pve-devel] [PATCH installer v6 22/36] auto-installer: helper: add subcommand to view indentifiers

2024-04-17 Thread Aaron Lauterer
It will collect the information from the current system and show the payload of identifiers that will be send. To avoid confusion, the subcommands for the device info and filter matching have been renamed. Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --

[pve-devel] [PATCH installer v6 21/36] auto-installer: fetch: add gathering of system identifiers and restructure code

2024-04-17 Thread Aaron Lauterer
They will be used as payload when POSTing a request for an answer file. The idea is, that with this information, it should be possible to identify the system and generate a matching answer file on the fly. Many of these properties can also be found on the machine or packaging of the machine and cou

[pve-devel] [PATCH installer v6 11/36] auto-installer: add utils

2024-04-17 Thread Aaron Lauterer
contains several utility structs and functions. For example: a simple pattern matcher that matches wildcards at the beginning or end of the filter. It currently uses a dedicated function (parse_answer) to generate the InstallConfig struct instead of a From implementation. This is because for now

Re: [pve-devel] [PATCH installer v5 00/36] add automated/unattended installation

2024-04-17 Thread Aaron Lauterer
a new v6 has been posted that includes the t-b and r-b tags as well as some smaller style fixes in the most recent patches https://lists.proxmox.com/pipermail/pve-devel/2024-April/063139.html On 2024-04-16 17:32, Aaron Lauterer wrote: patches until 31 got a [0,1] Tested-by: Christoph Heiss

[pve-devel] [PATCH installer v6 13/36] auto-installer: add tests for answer file parsing

2024-04-17 Thread Aaron Lauterer
By matching the resulting json to be passed to the low level installer against known good ones. The environment info was gathered from one of our AMD Epyc Rome test servers to have a realistic starting point. Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer

Re: [pve-devel] [PATCH manager 4/4] ui: enable upload/download buttons for 'import' type storages

2024-04-17 Thread Fabian Grünbichler
On April 16, 2024 3:19 pm, Dominik Csapak wrote: > but only for non esxi ones, since that does not allow > uploading/downloading there what about a remove button? :) > > Signed-off-by: Dominik Csapak > --- > www/manager6/storage/Browser.js| 7 ++- > www/manager6/window/UploadToStor

[pve-devel] [PATCH installer v6 31/36] auto-installer: answer: deny unknown fields

2024-04-17 Thread Aaron Lauterer
This way, serde will throw errors if fields are not known. This can help to reduce frustration if one might think to have set an option, but for example a small type has happened. Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- proxmox-auto-installer/

[pve-devel] [PATCH installer v6 26/36] auto installer: factor out fetch-answer and autoinst-helper

2024-04-17 Thread Aaron Lauterer
Putting proxmox-fetch-answer into it's own crate, will keep the use of OpenSSL localized to where we need it. Otherwise building other binaries will always depend on OpenSSL as well, even without actually needing it. Having a dedicated crate for the proxmox-autoinst-helper should make it easier to

[pve-devel] [PATCH installer v6 30/36] add proxmox-chroot utility

2024-04-17 Thread Aaron Lauterer
it is meant as a helper utility to prepare an installation for chroot and clean up afterwards It tries to determine the used FS from the previous installation, will do what is necessary to mount/import the root FS to /target. It then will set up all bind mounts. Tested-by: Christoph Heiss Review

Re: [pve-devel] [PATCH storage 2/9] plugin: dir: implement import content type

2024-04-17 Thread Fabian Grünbichler
On April 16, 2024 3:18 pm, Dominik Csapak wrote: > in DirPlugin and not Plugin (because of cyclic dependency of > Plugin -> OVF -> Storage -> Plugin otherwise) > > only ovf is currently supported (though ova will be shown in import > listing), expects the files to not be in a subdir, and adjacent

Re: [pve-devel] [PATCH storage 3/9] plugin: dir: handle ova files for import

2024-04-17 Thread Fabian Grünbichler
On April 16, 2024 3:18 pm, Dominik Csapak wrote: > since we want to handle ova files (which are only ovf+vmdks bundled in a > tar file) for import, add code that handles that. > > we introduce a valid volname for files contained in ovas like this: > > storage:import/archive.ova/disk-1.vmdk > >

Re: [pve-devel] [PATCH storage 3/9] plugin: dir: handle ova files for import

2024-04-17 Thread Dominik Csapak
On 4/17/24 12:52, Fiona Ebner wrote: Am 16.04.24 um 15:18 schrieb Dominik Csapak: since we want to handle ova files (which are only ovf+vmdks bundled in a tar file) for import, add code that handles that. we introduce a valid volname for files contained in ovas like this: storage:import/arch

Re: [pve-devel] [PATCH storage 3/9] plugin: dir: handle ova files for import

2024-04-17 Thread Dominik Csapak
On 4/17/24 14:45, Fabian Grünbichler wrote: On April 16, 2024 3:18 pm, Dominik Csapak wrote: since we want to handle ova files (which are only ovf+vmdks bundled in a tar file) for import, add code that handles that. we introduce a valid volname for files contained in ovas like this: storage:

Re: [pve-devel] [PATCH storage/qemu-server/pve-manager] implement ova/ovf import for directory type storages

2024-04-17 Thread Fabian Grünbichler
On April 16, 2024 3:18 pm, Dominik Csapak wrote: > This series enables importing ova/ovf from directory based storages, > inclusive upload/download via the webui (ova only). > > It also improves the ovf importer by parsing the ostype, nics, bootorder > (and firmware from vmware exported files). >

Re: [pve-devel] [PATCH storage 2/9] plugin: dir: implement import content type

2024-04-17 Thread Dominik Csapak
On 4/17/24 12:07, Fiona Ebner wrote: Am 16.04.24 um 15:18 schrieb Dominik Csapak: in DirPlugin and not Plugin (because of cyclic dependency of Plugin -> OVF -> Storage -> Plugin otherwise) only ovf is currently supported (though ova will be shown in import listing), expects the files to not be

Re: [pve-devel] [PATCH storage 4/9] ovf: implement parsing the ostype

2024-04-17 Thread Dominik Csapak
On 4/17/24 13:32, Fiona Ebner wrote: Am 16.04.24 um 15:18 schrieb Dominik Csapak: use the standards info about the ostypes to map to our own (see comment for link to the relevant part of the dmtf schema) every type that is not listed we map to 'other', so no need to have it in a list. Signed-o

Re: [pve-devel] [PATCH storage 6/9] ovf: implement rudimentary boot order

2024-04-17 Thread Dominik Csapak
On 4/17/24 13:54, Fiona Ebner wrote: Am 16.04.24 um 15:18 schrieb Dominik Csapak: simply add all parsed disks to the boot order in the order we encounter them (similar to the esxi plugin). Signed-off-by: Dominik Csapak --- src/PVE/Storage/OVF.pm| 6 ++ src/test/run_ovf_tests.pl | 3

Re: [pve-devel] [PATCH storage 7/9] ovf: implement parsing nics

2024-04-17 Thread Dominik Csapak
On 4/17/24 14:09, Fiona Ebner wrote: Am 16.04.24 um 15:19 schrieb Dominik Csapak: by iterating over the relevant parts and trying to parse out the 'ResourceSubType'. The content of that is not standardized, but I only ever found examples that are compatible with vmware, meaning it's either 'e100

Re: [pve-devel] [PATCH storage/qemu-server/pve-manager] implement ova/ovf import for directory type storages

2024-04-17 Thread Dominik Csapak
On 4/17/24 15:11, Fabian Grünbichler wrote: On April 16, 2024 3:18 pm, Dominik Csapak wrote: This series enables importing ova/ovf from directory based storages, inclusive upload/download via the webui (ova only). It also improves the ovf importer by parsing the ostype, nics, bootorder (and fir

Re: [pve-devel] [PATCH storage 3/9] plugin: dir: handle ova files for import

2024-04-17 Thread Fabian Grünbichler
On April 17, 2024 3:07 pm, Dominik Csapak wrote: > On 4/17/24 12:52, Fiona Ebner wrote: >> Am 16.04.24 um 15:18 schrieb Dominik Csapak: >>> since we want to handle ova files (which are only ovf+vmdks bundled in a >>> tar file) for import, add code that handles that. >>> >>> we introduce a valid vol

[pve-devel] applied: [PATCH pve-flutter-frontend] node overview: power menu: reorder/reword confirm buttons

2024-04-17 Thread Thomas Lamprecht
Am 17/04/2024 um 10:53 schrieb Dominik Csapak: > move the confirm action to the right as mentioned in the material spec[0] > also rewords the buttons to 'cancel' and 'shutdown/reboot' > for that to work properly slightly rename the confirm message > > 0: > https://m3.material.io/components/dialog

Re: [pve-devel] [PATCH storage 3/9] plugin: dir: handle ova files for import

2024-04-17 Thread Fabian Grünbichler
On April 17, 2024 3:10 pm, Dominik Csapak wrote: > On 4/17/24 14:45, Fabian Grünbichler wrote: >> On April 16, 2024 3:18 pm, Dominik Csapak wrote: >>> +sub cleanup_extracted_image { >> >> same for this? >> >>> +my ($source) = @_; >>> + >>> +if ($source =~ m|^(/.+/\.tmp_[0-9]+_[0-9]+)/[^/]

[pve-devel] [PATCH proxmox-firewall v2 01/39] config: add proxmox-ve-config crate

2024-04-17 Thread Stefan Hanreich
Reviewed-by: Lukas Wagner Reviewed-by: Max Carrara Co-authored-by: Wolfgang Bumiller Signed-off-by: Stefan Hanreich --- .cargo/config| 5 + .gitignore | 6 ++ Cargo.toml | 4 proxmox-ve-config/Cargo.toml | 19 ++

[pve-devel] [PATCH proxmox-firewall v2 04/39] config: firewall: add types for log level and rate limit

2024-04-17 Thread Stefan Hanreich
Adds types for log and (log-)rate-limiting firewall config options as well as FromStr implementations for parsing them from the config. Reviewed-by: Lukas Wagner Reviewed-by: Max Carrara Co-authored-by: Wolfgang Bumiller Signed-off-by: Stefan Hanreich --- proxmox-ve-config/Cargo.toml

[pve-devel] [PATCH proxmox-firewall v2 10/39] config: firewall: add types for security groups

2024-04-17 Thread Stefan Hanreich
Reviewed-by: Lukas Wagner Reviewed-by: Max Carrara Co-authored-by: Wolfgang Bumiller Signed-off-by: Stefan Hanreich --- proxmox-ve-config/src/firewall/types/group.rs | 36 +++ proxmox-ve-config/src/firewall/types/mod.rs | 2 ++ 2 files changed, 38 insertions(+) create mode

[pve-devel] [PATCH proxmox-firewall v2 03/39] config: firewall: add types for ports

2024-04-17 Thread Stefan Hanreich
Adds types for all kinds of port-related values in the firewall config as well as FromStr implementations for parsing them from the config. Also adds a helper for parsing the named ports from `/etc/services`. Reviewed-by: Lukas Wagner Reviewed-by: Max Carrara Co-authored-by: Wolfgang Bumiller

[pve-devel] [PATCH container/docs/firewall/manager/proxmox-firewall/qemu-server v2 00/39] proxmox firewall nftables implementation

2024-04-17 Thread Stefan Hanreich
## Introduction This RFC provides a drop-in replacement for the current pve-firewall package that is based on Rust and nftables. It consists of three crates: * proxmox-ve-config for parsing firewall and guest configuration files, as well as some helpers to access host configuration (particular

[pve-devel] [PATCH proxmox-firewall v2 18/39] nftables: add helpers

2024-04-17 Thread Stefan Hanreich
Several objects, statements and expressions in nftables-json require null values, for instance: { "flush": { "ruleset": null }} For this purpose we define our own Null type, which we can then easily use for defining types that accept Null as value. Several keys accept as value either a singu

[pve-devel] [PATCH proxmox-firewall v2 06/39] config: host: add helpers for host network configuration

2024-04-17 Thread Stefan Hanreich
Currently the helpers for obtaining the host network configuration panic on error, which could be avoided by the use of OnceLock::get_or_init, but this method is currently only available in nightly versions. Generally, if there is a problem with obtaining the network config for the node I would de

[pve-devel] [PATCH proxmox-firewall v2 05/39] config: firewall: add types for aliases

2024-04-17 Thread Stefan Hanreich
Reviewed-by: Lukas Wagner Reviewed-by: Max Carrara Co-authored-by: Wolfgang Bumiller Signed-off-by: Stefan Hanreich --- proxmox-ve-config/src/firewall/parse.rs | 52 ++ proxmox-ve-config/src/firewall/types/alias.rs | 160 ++ proxmox-ve-config/src/firewall/types/mod.r

[pve-devel] [PATCH proxmox-firewall v2 02/39] config: firewall: add types for ip addresses

2024-04-17 Thread Stefan Hanreich
Includes types for all kinds of IP values that can occur in the firewall config. Additionally, FromStr implementations are available for parsing from the config files. Reviewed-by: Lukas Wagner Reviewed-by: Max Carrara Co-authored-by: Wolfgang Bumiller Signed-off-by: Stefan Hanreich --- proxm

[pve-devel] [PATCH proxmox-firewall v2 32/39] firewall: add proxmox-firewall binary

2024-04-17 Thread Stefan Hanreich
Reviewed-by: Lukas Wagner Reviewed-by: Max Carrara Co-authored-by: Wolfgang Bumiller Signed-off-by: Stefan Hanreich --- proxmox-firewall/src/main.rs | 34 ++ 1 file changed, 34 insertions(+) diff --git a/proxmox-firewall/src/main.rs b/proxmox-firewall/src/main.

[pve-devel] [PATCH proxmox-firewall v2 21/39] nftables: statement: add types

2024-04-17 Thread Stefan Hanreich
Adds an enum containing most of the statements defined in the nftables-json schema [1]. [1] https://manpages.debian.org/bookworm/libnftables1/libnftables-json.5.en.html#STATEMENTS Reviewed-by: Lukas Wagner Reviewed-by: Max Carrara Co-authored-by: Wolfgang Bumiller Signed-off-by: Stefan Hanrei

[pve-devel] [PATCH proxmox-firewall v2 30/39] firewall: add object generation logic

2024-04-17 Thread Stefan Hanreich
ToNftObjects is basically a conversion trait that converts firewall config structs into nftables objects. It returns a list of commands that create the respective nftables objects. Reviewed-by: Lukas Wagner Reviewed-by: Max Carrara Co-authored-by: Wolfgang Bumiller Signed-off-by: Stefan Hanreic

[pve-devel] [PATCH proxmox-firewall v2 25/39] nftables: add libnftables bindings

2024-04-17 Thread Stefan Hanreich
Add a thin wrapper around libnftables, which can be used to run commands defined by the rust types. Reviewed-by: Lukas Wagner Reviewed-by: Max Carrara Co-authored-by: Wolfgang Bumiller Signed-off-by: Stefan Hanreich --- proxmox-nftables/src/context.rs | 243 p

[pve-devel] [PATCH pve-manager v2 38/39] firewall: expose configuration option for new nftables firewall

2024-04-17 Thread Stefan Hanreich
Signed-off-by: Stefan Hanreich --- www/manager6/grid/FirewallOptions.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/manager6/grid/FirewallOptions.js b/www/manager6/grid/FirewallOptions.js index 0ac9979c4..6aacb47be 100644 --- a/www/manager6/grid/FirewallOptions.js +++ b/www/manager6/

[pve-devel] [PATCH pve-firewall v2 37/39] add configuration option for new nftables firewall

2024-04-17 Thread Stefan Hanreich
Introduces new nftables configuration option that en/disables the new nftables firewall. pve-firewall reads this option and only generates iptables rules when nftables is set to `0`. Conversely proxmox-firewall only generates nftables rules when the option is set to `1`. Signed-off-by: Stefan Han

[pve-devel] [PATCH proxmox-firewall v2 31/39] firewall: add ruleset generation logic

2024-04-17 Thread Stefan Hanreich
We create the rules from the firewall config by utilizing the ToNftRules and ToNftObjects traits to convert the firewall config structs to nftables objects/chains/rules. Reviewed-by: Lukas Wagner Reviewed-by: Max Carrara Co-authored-by: Wolfgang Bumiller Signed-off-by: Stefan Hanreich --- pro

[pve-devel] [PATCH proxmox-firewall v2 27/39] firewall: add base ruleset

2024-04-17 Thread Stefan Hanreich
This is the skeleton for the firewall that contains all the base chains required for the firewall. The file applies atomically, which means that it flushes all objects and recreates them - except for the cluster/host/guest chain. This means that it can be run at any point in time, since it only up

[pve-devel] [PATCH proxmox-firewall v2 17/39] nftables: add crate for libnftables bindings

2024-04-17 Thread Stefan Hanreich
Reviewed-by: Lukas Wagner Reviewed-by: Max Carrara Co-authored-by: Wolfgang Bumiller Signed-off-by: Stefan Hanreich --- Cargo.toml | 1 + proxmox-nftables/Cargo.toml | 16 proxmox-nftables/src/lib.rs | 0 3 files changed, 17 insertions(+) create mode 100644

[pve-devel] [PATCH proxmox-firewall v2 12/39] config: firewall: add cluster-specific config + option types

2024-04-17 Thread Stefan Hanreich
Reviewed-by: Lukas Wagner Reviewed-by: Max Carrara Co-authored-by: Wolfgang Bumiller Signed-off-by: Stefan Hanreich --- proxmox-ve-config/src/firewall/cluster.rs | 374 ++ proxmox-ve-config/src/firewall/mod.rs | 1 + 2 files changed, 375 insertions(+) create mode 100

  1   2   >