[pve-devel] [PATCH qemu-server 1/2] restore: refactor archive parsing

2023-06-20 Thread Fabian Grünbichler
to avoid duplicate work, always set 'volid' to the backup volume's volid, if it was successfully parsed as such. Signed-off-by: Fabian Grünbichler --- PVE/API2/Qemu.pm | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index d

[pve-devel] [PATCH qemu-server 2/2] restore: extend permissions checks

2023-06-20 Thread Fabian Grünbichler
to allow early checking of the merged config, if the backup archive passed in is a proper volume where extraction is possible. Signed-off-by: Fabian Grünbichler --- Notes: this check needs to be inside the worker since we don't know how long extracting the config takes.. for pip

Re: [pve-devel] [PATCH v2 pve-docs] qemu: add cpu models documentation

2023-06-20 Thread Fiona Ebner
Am 19.06.23 um 12:03 schrieb Fiona Ebner: > Am 19.06.23 um 10:38 schrieb Alexandre Derumier: >> add doc for differents cpu models including >> new x86-64-vX models >> >> changelog v2: x86-64-v2 is compatible with >= opteron_g3 >> I'm applying this with follow-ups for my suggestions, so no need to

Re: [pve-devel] [PATCH manager 1/1] api: nodes: allow setting HA shutdown policy during shutdown/reboot

2023-06-20 Thread Fabian Grünbichler
On June 16, 2023 1:33 pm, Fiona Ebner wrote: > Increases flexibility/user-friendliness. > > Suggested-by: Thomas Lamprecht > Signed-off-by: Fiona Ebner > --- > > (Build-)dependency bump for libpve-cluster-perl needed. > > Dependency bump for ha-manager needed (to have the runtime dir exist > a

[pve-devel] [PATCH installer] remove nonexistent file from makefile

2023-06-20 Thread Maximiliano Sandoval
Signed-off-by: Maximiliano Sandoval --- Proxmox/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Proxmox/Makefile b/Proxmox/Makefile index d49da80..6360064 100644 --- a/Proxmox/Makefile +++ b/Proxmox/Makefile @@ -6,7 +6,6 @@ PERL5DIR=$(DESTDIR)/usr/share/perl5/Proxmox #PERL_MODULES=

[pve-devel] [PATCH installer] fix #4643: show a confirmation dialog when clicking abort

2023-06-20 Thread Maximiliano Sandoval
Note that unlike the rest of the file, we connect to the response signal instead of using Gtk3::Dialog->run, the reason is that run blocks the main loop used by GTK and this undesirable to the point where Gtk3::Dialog->run was removed for GTK 4. Signed-off-by: Maximiliano Sandoval --- proxinstal

[pve-devel] [PATCH installer 1/7] move create_basic_grid subroutine definition up

2023-06-20 Thread Maximiliano Sandoval
This will be used in future commits to create grids so we need it to be defined. Signed-off-by: Maximiliano Sandoval --- proxinstall | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/proxinstall b/proxinstall index fb365d4..fbd260b 100755 --- a/

[pve-devel] [PATCH installer 0/7] use gtk grids when possible

2023-06-20 Thread Maximiliano Sandoval
We replace the use of nested boxes with grids when possible to ensure correct margins and alignment of widgets. At the end we also remove trailing spaces and colons from labels preceding an input widget, e.g. `DNS Server: `. Maximiliano Sandoval (7): move create_basic_grid subroutine definition

[pve-devel] [PATCH installer 6/7] change margins in create_basic_grid

2023-06-20 Thread Maximiliano Sandoval
Previously the grids were inserted in a succession of boxes each with its own set of margins and spacing. We define the margins now exclusively in the grid and account for previous values. Note that we match the top and bottom margins of the 'Target Harddisk' panel which does not need to use a gri

[pve-devel] [PATCH installer 5/7] use basic grid in country/timezone panel

2023-06-20 Thread Maximiliano Sandoval
Signed-off-by: Maximiliano Sandoval --- proxinstall | 34 -- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/proxinstall b/proxinstall index faebdec..29ed8dc 100755 --- a/proxinstall +++ b/proxinstall @@ -1781,12 +1781,12 @@ sub update_layout { m

[pve-devel] [PATCH installer 2/7] use basic grid in the network panel

2023-06-20 Thread Maximiliano Sandoval
Using boxes causes the labels to not align correctly in certain circumstances. In the following commits we replace the use of boxes with grids and set the margins and spacing directly on the respective grid. Signed-off-by: Maximiliano Sandoval --- proxinstall | 56 ++-

[pve-devel] [PATCH installer 3/7] expand ip address Gtk3::Entry

2023-06-20 Thread Maximiliano Sandoval
This accounts for the different layout set in the previous commit. Signed-off-by: Maximiliano Sandoval --- proxinstall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxinstall b/proxinstall index 72802c0..7e1bcd4 100755 --- a/proxinstall +++ b/proxinstall @@ -1460,7 +1460,

[pve-devel] [PATCH installer 7/7] remove trailing spaces and colons from labels

2023-06-20 Thread Maximiliano Sandoval
For consistency sake, all colons and trailing spaces in labels were removed, this matches other panels such as the password and country/timezone panels. Signed-off-by: Maximiliano Sandoval --- proxinstall | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/proxinstal

[pve-devel] [PATCH installer 4/7] use basic grid in password panel

2023-06-20 Thread Maximiliano Sandoval
The extra 10px margin on the email row was added to account for the removed line: $vbox->pack_start($hbox3, 0, 0, 15); Signed-off-by: Maximiliano Sandoval --- proxinstall | 32 ++-- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/proxinstall b/pro

[pve-devel] [PATCH installer] make harddisk options dialog modal

2023-06-20 Thread Maximiliano Sandoval
Modal dialogs block the user from interacting with the main window. We already do this with message dialogs so for consistency sake, we set the harddisk options dialog as modal. Note that one can see weird behaviors when interacting with the window behind the dialog in certain scenarios. Signed-o

Re: [pve-devel] [RFC PATCH manager 4/4] ui: pci mapping: rework mapping panel for better user experience

2023-06-20 Thread Aaron Lauterer
I like the approach as it cleans up the overloaded tbar that has items that are only valid in certain contexts. Two small nits from a UX POV: - double clicking any PCI device should open the edit dialog for the node, similar to double clicking the node itself - the Action Column should probabl

[pve-devel] applied: [PATCH v2 pve-docs] qemu: add cpu models documentation

2023-06-20 Thread Fiona Ebner
Am 19.06.23 um 10:38 schrieb Alexandre Derumier: > add doc for differents cpu models including > new x86-64-vX models > > changelog v2: x86-64-v2 is compatible with >= opteron_g3 > > Signed-off-by: Alexandre Derumier applied, thanks! Made some follow-ups for typo/style/consistency fixes and mov

Re: [pve-devel] [RFC PATCH manager 4/4] ui: pci mapping: rework mapping panel for better user experience

2023-06-20 Thread Dominik Csapak
On 6/20/23 11:35, Aaron Lauterer wrote: I like the approach as it cleans up the overloaded tbar that has items that are only valid in certain contexts. Two small nits from a UX POV: - double clicking any PCI device should open the edit dialog for the node, similar to double clicking the node

Re: [pve-devel] [RFC PATCH manager 4/4] ui: pci mapping: rework mapping panel for better user experience

2023-06-20 Thread Aaron Lauterer
On 6/20/23 11:57, Dominik Csapak wrote: On 6/20/23 11:35, Aaron Lauterer wrote: I like the approach as it cleans up the overloaded tbar that has items that are only valid in certain contexts. Two small nits from a UX POV: - double clicking any PCI device should open the edit dialog for the

Re: [pve-devel] [RFC PATCH manager 4/4] ui: pci mapping: rework mapping panel for better user experience

2023-06-20 Thread Dominik Csapak
On 6/20/23 12:18, Aaron Lauterer wrote: On 6/20/23 11:57, Dominik Csapak wrote: On 6/20/23 11:35, Aaron Lauterer wrote: I like the approach as it cleans up the overloaded tbar that has items that are only valid in certain contexts. Two small nits from a UX POV: - double clicking any PCI de

[pve-devel] [RFC v2 ha-manager 2/7] lrm service: move PID file to service's runtime directory

2023-06-20 Thread Fiona Ebner
it's arguably cleaner to put it there, now that there is one. Signed-off-by: Fiona Ebner --- No changes in v2. debian/pve-ha-lrm.service | 2 +- src/PVE/Service/pve_ha_lrm.pm | 5 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/pve-ha-lrm.service b/debian/pve-ha

[pve-devel] [PATCH v2 ha-manager 1/7] lrm service: add runtime directory

2023-06-20 Thread Fiona Ebner
in preparation to allow overriding the shutdown policy with a file there. Signed-off-by: Fiona Ebner --- No changes in v2. debian/pve-ha-lrm.service | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/pve-ha-lrm.service b/debian/pve-ha-lrm.service index fb1b5db..9f3f73d 100644 --- a/deb

[pve-devel] [PATCH v2 ha-manager 3/7] pve2 env: get shutdown policy override set by node's shutdown API endpoint

2023-06-20 Thread Fiona Ebner
Signed-off-by: Fiona Ebner --- No changes in v2. src/PVE/HA/Env/PVE2.pm | 8 1 file changed, 8 insertions(+) diff --git a/src/PVE/HA/Env/PVE2.pm b/src/PVE/HA/Env/PVE2.pm index f6ebfeb..6a75bd4 100644 --- a/src/PVE/HA/Env/PVE2.pm +++ b/src/PVE/HA/Env/PVE2.pm @@ -458,9 +458,17 @@ sub ge

[pve-devel] [RFC v2 ha-manager 5/7] pve2 env: validate shutdown policy from override file

2023-06-20 Thread Fiona Ebner
for future-proofing. Signed-off-by: Fiona Ebner --- Not sure if this is worth it. (Build-)dependency bump for libpve-cluster-perl needed No changes in v2. src/PVE/HA/Env/PVE2.pm | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/PVE/HA/Env/PVE2.pm b/src/PVE

[pve-devel] [PATCH v2 ha-manager 4/7] lrm: honor shutdown policy override set by node's shutdown API endpoint

2023-06-20 Thread Fiona Ebner
The /nodes//status API endpoint in pve-manager allows to specify the shutdown policy now. This change is required for it to have any effect of course. Being able to choose the shutdown policy on a per-node/per-shutdown is more flexible and user-friendly. Signed-off-by: Fiona Ebner --- No change

[pve-devel] [PATCH v2 manager 1/2] api: nodes: allow setting HA shutdown policy during shutdown/reboot

2023-06-20 Thread Fiona Ebner
Increases flexibility/user-friendliness. In the edge case that an override is already present, but the user doesn't have Sys.Modify privilege, just proceed with the existing override. Could in principle happen when the requests from a privileged user with a policy and an unprivileged user without

[pve-devel] [PATCH v2 ha-manager 6/7] sim env: add support for datacenter config overrides

2023-06-20 Thread Fiona Ebner
to model the recent change in the pve2 environment. Signed-off-by: Fiona Ebner --- No changes in v2. src/PVE/HA/Sim/Env.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PVE/HA/Sim/Env.pm b/src/PVE/HA/Sim/Env.pm index c6ea73c..1b8399a 100644 --- a/src/PVE/HA/Sim/Env.pm +++ b/src/PVE/H

[pve-devel] [PATCH v2 manager 2/2] ui: allow specifying shutdown policy during node shutdown/reboot

2023-06-20 Thread Fiona Ebner
Signed-off-by: Fiona Ebner --- New in v2, was sent separately before (no changes to that). Used a new window, because it's small and couldn't find a good fit with the existing ones. Maybe SafeDestroy, but not in name and would require a few modifications too. Not sure about using gettext() for

[pve-devel] [PATCH-SERIES v2 (ha-)manager] allow node HA shutdown policy override

2023-06-20 Thread Fiona Ebner
Make it possible to specify the HA shutdown policy for the /nodes/{node}/status POST API enpoint for user flexibilty and convenience. The override is written to the LRM service's (new dedicated) runtime directory. The LRM will check and honor the override when it receives a shutdown/reboot request

[pve-devel] [PATCH v2 ha-manager 7/7] tests: add test for shutdown policy override

2023-06-20 Thread Fiona Ebner
Signed-off-by: Fiona Ebner --- No changes in v2. src/test/test-shutdown-policy-override/README | 3 + .../test-shutdown-policy-override/cmdlist | 4 ++ .../datacenter.cfg| 10 .../hardware_status | 5 ++ .../test-shutdown-policy-

[pve-devel] [PATCH pve-docs v7 0/1] update the PCI(e) docs

2023-06-20 Thread Noel Ullreich
This is a followup of Dominiks review: https://lists.proxmox.com/pipermail/pve-devel/2023-June/057295.html With the public wiki having been updated, I fixed the links. Noel Ullreich (1): update the PCI(e) docs qm-pci-passthrough.adoc | 155 +++- qm.adoc

[pve-devel] [PATCH pve-docs v7 1/1] update the PCI(e) docs

2023-06-20 Thread Noel Ullreich
A little update to the PCI(e) docs with the plan of reworking the PCI wiki as well. Along some minor grammar fixes added: * how to check if kernelmodules are being loaded * how to check which drivers to blacklist * how to add softdeps for module loading * where to find kernel params Signed-of

Re: [pve-devel] [PATCH manager 2/4] ui: pci map edit: reintroduce warnings checks

2023-06-20 Thread Fiona Ebner
Am 19.06.23 um 16:13 schrieb Dominik Csapak: > diff --git a/www/manager6/window/PCIMapEdit.js > b/www/manager6/window/PCIMapEdit.js > index 516678e0..cd2dbfbe 100644 > --- a/www/manager6/window/PCIMapEdit.js > +++ b/www/manager6/window/PCIMapEdit.js > @@ -70,6 +70,44 @@ Ext.define('PVE.window.PCIM

Re: [pve-devel] [PATCH manager 3/4] ui: pci map edit: improve new host mappings dialog

2023-06-20 Thread Fiona Ebner
Am 19.06.23 um 16:13 schrieb Dominik Csapak: > by disallowing nodes to be selected where a mapping already exists > and not preselecting a node > Two UX nits, not sure how hard they would be to address: - if all nodes already have a mapping, disable the button (or after the RFC, hide the action e

Re: [pve-devel] [RFC PATCH manager 4/4] ui: pci mapping: rework mapping panel for better user experience

2023-06-20 Thread Fiona Ebner
Am 19.06.23 um 16:13 schrieb Dominik Csapak: > by removing the confusing buttons in the toolbar and adding them as > actions in an actioncolumn. There a only relevant actions are visible > and get a more expressive tooltip I agree with Aaron that the actioncolumn is too far right at the moment. >

Re: [pve-devel] [RFC PATCH manager 4/4] ui: pci mapping: rework mapping panel for better user experience

2023-06-20 Thread Dominik Csapak
thanks for the review! i agree with all of the points of the answers in your other mails some comments here: On 6/20/23 15:25, Fiona Ebner wrote: Am 19.06.23 um 16:13 schrieb Dominik Csapak: by removing the confusing buttons in the toolbar and adding them as actions in an actioncolumn. There a

[pve-devel] [PATCH qemu-server] vm start: switch to new cleanup_transient_unit systemd helper

2023-06-20 Thread Fiona Ebner
which also runs a reset-failed command for the unit first, to ensure it is also cleaned up properly if in a failed state (e.g. after being OOM-killed). Previuosly, users in that situation would only see the less than ideal error message 'timeout waiting on systemd'. Signed-off-by: Fiona Ebner ---

[pve-devel] [PATCH common] systemd: add helper to cleanup transient unit

2023-06-20 Thread Fiona Ebner
which combines the stop+wait logic previously present at the single call site of wait_for_unit_removed() in QemuServer.pm. It also does a reset-failed call first, to ensure a unit in a failed state is also cleaned up properly. Signed-off-by: Fiona Ebner --- src/PVE/Systemd.pm | 16 ++

[pve-devel] [PATCH container] fix #4765: lxc: report cpu usage correctly

2023-06-20 Thread Maximiliano Sandoval
When running `pct status VMID` the variable $last_proc_vmid_stat->{$vmid} is not set and pct reports no cpu usage. We address this by computing the used cpu time over the total uptime of the container. Signed-off-by: Maximiliano Sandoval --- src/PVE/LXC.pm | 5 - 1 file changed, 4 insertion

Re: [pve-devel] [PATCH installer] remove nonexistent file from makefile

2023-06-20 Thread Thomas Lamprecht
Am 20/06/2023 um 10:42 schrieb Maximiliano Sandoval: > Signed-off-by: Maximiliano Sandoval > --- > Proxmox/Makefile | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/Proxmox/Makefile b/Proxmox/Makefile > index d49da80..6360064 100644 > --- a/Proxmox/Makefile > +++ b/Proxmox/Makefile > @@ -

[pve-devel] applied: [PATCH qemu-server 1/2] restore: refactor archive parsing

2023-06-20 Thread Thomas Lamprecht
Am 20/06/2023 um 09:41 schrieb Fabian Grünbichler: > to avoid duplicate work, always set 'volid' to the backup volume's volid, if > it > was successfully parsed as such. > > Signed-off-by: Fabian Grünbichler > --- > PVE/API2/Qemu.pm | 16 > 1 file changed, 8 insertions(+), 8 de