[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

[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

[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

[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

[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

[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

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

2024-04-17 Thread Aaron Lauterer
/062634.html [1] https://lists.proxmox.com/pipermail/pve-devel/2024-April/062690.html Aaron Lauterer (36): tui: common: move InstallConfig struct to common crate common: make InstallZfsOption members public common: tui: use BTreeMap for predictable ordering common: utils: add deserialize

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

2024-04-17 Thread Aaron Lauterer
lization If we need it in the future, we need to think about how to handle the deserialization. Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- proxmox-installer-common/src/setup.rs | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --

[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

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

2024-04-17 Thread Aaron Lauterer
-off-by: Aaron Lauterer --- proxmox-auto-installer/Cargo.toml | 6 ++ .../src/fetch_plugins/utils/mod.rs| 1 + .../src/fetch_plugins/utils/post.rs | 94 +++ 3 files changed, 101 insertions(+) create mode 100644 proxmox-auto-installer/src

[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

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

2024-04-17 Thread Aaron Lauterer
ion is not possible anymore. If one wants to provide it right away (besides DHCP or DNS), it must be incluced in the ISO itself. This reduced the need for another USB flash drive. Signed-off-by: Aaron Lauterer --- proxmox-fetch-answer/Cargo.toml | 1 + .../src/fetch_plugi

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

2024-04-17 Thread Aaron Lauterer
additional information. This should help to distinct between the different options that were chosen to create it. The code for parsing an answer file is moved to its own function. Signed-off-by: Aaron Lauterer --- proxmox-autoinst-helper/Cargo.toml | 1 + proxmox-autoinst-helper/src/main.rs

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

2024-04-17 Thread Aaron Lauterer
mox-auto-installer' and pipe in the contents via stdin. Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- Makefile | 4 +- .../src/bin/proxmox-fetch-answer.rs | 71 .../src/fetch_plugins

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

2024-04-17 Thread Aaron Lauterer
by the low-level installer. It instead fetches the list of disks and NICs by itself. The rules when a device is ignored, should match how the low-level installer handles it. Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- Makefile

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

2024-04-17 Thread Aaron Lauterer
: Aaron Lauterer --- .../src/bin/proxmox-fetch-answer.rs | 11 +- .../src/fetch_plugins/http.rs | 190 ++ .../src/fetch_plugins/mod.rs | 1 + unconfigured.sh | 9 + 4 files changed, 208 insertions(+), 3

[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

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

2024-04-17 Thread Aaron Lauterer
Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- proxmox-installer-common/src/setup.rs | 86 +++- proxmox-tui-installer/src/setup.rs| 98 +-- .../src/views/install_progress.rs | 4 +- 3 files changed, 90 insertions(+), 98

[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

[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

[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

[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

[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

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

2024-04-17 Thread Aaron Lauterer
be run pre and post the low level installer. It also logs everything to the logfile, currently '/tmp/auto_installer.log'. Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- Makefile | 9 +- .../src/bin/pr

[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

[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
more than a simple utils.rs module in the fetch plugins, it, and the additional fetch plugin utilities are placed in their own directory. Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- .../src/fetch_plugins/mod.rs | 2

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

2024-04-17 Thread Aaron Lauterer
the source data is spread over several other structs in comparison to one in the TUI installer. Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- proxmox-auto-installer/src/lib.rs | 1 + proxmox-auto-installer/src/utils.rs | 424

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

[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
y are kept in the proxmox-auto-installer crate. Tested-by: Christoph Heiss Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- Cargo.toml| 2 ++ Makefile | 5 +++- proxmox-auto-installer/Cargo.toml

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

2024-04-17 Thread Aaron Lauterer
Reviewed-by: Christoph Heiss Signed-off-by: Aaron Lauterer --- Cargo.toml | 1 + Makefile | 5 +- proxmox-chroot/Cargo.toml | 16 ++ proxmox-chroot/src/main.rs | 356 + 4 files changed, 377 insertions(+), 1 deletion(-) create

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

2024-04-18 Thread Aaron Lauterer
On 2024-04-18 10:48, Christoph Heiss wrote: Just quick three notes inline; nits other than the crate thing. Did not review in depth, LGTM overall tho. On Wed, Apr 17, 2024 at 02:31:08PM +0200, Aaron Lauterer wrote: [..] diff --git a/proxmox-autoinst-helper/Cargo.toml b/proxmox-autoinst

Re: [pve-devel] [PATCH manager 6/7] report: add info about (un)used memory slots

2024-04-18 Thread Aaron Lauterer
I am not sure how often we actually need that information as it can add quite a bit of additional lines in the report in larger machines with many memory slots. It might be better to keep that command in a cheatsheet to ask for it if actually needed instead of polluting the report :) On 202

Re: [pve-devel] [PATCH manager 1/7] report: add kernel command line from current boot

2024-04-18 Thread Aaron Lauterer
gave the series a test by creating a system report on my local machine. looks good and contains usefull additional information. The only thing I am not so sure about, is the memory dimm info (patch 6). Reviewed-By: Aaron Lauterer Tested-By: Aaron Lauterer On 2024-04-18 11:16, Alexander

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

2024-04-18 Thread Aaron Lauterer
additional information. This should help to distinct between the different options that were chosen to create it. The code for parsing an answer file is moved to its own function. Signed-off-by: Aaron Lauterer --- changes: incorporated feedback from @cheiss (thx!) * reorder parameter condition

[pve-devel] [PATCH docs] installation: add section about unattended/automatic installation

2024-04-18 Thread Aaron Lauterer
Mention and briefly explain it. The main part of the documentation will live in the Wiki for now as it applies to not just Proxmox VE. Signed-off-by: Aaron Lauterer --- pve-installation.adoc | 18 ++ 1 file changed, 18 insertions(+) diff --git a/pve-installation.adoc b/pve

Re: [pve-devel] [RFC PATCH docs-common 01/13] installation-media: move page from pve-docs here

2024-04-19 Thread Aaron Lauterer
On 2024-04-19 11:05, Christoph Heiss wrote: Small adaptions were necessary; mostly a s/{pve}/{product}/g and replacing the ISO URL with the {iso-url} variable. except there are still plenty of `{pve}`s in there? another thing looking at this patch, how do we handle product specifics? havi

[pve-devel] [PATCH manager] ui: osd: warn if removal could be problematic

2022-02-04 Thread Aaron Lauterer
If an OSD is removed during the wrong conditions, it could lead to blocked IO or worst case data loss. Check against global flags that limit the capabilities of Ceph to heal itself (norebalance, norecover, noout) and if there are degraded objects. Signed-off-by: Aaron Lauterer --- Those are

Re: [pve-devel] [PATCH v2 manager] ui: vm network: allow to override MTU for virtio devices

2022-02-10 Thread Aaron Lauterer
return gettext("must be between 0 and 65520"); + } + }, allowBlank: true, }, ]; Besides this last improvement: Reviewed-By: Aaron Lauterer Tested-By: Aaron Lauterer On 2/10/22 12:28, Oguz Bektas wrote: we already have the 'mtu' option inside

Re: [pve-devel] [PATCH v2 manager] ui: vm network: allow to override MTU for virtio devices

2022-02-10 Thread Aaron Lauterer
On 2/10/22 14:53, Aaron Lauterer wrote: Looks good AFAICT and does what we want. We could improve it further by adding a small validator. Otherwise the user will only notice their error once they get the error msg from the API. A quick way that I came up with that could potentially be done

Re: [pve-devel] [PATCH v2 manager] ui: vm network: allow to override MTU for virtio devices

2022-02-10 Thread Aaron Lauterer
On 2/10/22 15:08, Oguz Bektas wrote: thanks for the test and review! instead of a validator function i guess we could just set minValue and maxValue as well? (since allowBlank is set to true) seemed to work fine in my short testing just now :) diff --git a/www/manager6/qemu/NetworkEdit.js

[pve-devel] [PATCH librados2-perl 1/6] mon_command: free outs buffer

2022-02-18 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer --- thanks @Dominik who realized that we did not free this buffer in all situations. RADOS.xs | 4 1 file changed, 4 insertions(+) diff --git a/RADOS.xs b/RADOS.xs index 7eca024..1eb0b5a 100644 --- a/RADOS.xs +++ b/RADOS.xs @@ -145,6 +145,10 @@ CODE

[pve-devel] [PATCH manager 3/6] api: osd: force mon_command to scalar context

2022-02-18 Thread Aaron Lauterer
With the changes in librados2-perl, we need to make sure to call it in scalar context. Signed-off-by: Aaron Lauterer --- This needs to be released in combination with the previous changes (2/6) in librados2-perl to not break OSD removal! PVE/API2/Ceph/OSD.pm | 2 +- 1 file changed, 1 insertion

[pve-devel] [PATCH manager 5/6] ui: osd: warn if removal could be problematic

2022-02-18 Thread Aaron Lauterer
' API endpoint will not help here as it only works as long as the OSD is still running. By the time the destroy button is enabled, the OSD needs to be stopped. Signed-off-by: Aaron Lauterer --- After the short discussion on the previous version [0] and the hints to ok-to-stop & safe-to-dest

[pve-devel] [PATCH manager 6/6] ui: osd: mon: mds: warn if stop/destroy actions are problematic

2022-02-18 Thread Aaron Lauterer
Doing so after a few seconds should show the warning though. Signed-off-by: Aaron Lauterer --- www/manager6/ceph/OSD.js | 66 -- www/manager6/ceph/ServiceList.js | 94 +++- 2 files changed, 130 insertions(+), 30 deletions(-) diff --git a/ww

[pve-devel] [PATCH librados2-perl 2/6] mon_command: optionally ignore errors and return hashmap

2022-02-18 Thread Aaron Lauterer
ter needs to be passed to the child process, which causes some changes there and the resulting hashmaps gets JSON encoded to be passed back up to the parent process. Signed-off-by: Aaron Lauterer --- This patch requires patch 3 of the series to not break OSD removal! Therefore releasing a new vers

[pve-devel] [PATCH librados2-perl manager 0/6] Add Ceph safety checks

2022-02-18 Thread Aaron Lauterer
explanation in the status message. Therefore, when querying such data, we do not want to die when we receive a non-zero return value but return everything we got, return value, status message and data to then present that to the user. librados2-perl: Aaron Lauterer (2): mon_command: free outs buffer

[pve-devel] [PATCH manager 4/6] api: mon: mds: osd: add safety check endpoints

2022-02-18 Thread Aaron Lauterer
for mon, mds and osd: ok-to-stop mon: ok-to-rm osd: safe-to-destroy Signed-off-by: Aaron Lauterer --- I added the OSD safe-to-destroy endpoint even though I have no immediate use for it as of now. But plan to include it in the OSD panel once I have an idea how to do so in a sensible manner

Re: [pve-devel] [PATCH librados2-perl 2/6] mon_command: optionally ignore errors and return hashmap

2022-02-22 Thread Aaron Lauterer
On 2/21/22 16:44, Thomas Lamprecht wrote: On 18.02.22 12:38, Aaron Lauterer wrote: This patch requires patch 3 of the series to not break OSD removal! Therefore releasing a new version of librados2-perl and pve-manager needs to be coordinated. I don't like that and think it can be av

[pve-devel] [PATCH manager] ui: osd: send in/out cmd to currently used node

2022-03-02 Thread Aaron Lauterer
eady stressful situation. Signed-off-by: Aaron Lauterer --- www/manager6/ceph/OSD.js | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/www/manager6/ceph/OSD.js b/www/manager6/ceph/OSD.js index e126f8d0..78f226ff 100644 --- a/www/manager6/ceph/OSD.js +++ b/www/manager6/ceph/OS

Re: [pve-devel] [PATCH v2 manager 1/3] ui: lxc/qemu: add disk reassign

2022-03-04 Thread Aaron Lauterer
On 2/21/22 16:44, Dominik Csapak wrote: sorry for the late review some comments inline On 11/15/21 16:02, Aaron Lauterer wrote: [...] diff --git a/www/manager6/lxc/Resources.js b/www/manager6/lxc/Resources.js index 15ee3c67..bec7cf14 100644 --- a/www/manager6/lxc/Resources.js +++ b/www

[pve-devel] [PATCH v3 manager 0/4] ui: lxc/qemu: add reassign for disks and volumes

2022-03-07 Thread Aaron Lauterer
f list, mainly * using more modern approaches * more arrow functions * reducing use of predefined cbind values and using inline functions when possible Aaron Lauterer (4): ui: lxc/qemu: add disk reassign and action submenu ui: lxc/qemu: disk/volume action simplify menu items ui: BusTypeSelector:

[pve-devel] [PATCH v3 manager 2/4] ui: lxc/qemu: disk/volume action simplify menu items

2022-03-07 Thread Aaron Lauterer
We already know that we are acting upon a disk / volume due to the submenu we are in. Signed-off-by: Aaron Lauterer --- www/manager6/lxc/Resources.js | 6 +++--- www/manager6/qemu/HardwareView.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/www/manager6/lxc

[pve-devel] [PATCH v3 manager 3/4] ui: BusTypeSelector: change noVirtIO to withVirtIO

2022-03-07 Thread Aaron Lauterer
Double negated properties make it harder than necessary to parse conditions. Signed-off-by: Aaron Lauterer --- www/manager6/form/BusTypeSelector.js| 4 ++-- www/manager6/form/ControllerSelector.js | 4 ++-- www/manager6/qemu/CDEdit.js | 2 +- www/manager6/qemu/CIDriveEdit.js

[pve-devel] [PATCH v3 manager 4/4] ui: hdmove: modernize/refactor

2022-03-07 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer --- changes since v2: * switch from generic window to proxmox edit v1: much of the feedback to the HDReassign.js from the first patch has been incorporated here as well. * reducing predefined cbind values for more arrow functions * using more arrow functions in

[pve-devel] [PATCH v3 manager 1/4] ui: lxc/qemu: add disk reassign and action submenu

2022-03-07 Thread Aaron Lauterer
For the new HDReassign component, we follow the approach of HDMove to have one componend for qemu and lxc. To avoid button clutter, a new "Disk/Volume action" button is introduced. It holds the Move, Reassign and Resize buttons in a submenu. Signed-off-by: Aaron Lauterer --- changes

Re: [pve-devel] [PATCH v3 manager 1/4] ui: lxc/qemu: add disk reassign and action submenu

2022-03-11 Thread Aaron Lauterer
On 3/10/22 11:49, Fabian Ebner wrote: Am 07.03.22 um 11:07 schrieb Aaron Lauterer: For the new HDReassign component, we follow the approach of HDMove to have one componend for qemu and lxc. To avoid button clutter, a new "Disk/Volume action" button is introduced. It holds the Move

Re: [pve-devel] [PATCH v3 manager 1/4] ui: lxc/qemu: add disk reassign and action submenu

2022-03-14 Thread Aaron Lauterer
On 3/14/22 09:18, Fabian Ebner wrote: Am 11.03.22 um 15:38 schrieb Aaron Lauterer: On 3/10/22 11:49, Fabian Ebner wrote: Am 07.03.22 um 11:07 schrieb Aaron Lauterer: +    cbindData: function() { +    let me = this; +    return { +    vmid: me.vmid, +    disk: me.disk

[pve-devel] [PATCH v4 manager 3/6] ui: lxc/qemu: disk/volume action simplify menu items

2022-03-14 Thread Aaron Lauterer
We already know that we are acting upon a disk / volume due to the submenu we are in. Signed-off-by: Aaron Lauterer --- www/manager6/lxc/Resources.js | 6 +++--- www/manager6/qemu/HardwareView.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/www/manager6/lxc

[pve-devel] [PATCH v4 manager 1/6] ui: utils: add nextFreeMP

2022-03-14 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer --- www/manager6/Utils.js | 17 + 1 file changed, 17 insertions(+) diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index aafe359a..5190f750 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -1803,6 +1803,23 @@ Ext.define

[pve-devel] [PATCH v4 manager 0/6] ui: lxc/qemu: add reassign for disks and volumes

2022-03-14 Thread Aaron Lauterer
orporated feedback I got off list, mainly * using more modern approaches * more arrow functions * reducing use of predefined cbind values and using inline functions when possible Aaron Lauterer (6): ui: utils: add nextFreeMP ui: lxc/qemu: add disk reassign and action submenu ui:

[pve-devel] [PATCH v4 manager 2/6] ui: lxc/qemu: add disk reassign and action submenu

2022-03-14 Thread Aaron Lauterer
For the new HDReassign component, we follow the approach of HDMove to have one componend for qemu and lxc. To avoid button clutter, a new "Disk/Volume action" button is introduced. It holds the Move, Reassign and Resize buttons in a submenu. Signed-off-by: Aaron Lauterer --- change

[pve-devel] [PATCH v4 manager 4/6] ui: BusTypeSelector: change noVirtIO to withVirtIO

2022-03-14 Thread Aaron Lauterer
Double negated properties make it harder than necessary to parse conditions. Signed-off-by: Aaron Lauterer Reviewed-by: Fabian Ebner --- www/manager6/form/BusTypeSelector.js| 4 ++-- www/manager6/form/ControllerSelector.js | 4 ++-- www/manager6/qemu/CDEdit.js | 2 +- www

[pve-devel] [PATCH v4 manager 6/6] ui: util: refactor mps to mp

2022-03-14 Thread Aaron Lauterer
Using the actual config key instead of the pluralization, makes it easier in the situations where we need to match against it. Signed-off-by: Aaron Lauterer --- www/manager6/Utils.js | 8 +++- www/manager6/lxc/MPEdit.js | 2 +- www/manager6/lxc/MultiMPEdit.js | 4 ++-- www

[pve-devel] [PATCH v4 manager 5/6] ui: hdmove: modernize/refactor

2022-03-14 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer --- changes since v3: * code cleanup * fix padding * create 'url' in one place, no need for submitURL v2: * switch from generic window to proxmox edit v1: much of the feedback to the HDReassign.js from the first patch has been incorporated here as w

Re: [pve-devel] [PATCH manager 4/6] api: mon: mds: osd: add safety check endpoints

2022-03-14 Thread Aaron Lauterer
On 2/22/22 09:44, Thomas Lamprecht wrote: On 18.02.22 12:38, Aaron Lauterer wrote: [...] In general I see lots of repetition, and in this case I'd rather have a single enpoint that accepts one (or maybe better a list of) service-type(s), and an action (stop/destroy) let's enc

Re: [pve-devel] [PATCH v4 manager 6/6] ui: util: refactor mps to mp

2022-03-24 Thread Aaron Lauterer
On 3/22/22 12:18, Fabian Ebner wrote: Am 14.03.22 um 10:35 schrieb Aaron Lauterer: @@ -1805,9 +1805,7 @@ Ext.define('PVE.Utils', { }, nextFreeMP: function(type, config) { - let mptype = type === "mp" ? "mps" : type; - - for (let

Re: [pve-devel] [PATCH v4 manager 2/6] ui: lxc/qemu: add disk reassign and action submenu

2022-03-24 Thread Aaron Lauterer
Thanks for the nits. Especially regarding the button (de)activation logic. I can send a follow-up patch or a new version of the whole series, or just this patch. Whatever is preferred :) On 3/22/22 12:18, Fabian Ebner wrote: Am 14.03.22 um 10:35 schrieb Aaron Lauterer: @@ -227,14 +246,34

[pve-devel] [PATCH v2 manager 6/7] ui: osd: warn if removal could be problematic

2022-03-25 Thread Aaron Lauterer
; Ceph API endpoint will not help here as it only works as long as the OSD is still running. By the time the destroy button is enabled, the OSD will already be stopped. Signed-off-by: Aaron Lauterer --- changes: * incorporated most nits * did not "improve" deconstruction of API call resul

[pve-devel] [PATCH v2 manager 7/7] ui: osd: mon: mds: warn if stop/destroy actions are problematic

2022-03-25 Thread Aaron Lauterer
Doing so after a few seconds should show the warning though. Signed-off-by: Aaron Lauterer --- changes: * adapted to changed API endpoint www/manager6/ceph/OSD.js | 71 - www/manager6/ceph/ServiceList.js | 104 +++ 2 files changed, 145 in

[pve-devel] [PATCH v2 manager 5/7] api: ceph: add cmd-safety endpoint

2022-03-25 Thread Aaron Lauterer
port back that it is safe to stop/destroy if the service does not exist. Signed-off-by: Aaron Lauterer --- changes: * remove repetitive endpoints for each service type in favor for a central one PVE/API2/Ceph.pm | 96 1 file changed, 96 inserti

[pve-devel] [PATCH v2 manager 4/7] ceph: adapt to changed rados mon_command return values

2022-03-25 Thread Aaron Lauterer
The mon_command now returns a hash ref but current calls are only interested in the 'data'. Signed-off-by: Aaron Lauterer --- Needs to be coordinated with librados2-perl changes from patch 1 PVE/API2/Ceph.pm | 6 +++--- PVE/API2/Ceph/MGR.pm | 2 +- PVE/API2/Ceph/MON.p

[pve-devel] [PATCH v2 librados2-perl 2/7] mon_command: optionally ignore errors

2022-03-25 Thread Aaron Lauterer
In some situations we do not want to abort if the Ceph API returns an error. For example if we run the 'osd ok-to-stop' or similar calls, we are interested in the status message in the error case. Signed-off-by: Aaron Lauterer --- I split the adding of "noerr" into a separate

[pve-devel] [PATCH v2 storage 3/7] rbd: adapt to changed rados mon_command return values

2022-03-25 Thread Aaron Lauterer
mon_command now returns a hash ref. Only the data is of interest. Signed-off-by: Aaron Lauterer --- Needs to be coordinated with librados2-perl changes from patch 1 PVE/Storage/RBDPlugin.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/Storage/RBDPlugin.pm b/PVE

[pve-devel] [PATCH v2 librados2-perl 1/7] mon_command: refactor to pass all data to perl

2022-03-25 Thread Aaron Lauterer
. We need to en- and decode the returned hash in JSON to pass it between the child and parent process. RADOS.pm::mon_command now returns not just the data, but all information as a hash ref. Therefore dependent packages (pve-manager, pve-storage) need to adapt. Signed-off-by: Aaron Lauterer

[pve-devel] [PATCH v2 librados2-perl storage manager 0/7] Add Ceph safety checks

2022-03-25 Thread Aaron Lauterer
always return hash ref instead of wantarray * one central cmd-safety API endpoint instead of multiple ones per service type librados2-perl: Aaron Lauterer (2): mon_command: refactor to pass all data to perl mon_command: optionally ignore errors PVE/RADOS.pm | 24

[pve-devel] [PATCH v5 manager 1/5] ui: utils: refactor mps to mp

2022-03-25 Thread Aaron Lauterer
Using the actual config key instead of the pluralization, makes it easier in the situations where we need to match against it. Signed-off-by: Aaron Lauterer --- changes since: v4: moved at the start of the series to avoid unnecessary steps www/manager6/Utils.js | 4 ++-- www/manager6

[pve-devel] [PATCH v5 manager 0/5] ui: lxc/qemu: disk/volume action simplify menu items

2022-03-25 Thread Aaron Lauterer
incorporate smaller style nits * simplify other labels as well, removing 'Volume' and 'Disk' as the context gives that away already v2: incorporated feedback I got off list, mainly * using more modern approaches * more arrow functions * reducing use of predefined cbind values

[pve-devel] [PATCH v5 manager 3/5] ui: lxc/qemu: add disk reassign and action submenu

2022-03-25 Thread Aaron Lauterer
For the new HDReassign component, we follow the approach of HDMove to have one componend for qemu and lxc. To avoid button clutter, a new "Disk/Volume action" button is introduced. It holds the Move, Reassign and Resize buttons in a submenu. Signed-off-by: Aaron Lauterer --- change

[pve-devel] [PATCH v5 manager 2/5] ui: utils: add nextFreeMP

2022-03-25 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer --- www/manager6/Utils.js | 15 +++ 1 file changed, 15 insertions(+) diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index 34cf49b3..519faac5 100644 --- a/www/manager6/Utils.js +++ b/www/manager6/Utils.js @@ -1803,6 +1803,21 @@ Ext.define

[pve-devel] [PATCH v5 manager 4/5] ui: BusTypeSelector: change noVirtIO to withVirtIO

2022-03-25 Thread Aaron Lauterer
Double negated properties make it harder than necessary to parse conditions. Signed-off-by: Aaron Lauterer Reviewed-by: Fabian Ebner --- www/manager6/form/BusTypeSelector.js| 4 ++-- www/manager6/form/ControllerSelector.js | 4 ++-- www/manager6/qemu/CDEdit.js | 2 +- www

[pve-devel] [PATCH v5 manager 5/5] ui: hdmove: modernize/refactor

2022-03-25 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer --- changes since v3: * code cleanup * fix padding * create 'url' in one place, no need for submitURL v2: * switch from generic window to proxmox edit v1: much of the feedback to the HDReassign.js from the first patch has been incorporated here as w

[pve-devel] [PATCH manager 1/2] api: osd: return block devices instead of dm node

2022-03-28 Thread Aaron Lauterer
n one can get a lot of more information by running `ceph osd metadata `. Signed-off-by: Aaron Lauterer --- PVE/API2/Ceph/OSD.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PVE/API2/Ceph/OSD.pm b/PVE/API2/Ceph/OSD.pm index 93433b3a..c3d1384e 100644 --- a/PVE/API2

[pve-devel] [PATCH manager 2/2] ui: osd: remove NA from wal device column

2022-03-28 Thread Aaron Lauterer
It adds visual noise and reduces readability. This brings the WAL device column in alignment with the DB device column which is showing whitespace if there is none configured. Signed-off-by: Aaron Lauterer --- www/manager6/ceph/OSD.js | 10 -- 1 file changed, 10 deletions(-) diff --git

Re: [pve-devel] [PATCH manager 1/2] api: osd: return block devices instead of dm node

2022-03-30 Thread Aaron Lauterer
On 3/29/22 18:05, Thomas Lamprecht wrote: On 28.03.22 13:10, Aaron Lauterer wrote: Returning the block devices is more useful than the device node. The device node usually points to the DM device for bluestore OSDs: /dev/dm-x In almost all situations one will be interested in the physical

[pve-devel] [RFC qemu-server] clone disk: fix #3970 catch same source and destination

2022-04-01 Thread Aaron Lauterer
he regular cleanup gets confused and tries to remove the source image. This will fail and we have an orphaned image which cannot be removed easily because the same underlying root cause (same path) will falsely trigger the "Drive::is_volume_in_use" check. Signed-off-by: Aaron Lauterer ---

[pve-devel] [RFC container] alloc disk: fix #3970 avoid ambiguous rbd image path

2022-04-01 Thread Aaron Lauterer
anything. The ambiguous mapping is in /dev/rbd/// where the namespace is optional. Once we can tell the clusters apart in the mapping, we can remove these checks again. See bug #3969 for more information on the root cause. Signed-off-by: Aaron Lauterer --- RFC because I would like someone else to

Re: [pve-devel] [RFC qemu-server] clone disk: fix #3970 catch same source and destination

2022-04-05 Thread Aaron Lauterer
On 4/4/22 17:26, Fabian Grünbichler wrote: On April 1, 2022 5:24 pm, Aaron Lauterer wrote: In rare situations, it could happen that the source and target path is the same. For example, if the disk image is to be copied from one RBD storage to another one on different Ceph clusters but the

Re: [pve-devel] [PATCH v5 manager 3/5] ui: lxc/qemu: add disk reassign and action submenu

2022-04-05 Thread Aaron Lauterer
On 4/5/22 13:29, Fabian Ebner wrote: On 25.03.22 15:00, Aaron Lauterer wrote: www/manager6/qemu/HardwareView.js | 72 ++-- Unfortunately, this needs a rebase, because of recent changes there. Yep, also 5/5 for the same reason. Will send a v6

[pve-devel] [PATCH v6 manager 0/5] ui: lxc/qemu: disk/volume action simplify menu items

2022-04-05 Thread Aaron Lauterer
ned cbind values and using inline functions when possible Aaron Lauterer (5): ui: utils: refactor mps to mp ui: utils: add nextFreeMP ui: lxc/qemu: add disk reassign and action submenu ui: BusTypeSelector: change noVirtIO to withVirtIO ui: hdmove: modernize/refactor www/manager6/Makefil

[pve-devel] [PATCH v6 manager 3/5] ui: lxc/qemu: add disk reassign and action submenu

2022-04-05 Thread Aaron Lauterer
For the new HDReassign component, we follow the approach of HDMove to have one componend for qemu and lxc. To avoid button clutter, a new "Disk/Volume action" button is introduced. It holds the Move, Reassign and Resize buttons in a submenu. Signed-off-by: Aaron Lauterer --- change

[pve-devel] [PATCH v6 manager 1/5] ui: utils: refactor mps to mp

2022-04-05 Thread Aaron Lauterer
Using the actual config key instead of the pluralization, makes it easier in the situations where we need to match against it. Signed-off-by: Aaron Lauterer --- changes since: v4: moved at the start of the series to avoid unnecessary steps www/manager6/Utils.js | 4 ++-- www/manager6

[pve-devel] [PATCH v6 manager 4/5] ui: BusTypeSelector: change noVirtIO to withVirtIO

2022-04-05 Thread Aaron Lauterer
Double negated properties make it harder than necessary to parse conditions. Signed-off-by: Aaron Lauterer Reviewed-by: Fabian Ebner --- www/manager6/form/BusTypeSelector.js| 4 ++-- www/manager6/form/ControllerSelector.js | 4 ++-- www/manager6/qemu/CDEdit.js | 2 +- www

<    1   2   3   4   5   6   7   8   9   10   >