[pve-devel] [PATCH qemu-server 5/7] PVE/QemuServer: extend 'check_local_resources' for mapped resources

2022-07-19 Thread Dominik Csapak
by adding them to their own list, saving the nodes where they are not allowed, and return those on 'wantarray' Signed-off-by: Dominik Csapak --- PVE/QemuServer.pm | 36 ++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServe

[pve-devel] [PATCH manager 03/12] ui: form/USBSelector: make it more flexible with nodename

2022-07-19 Thread Dominik Csapak
similar to the pciselector, make it accept a plain nodename, or no node at all and provide a setNodename function to keep backwards compatibility, also check pveSelNode for the nodename Signed-off-by: Dominik Csapak --- www/manager6/form/USBSelector.js | 32 1

[pve-devel] [PATCH manager 04/12] ui: form: add PCIMapSelector

2022-07-19 Thread Dominik Csapak
akin to the PCISelector, but uses the api for mapped devices Signed-off-by: Dominik Csapak --- www/manager6/Makefile | 1 + www/manager6/form/PCIMapSelector.js | 95 + 2 files changed, 96 insertions(+) create mode 100644 www/manager6/form

[pve-devel] [PATCH many] add cluster-wide hardware device mapping

2022-07-19 Thread Dominik Csapak
d permissions better * added a 'comment' field for mappings dependencies are ofc: manager depends on qemu-server,pve-access-control,pve-common qemu-server depends on pve-access-control,pve-common pve-common depends on pve-cluster pve-cluster: Dominik Csapak (1): add nodes/ha

[pve-devel] [PATCH manager 07/12] ui: qemu/USBEdit: add 'mapped' device case

2022-07-19 Thread Dominik Csapak
to be able to select 'mapped' usb devices Signed-off-by: Dominik Csapak --- www/manager6/qemu/USBEdit.js | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/www/manager6/qemu/USBEdit.js b/www/manager6/qemu/USBEdit.js index a2204584

[pve-devel] [PATCH common 1/1] add PVE/HardwareMap

2022-07-19 Thread Dominik Csapak
* same as above */ }, digest => "" } it also adds some helpers for the api schema & asserting that the device mappings are valid (by checking the saved properties against the ones found on the current available devices) Signed-off-by: Dominik Csapak --- src/Makefile

[pve-devel] [PATCH manager 02/12] PVE/API2/Cluster: add Hardware mapping list api call

2022-07-19 Thread Dominik Csapak
api call for each node Signed-off-by: Dominik Csapak --- PVE/API2/Cluster.pm | 8 +++ PVE/API2/Cluster/Hardware.pm | 117 +++ PVE/API2/Cluster/Makefile| 1 + 3 files changed, 126 insertions(+) create mode 100644 PVE/API2/Cluster/Hardware.pm diff

[pve-devel] [PATCH manager 10/12] ui: add dc/HardwareView: a CRUD interface for hardware mapping

2022-07-19 Thread Dominik Csapak
it's possible to add/edit/remove mappings here, with a cluster wide view on the mappings and validity. to do that, we have to to an api call for each node, since we don't have the pci status synced across them. Signed-off-by: Dominik Csapak --- www/manager6/Makefile |

[pve-devel] [PATCH manager 01/12] PVE/API2/Hardware: add Mapping.pm

2022-07-19 Thread Dominik Csapak
: Dominik Csapak --- PVE/API2/Hardware.pm | 6 + PVE/API2/Hardware/Makefile | 1 + PVE/API2/Hardware/Mapping.pm | 708 +++ 3 files changed, 715 insertions(+) create mode 100644 PVE/API2/Hardware/Mapping.pm diff --git a/PVE/API2/Hardware.pm b/PVE/API2

[pve-devel] [PATCH manager 11/12] ui: window/Migrate: allow mapped devices

2022-07-19 Thread Dominik Csapak
if the migration is an offline migration and when the mapping on the target node exists, otherwise not this does not change the behaviour for 'raw' devices in the config those can still be forced to be migrated, like before Signed-off-by: Dominik Csapak --- www/manager6/window/Migra

[pve-devel] [PATCH manager 12/12] ui: improve permission handling for hardware

2022-07-19 Thread Dominik Csapak
enough permissions. data/PermPathStore: add '/hardware' to the list of acl paths Signed-off-by: Dominik Csapak --- www/manager6/data/PermPathStore.js | 1 + www/manager6/form/PCISelector.js | 1 + www/manager6/form/USBSelector.js | 1 + www/manager6/qemu/HardwareVie

[pve-devel] [PATCH manager 06/12] ui: qemu/PCIEdit: rework panel to add a mapped configuration

2022-07-19 Thread Dominik Csapak
reworks the panel to use a controller, so that we can easily add the selector for mapped pci devices shows now a selection between 'raw' and 'mapped' devices, where 'raw' ones work like before, and 'mapped' ones take the values form the hardware map config

Re: [pve-devel] [PATCH many] add cluster-wide hardware device mapping

2022-07-19 Thread Dominik Csapak
just a quick note, aaron noticed some small things immediately, root@pam did not see the hardware panel: access control needs this diff: 8< diff --git a/src/PVE/RPCEnvironment.pm b/src/PVE/RPCEnvironment.pm index c1b712d..b686c6b 100644 --- a/src/PVE/RPCEnvironment.pm +++ b/src/PVE/RPCE

Re: [pve-devel] [PATCH many] add cluster-wide hardware device mapping

2022-07-21 Thread Dominik Csapak
On 7/21/22 14:29, Gilberto Ferreira via pve-devel wrote: It's nice to hear about this patch. For now, as a workaround, when I need a usb device (like a stick for instance), I am using USB Over IP, like you can read in this article https://www.linux-magazine.com/Issues/2018/208/Tutorial-USB-IP#:~

[pve-devel] [PATCH widget-toolkit] form/RoleSelector: fix for pve

2022-07-22 Thread Dominik Csapak
in pbs we get an array here, so the renderer is fine, but in pve it's just a long string, so add a space after commas to achieve the same effect. without this, the second column is not visible in pve because of an error in the renderer (no 'join' function on a string) Signed-

[pve-devel] [PATCH manager 1/1] ui: improve form/MDevSelector

2022-07-25 Thread Dominik Csapak
by * showing the (optional) name in front of the type * making the 'availble' column a bit narrower * enabling 'cellWrap' for the description * making the dropdown a bit wider (so all the information can fit) Signed-off-by: Dominik Csapak --- www/manager6/form/

[pve-devel] [PATCH common 1/1] SysFSTools: get name from mediated device types

2022-07-25 Thread Dominik Csapak
Some vendors also provide a 'name' file here for the type, which, in case of NVIDIA, is the official name for the vGPU type in their documentation, so extract and return it too (if it exists). Signed-off-by: Dominik Csapak --- src/PVE/SysFSTools.pm | 6 +- 1 file changed, 5 insert

[pve-devel] [PATCH qemu-server 1/1] automatically add 'uuid' parameter when passing through NVIDIA vGPU

2022-07-25 Thread Dominik Csapak
with QEMU anyway, i'd say we can ignore that. Signed-off-by: Dominik Csapak --- PVE/QemuServer.pm | 8 +++- PVE/QemuServer/PCI.pm | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 7d9cf22..c4eb031 100644 --- a/PV

[pve-devel] [PATCH common/qemu-server/manager] improve vGPU (mdev) usage for NVIDIA

2022-07-25 Thread Dominik Csapak
nd give some feedback? my idea there would be to allow multiple device mappings per node (instead of one only) and the qemu code would select one automatically 0: https://bugzilla.proxmox.com/show_bug.cgi?id=3574 1: https://lists.proxmox.com/pipermail/pve-devel/2022-July/053565.html pve-common: Do

[pve-devel] [PATCH qemu-server] cleanup pci devices in more situations

2022-07-27 Thread Dominik Csapak
o it's own function, and call that instead of only 'remove_pci_reservation' also print the errors of the cleanup steps with 'warn', otherwise we might discard important errors Signed-off-by: Dominik Csapak --- PVE/QemuServer.pm | 40

[pve-devel] applied: [PATCH widget-toolkit v2] fix: gui: up/down arrow keys increment/decrement twice in Number field

2022-07-29 Thread Dominik Csapak
applied ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Re: [pve-devel] [PATCH access-control 2/2] PVE/RPCEnvironment: add helper for checking hw permissions

2022-08-08 Thread Dominik Csapak
On 8/1/22 14:01, Fabian Grünbichler wrote: On July 19, 2022 1:46 pm, Dominik Csapak wrote: like check_vm_perm, etc. Signed-off-by: Dominik Csapak --- src/PVE/RPCEnvironment.pm | 8 1 file changed, 8 insertions(+) diff --git a/src/PVE/RPCEnvironment.pm b/src/PVE/RPCEnvironment.pm

Re: [pve-devel] [PATCH common 1/1] add PVE/HardwareMap

2022-08-09 Thread Dominik Csapak
On 8/1/22 14:58, Fabian Grünbichler wrote: On July 19, 2022 1:46 pm, Dominik Csapak wrote: this adds functionality for the hardwaremap config (as json) the format of the config is like this: { usb => { name => { nodename1 => { /* mappi

Re: [pve-devel] [PATCH qemu-server 3/7] PVE/API2/Qemu: add permission checks for mapped usb devices

2022-08-09 Thread Dominik Csapak
On 8/1/22 15:01, Fabian Grünbichler wrote: On July 19, 2022 1:46 pm, Dominik Csapak wrote: Signed-off-by: Dominik Csapak --- PVE/API2/Qemu.pm | 39 --- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm

Re: [pve-devel] [PATCH common/qemu-server/manager] improve vGPU (mdev) usage for NVIDIA

2022-08-09 Thread Dominik Csapak
On 8/9/22 09:59, DERUMIER, Alexandre wrote: Le 26/07/22 à 08:55, Dominik Csapak a écrit : so maybe someone can look at that and give some feedback? my idea there would be to allow multiple device mappings per node (instead of one only) and the qemu code would select one automatically Hi

[pve-devel] [PATCH manager v2 1/1] ui: improve form/MDevSelector

2022-08-12 Thread Dominik Csapak
by * showing the (optional) name in front of the type * making the 'availble' column a bit narrower * enabling 'cellWrap' for the description * making the dropdown a bit wider (so all the information can fit) Signed-off-by: Dominik Csapak --- www/manager6/form/

[pve-devel] [PATCH common v2 1/1] SysFSTools: get name from mediated device types

2022-08-12 Thread Dominik Csapak
Some vendors also provide a 'name' file here for the type, which, in case of NVIDIA, is the official name for the vGPU type in their documentation, so extract and return it too (if it exists). Signed-off-by: Dominik Csapak --- src/PVE/SysFSTools.pm | 7 ++- 1 file changed, 6

[pve-devel] [PATCH qemu-server v2 2/2] cleanup pci devices in more situations

2022-08-12 Thread Dominik Csapak
o it's own function, and call that instead of only 'remove_pci_reservation' Signed-off-by: Dominik Csapak --- PVE/QemuServer.pm | 40 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm inde

[pve-devel] [PATCH common/qemu-server/manager v2] improve vGPU (mdev) usage for NVIDIA

2022-08-12 Thread Dominik Csapak
info. changes from v1: * use read_firstline instead of get_contents (to avoid the newline at the end) * make sure only one '-uuid' parameter is given * add patch 'cleanup pci device in more situations' (was seperate before) pve-common: Dominik Csapak (1): SysFSTools: ge

[pve-devel] [PATCH qemu-server v2 1/2] automatically add 'uuid' parameter when passing through NVIDIA vGPU

2022-08-12 Thread Dominik Csapak
with QEMU anyway, i'd say we can ignore that. Signed-off-by: Dominik Csapak --- PVE/QemuServer.pm | 9 - PVE/QemuServer/PCI.pm | 4 +++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 7d9cf22..c706653 100644 --- a/PVE

Re: [pve-devel] [PATCH common/qemu-server/manager] improve vGPU (mdev) usage for NVIDIA

2022-08-22 Thread Dominik Csapak
On 8/17/22 01:15, DERUMIER, Alexandre wrote: Le 9/08/22 à 10:39, Dominik Csapak a écrit : On 8/9/22 09:59, DERUMIER, Alexandre wrote: Le 26/07/22 à 08:55, Dominik Csapak a écrit : so maybe someone can look at that and give some feedback? my idea there would be to allow multiple device

Re: [pve-devel] [PATCH common/qemu-server/manager] improve vGPU (mdev) usage for NVIDIA

2022-08-22 Thread Dominik Csapak
On 8/22/22 15:39, DERUMIER, Alexandre wrote: Le 22/08/22 à 12:16, Dominik Csapak a écrit : On 8/17/22 01:15, DERUMIER, Alexandre wrote: Le 9/08/22 à 10:39, Dominik Csapak a écrit : On 8/9/22 09:59, DERUMIER, Alexandre wrote: Le 26/07/22 à 08:55, Dominik Csapak a écrit : so maybe someone can

Re: [pve-devel] [PATCH common/qemu-server/manager] improve vGPU (mdev) usage for NVIDIA

2022-08-23 Thread Dominik Csapak
On 8/22/22 16:07, Dominik Csapak wrote: On 8/22/22 15:39, DERUMIER, Alexandre wrote: Le 22/08/22 à 12:16, Dominik Csapak a écrit : On 8/17/22 01:15, DERUMIER, Alexandre wrote: Le 9/08/22 à 10:39, Dominik Csapak a écrit : On 8/9/22 09:59, DERUMIER, Alexandre wrote: Le 26/07/22 à 08:55

[pve-devel] [PATCH access-control v2 1/1] PVE/AccessControl: add Hardware.* privileges and /hardware/ paths

2022-08-25 Thread Dominik Csapak
so that we can assign privileges on hardware level this will generate a new role (PVEHardwareAdmin) Signed-off-by: Dominik Csapak --- src/PVE/AccessControl.pm | 13 + src/PVE/RPCEnvironment.pm | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/PVE

[pve-devel] [PATCH qemu-server v2 02/13] PCI: make mediated device path independent of pci id

2022-08-25 Thread Dominik Csapak
mdevs must have a host-unique uuid, and they appear in /sys/bus/mdev/devices/, so there is no need to reference the pciid with it Signed-off-by: Dominik Csapak --- PVE/QemuServer/PCI.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PVE/QemuServer/PCI.pm b/PVE/QemuServer

[pve-devel] [PATCH qemu-server v2 06/13] PVE/QemuServer: allow mapped pci deviced in config

2022-08-25 Thread Dominik Csapak
and get the correct pci device during parsing Signed-off-by: Dominik Csapak --- PVE/QemuServer/PCI.pm | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer/PCI.pm b/PVE/QemuServer/PCI.pm index b5284ef..8c171f3 100644 --- a/PVE/QemuServer/PCI.pm

[pve-devel] [PATCH qemu-server v2 03/13] PCI: refactor print_pci_device

2022-08-25 Thread Dominik Csapak
into a private sub. This makes the 'print_hostpci_devices' function more easier to read Signed-off-by: Dominik Csapak --- PVE/QemuServer/PCI.pm | 57 +-- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/PVE/QemuServer/PC

[pve-devel] [PATCH qemu-server v2 10/13] PVE/API2/Qemu: migrate preconditions: use new check_local_resources info

2022-08-25 Thread Dominik Csapak
restrict the nodes also for mapped devices, and return them in their own property Signed-off-by: Dominik Csapak --- PVE/API2/Qemu.pm | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index f22c601..f570fc2 100644 --- a/PVE

[pve-devel] [PATCH qemu-server v2 07/13] PVE/API2/Qemu: add permission checks for mapped usb devices

2022-08-25 Thread Dominik Csapak
Signed-off-by: Dominik Csapak --- PVE/API2/Qemu.pm | 40 +--- PVE/QemuServer.pm | 2 ++ 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 99b426e..08e5104 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2

[pve-devel] [PATCH many v2] add cluster-wide hardware device mapping

2022-08-25 Thread Dominik Csapak
r (5-11) depends on qemu-server(<5), pve-access-control,pve-common (2) qemu-server (12,13) depends on qemu-server(<12), pve-common (3) manager depends on qemu-server,pve-access-control,pve-common pve-cluster: Dominik Csapak (1): add nodes/hardware-map.conf data/PVE/Cluster.pm | 1 +

[pve-devel] [PATCH manager v2 12/13] ui: window/Migrate: allow mapped devices

2022-08-25 Thread Dominik Csapak
if the migration is an offline migration and when the mapping on the target node exists, otherwise not this does not change the behaviour for 'raw' devices in the config those can still be forced to be migrated, like before Signed-off-by: Dominik Csapak --- www/manager6/window/Migra

[pve-devel] [PATCH manager v2 02/13] PVE/API2/Cluster: add Hardware mapping list api call

2022-08-25 Thread Dominik Csapak
api call for each node Signed-off-by: Dominik Csapak --- PVE/API2/Cluster.pm | 8 +++ PVE/API2/Cluster/Hardware.pm | 117 +++ PVE/API2/Cluster/Makefile| 1 + 3 files changed, 126 insertions(+) create mode 100644 PVE/API2/Cluster/Hardware.pm diff

[pve-devel] [PATCH common v2 2/3] add PVE/HardwareMap

2022-08-25 Thread Dominik Csapak
the saved properties against the ones found on the current available devices) we use a single cluster wide json here, because section config is too limited to properly represent the data we need and easily access the config of all nodes when we need it (e.g. in api calls regarding migration and config

[pve-devel] [PATCH manager v2 09/13] ui: add window/PCIEdit: edit window for pci mappings

2022-08-25 Thread Dominik Csapak
allows to add a single host mapping for pci entries Signed-off-by: Dominik Csapak --- www/manager6/Makefile| 1 + www/manager6/form/PCISelector.js | 17 +- www/manager6/window/PCIEdit.js | 287 +++ 3 files changed, 304 insertions(+), 1 deletion

[pve-devel] [PATCH manager v2 01/13] PVE/API2/Hardware: add Mapping.pm

2022-08-25 Thread Dominik Csapak
: Dominik Csapak --- PVE/API2/Hardware.pm | 6 + PVE/API2/Hardware/Makefile | 1 + PVE/API2/Hardware/Mapping.pm | 708 +++ 3 files changed, 715 insertions(+) create mode 100644 PVE/API2/Hardware/Mapping.pm diff --git a/PVE/API2/Hardware.pm b/PVE/API2

[pve-devel] [PATCH manager v2 08/13] ui: form: add MultiPCISelector

2022-08-25 Thread Dominik Csapak
. we can also not select multiple devices with different properties (e.g. vendor) so that the user cannot select a set of pci devices which are not similar Signed-off-by: Dominik Csapak --- www/css/ext6-pve.css | 4 + www/manager6/Makefile | 1 + www/manager6

[pve-devel] [PATCH common v2 1/3] SysFSTools: make mdev cleanup independent of pciid

2022-08-25 Thread Dominik Csapak
mediated devices also appear under /sys/bus/mdev/devices with their uuid, independent of the pci device, so we can use that instead Signed-off-by: Dominik Csapak --- src/PVE/SysFSTools.pm | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/PVE/SysFSTools.pm b/src/PVE

[pve-devel] [PATCH cluster v2 1/1] add nodes/hardware-map.conf

2022-08-25 Thread Dominik Csapak
to PVE/Cluster.pm and status.c Signed-off-by: Dominik Csapak --- data/PVE/Cluster.pm | 1 + data/src/status.c | 1 + 2 files changed, 2 insertions(+) diff --git a/data/PVE/Cluster.pm b/data/PVE/Cluster.pm index abcc46d..5dfc6b2 100644 --- a/data/PVE/Cluster.pm +++ b/data/PVE/Cluster.pm

[pve-devel] [PATCH qemu-server v2 05/13] PVE/QemuServer: allow mapped usb devices in config

2022-08-25 Thread Dominik Csapak
Signed-off-by: Dominik Csapak --- PVE/QemuServer.pm | 2 ++ PVE/QemuServer/USB.pm | 21 - 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 050e5c2..68e1366 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm

[pve-devel] [PATCH qemu-server v2 01/13] cleanup pci devices in more situations

2022-08-25 Thread Dominik Csapak
o it's own function, and call that instead of only 'remove_pci_reservation' Signed-off-by: Dominik Csapak --- PVE/QemuServer.pm | 34 ++ PVE/QemuServer/PCI.pm | 12 +++- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git

[pve-devel] [PATCH common v2 3/3] HardwareMap: add support for multiple pci device paths per mapping

2022-08-25 Thread Dominik Csapak
n the any has a different group, the first one will too Signed-off-by: Dominik Csapak --- src/PVE/HardwareMap.pm | 68 +- 1 file changed, 40 insertions(+), 28 deletions(-) diff --git a/src/PVE/HardwareMap.pm b/src/PVE/HardwareMap.pm index 7a90220..4a322ff 1

[pve-devel] [PATCH qemu-server v2 11/13] PVE/QemuMigrate: check for mapped resources on migration

2022-08-25 Thread Dominik Csapak
they can only be migrated to nodes where there exists a mapping and if the migration is done offline Signed-off-by: Dominik Csapak --- PVE/QemuMigrate.pm | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index d52dc8d

[pve-devel] [PATCH qemu-server v2 09/13] PVE/QemuServer: extend 'check_local_resources' for mapped resources

2022-08-25 Thread Dominik Csapak
by adding them to their own list, saving the nodes where they are not allowed, and return those on 'wantarray' Signed-off-by: Dominik Csapak --- PVE/QemuServer.pm| 36 ++-- test/MigrationTest/Shared.pm | 7 +++ 2 files changed, 41

[pve-devel] [PATCH manager v2 03/13] ui: form/USBSelector: make it more flexible with nodename

2022-08-25 Thread Dominik Csapak
similar to the pciselector, make it accept a plain nodename, or no node at all and provide a setNodename function to keep backwards compatibility, also check pveSelNode for the nodename Signed-off-by: Dominik Csapak --- www/manager6/form/USBSelector.js | 32 1

[pve-devel] [PATCH qemu-server v2 04/13] PCI: reuse parsed info from print_hostpci_devices

2022-08-25 Thread Dominik Csapak
instead of parsing the config again when trying to reserver/prepare the pci devices. also split the preparing into non-mdev devices and mdev devices, this will come in handy later. Signed-off-by: Dominik Csapak --- PVE/QemuServer.pm | 20 +--- PVE/QemuServer/PCI.pm | 8

[pve-devel] [PATCH manager v2 05/13] ui: form: add USBMapSelector

2022-08-25 Thread Dominik Csapak
similar to PCIMapSelector Signed-off-by: Dominik Csapak --- www/manager6/Makefile | 1 + www/manager6/form/USBMapSelector.js | 73 + 2 files changed, 74 insertions(+) create mode 100644 www/manager6/form/USBMapSelector.js diff --git a/www/manager6

[pve-devel] [PATCH manager v2 07/13] ui: qemu/USBEdit: add 'mapped' device case

2022-08-25 Thread Dominik Csapak
to be able to select 'mapped' usb devices Signed-off-by: Dominik Csapak --- www/manager6/qemu/USBEdit.js | 36 +++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/www/manager6/qemu/USBEdit.js b/www/manager6/qemu/USBEdit.js index a2204584

[pve-devel] [PATCH manager v2 10/13] ui: add window/USBEdit: edit window for usb mappings

2022-08-25 Thread Dominik Csapak
allows to add a single host mapping for usb entries Signed-off-by: Dominik Csapak --- www/manager6/Makefile | 1 + www/manager6/window/USBEdit.js | 248 + 2 files changed, 249 insertions(+) create mode 100644 www/manager6/window/USBEdit.js diff --git

[pve-devel] [PATCH qemu-server v2 12/13] fix #3574: enable multi pci device mapping from config

2022-08-25 Thread Dominik Csapak
_pci_usage) so that a 'qm showcmd' does not actually reserve any pci id (this would break when using that on running vms). Additionally this also prevents the migration tests from failing (they use vm_commandline which in turn uses config_to_command) Signed-off-by: Dominik Csapak --

[pve-devel] [PATCH manager v2 13/13] ui: improve permission handling for hardware

2022-08-25 Thread Dominik Csapak
enough permissions. data/PermPathStore: add '/hardware' to the list of acl paths Signed-off-by: Dominik Csapak --- www/manager6/data/PermPathStore.js | 1 + www/manager6/form/PCISelector.js | 1 + www/manager6/form/USBSelector.js | 1 + www/manager6/qemu/HardwareVie

[pve-devel] [PATCH qemu-server v2 13/13] add tests for mapped pci devices

2022-08-25 Thread Dominik Csapak
Signed-off-by: Dominik Csapak --- test/cfg2cmd/q35-linux-hostpci-mapping.conf | 17 + .../q35-linux-hostpci-mapping.conf.cmd| 36 + test/run_config2command_tests.pl | 76 +++ 3 files changed, 129 insertions(+) create mode 100644 test/cfg2cmd

[pve-devel] [PATCH manager v2 11/13] ui: add dc/HardwareView: a CRUD interface for hardware mapping

2022-08-25 Thread Dominik Csapak
it's possible to add/edit/remove mappings here, with a cluster wide view on the mappings and validity. to do that, we have to to an api call for each node, since we don't have the pci status synced across them. Signed-off-by: Dominik Csapak --- www/manager6/Makefile |

[pve-devel] [PATCH manager v2 06/13] ui: qemu/PCIEdit: rework panel to add a mapped configuration

2022-08-25 Thread Dominik Csapak
reworks the panel to use a controller, so that we can easily add the selector for mapped pci devices shows now a selection between 'raw' and 'mapped' devices, where 'raw' ones work like before, and 'mapped' ones take the values form the hardware map config

[pve-devel] [PATCH qemu-server v2 08/13] PVE/API2/Qemu: add permission checks for mapped pci devices

2022-08-25 Thread Dominik Csapak
Signed-off-by: Dominik Csapak --- PVE/API2/Qemu.pm | 54 ++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 08e5104..f22c601 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -26,6 +26,7

[pve-devel] [PATCH manager v2 04/13] ui: form: add PCIMapSelector

2022-08-25 Thread Dominik Csapak
akin to the PCISelector, but uses the api for mapped devices Signed-off-by: Dominik Csapak --- www/manager6/Makefile | 1 + www/manager6/form/PCIMapSelector.js | 102 2 files changed, 103 insertions(+) create mode 100644 www/manager6/form

Re: [pve-devel] [PATCH qemu-server v2 11/13] PVE/QemuMigrate: check for mapped resources on migration

2022-08-25 Thread Dominik Csapak
On 8/25/22 20:00, DERUMIER, Alexandre wrote: Le 25/08/22 à 11:24, Dominik Csapak a écrit : they can only be migrated to nodes where there exists a mapping and if the migration is done offline Signed-off-by: Dominik Csapak --- PVE/QemuMigrate.pm | 13 - 1 file changed, 12

Re: [pve-devel] [PATCH qemu-server v2 12/13] fix #3574: enable multi pci device mapping from config

2022-08-25 Thread Dominik Csapak
On 8/25/22 16:53, DERUMIER, Alexandre wrote: > root@pve2:~# qm start 101 > ignoring mediated device with multifunction device ok, it's simply that indeed I have specify a multifunction path ":02". I think it should better/safe to die here, instead to simply warn and continue. i agree d

Re: [pve-devel] [PATCH manager v2 11/13] ui: add dc/HardwareView: a CRUD interface for hardware mapping

2022-08-25 Thread Dominik Csapak
On 8/25/22 17:37, DERUMIER, Alexandre wrote: I don't known if it's a bug in the gui, or the api. But, if you update an existing mapping,with currently,a simple function pci with mdev=1, and you change it to a pci multifunction with mdev=0, the mdev value is not updated. (This occur in the othe

Re: [pve-devel] [PATCH qemu-server v2 12/13] fix #3574: enable multi pci device mapping from config

2022-09-02 Thread Dominik Csapak
On 8/27/22 18:09, DERUMIER, Alexandre wrote: Le 26/08/22 à 08:39, Dominik Csapak a écrit : On 8/25/22 16:53, DERUMIER, Alexandre wrote:   > root@pve2:~# qm start 101   > ignoring mediated device with multifunction device ok, it's simply that indeed I have specify a multifunction

Re: [pve-devel] [PATCH storage v3 0/3] disks: add checks, allow add_storage on other nodes

2022-09-05 Thread Dominik Csapak
Code LGTM and tested fine consider the series: Reviewed-by: Dominik Csapak Tested-by: Dominik Csapak ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

[pve-devel] [PATCH pve-flutter-frontend 02/10] increase compileSdkVersion to 32

2022-09-08 Thread Dominik Csapak
current version of webview_flutter_android (2.10.0) needs it Signed-off-by: Dominik Csapak --- android/app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index d287d5b..27e8d55 100644 --- a/android/app

[pve-devel] [PATCH proxmox-login-manager 3/3] improve colors of login screen

2022-09-08 Thread Dominik Csapak
ProxmoxProgressOverlay, so that the text appears now white instead of some shade of cyan. Signed-off-by: Dominik Csapak --- lib/proxmox_login_form.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/proxmox_login_form.dart b/lib/proxmox_login_form.dart index 5e9198f..706315f 100644 --- a/lib

[pve-devel] [PATCH pve-flutter-frontend 06/10] move to ElevatedButton from RaisedButton

2022-09-08 Thread Dominik Csapak
flutter 3.0 removed RaisedButton Signed-off-by: Dominik Csapak --- lib/widgets/firstWelcomeScreen/pve_welcome_last.dart | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/widgets/firstWelcomeScreen/pve_welcome_last.dart b/lib/widgets/firstWelcomeScreen

[pve-devel] [PATCH pve-flutter-frontend 09/10] fix guest backup widget start display

2022-09-08 Thread Dominik Csapak
e we get a Future, which cannot be converted to FutureOr, we got an exception (that we never saw because of the Missing ScaffoldMessenger) same is true for the 'remove' button despite that the backup always actually ran, but the user did not get any visual feedback Signed-off-by: Domi

[pve-devel] [PATCH pve-flutter-frontend 04/10] move to OutlinedButton from OutlineButton

2022-09-08 Thread Dominik Csapak
flutter 3.0 removed OutlineButton in favor of OutlinedButton. also change the default text color to white, and drop an unnecessary padding in one case Signed-off-by: Dominik Csapak --- lib/main.dart | 10 ++ .../firstWelcomeScreen/pve_welcome_faq.dart

[pve-devel] [PATCH proxmox-login-manager 2/3] migrate from FlatButton to TextButton

2022-09-08 Thread Dominik Csapak
since flutter 3 removed FlatButton. For this we have to do the colors a little different, so i moved the color/disabledColor into the textButtonTheme, which does not modify anything else here. Signed-off-by: Dominik Csapak --- lib/proxmox_login_form.dart | 33

[pve-devel] [PATCH proxmox-login-manager/pve-flutter-frontend] fixes & update to flutter 3.3

2022-09-08 Thread Dominik Csapak
use them) since then we could better use 'flutter analyze' (now these widgets/files make much noise to the point where it's hard to see which warnings/infos are even relevant for the app) proxmox-login-manager: Aaron Lauterer (1): login_form: keep Continue button above Android sof

[pve-devel] [PATCH pve-flutter-frontend 03/10] fix null handling in MainActivity.kt

2022-09-08 Thread Dominik Csapak
in newer flutter versions, call.arguments() can return null, so handle that Signed-off-by: Dominik Csapak --- .../kotlin/com/proxmox/app/pve_flutter_frontend/MainActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/src/main/kotlin/com/proxmox/app

[pve-devel] [PATCH pve-flutter-frontend 10/10] fix options view when ostype is null

2022-09-08 Thread Dominik Csapak
can happen when no ostype is set in the config (defaults to 'other') Signed-off-by: Dominik Csapak --- lib/widgets/pve_qemu_options_widget.dart | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/widgets/pve_qemu_options_widget.dart b/l

[pve-devel] [PATCH pve-flutter-frontend 07/10] improve colors for indicator/toggles

2022-09-08 Thread Dominik Csapak
so that it fits better with our color schemes instead of using the flutter defaults (which are especially bad in dark mode for our scheme) Signed-off-by: Dominik Csapak --- lib/main.dart | 4 1 file changed, 4 insertions(+) diff --git a/lib/main.dart b/lib/main.dart index d467626..c9b862e

[pve-devel] [PATCH pve-flutter-frontend 08/10] fix typo Opague -> Opaque

2022-09-08 Thread Dominik Csapak
Signed-off-by: Dominik Csapak --- lib/widgets/firstWelcomeScreen/pve_welcome_faq.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widgets/firstWelcomeScreen/pve_welcome_faq.dart b/lib/widgets/firstWelcomeScreen/pve_welcome_faq.dart index 470d118..f2be574 100644 --- a

[pve-devel] [PATCH proxmox-login-manager 1/3] login_form: keep Continue button above Android softnav

2022-09-08 Thread Dominik Csapak
From: Aaron Lauterer By placing the items in a SafeArea we avoid having the "Continue" button behind the Android soft navigation buttons. Signed-off-by: Aaron Lauterer Signed-off-by: Dominik Csapak --- lib/proxmox_login_form.dart | 265 ++-- 1 fi

[pve-devel] [PATCH pve-flutter-frontend 05/10] move to TextButton from FlatButton

2022-09-08 Thread Dominik Csapak
flutter 3.0 removed FlatButton Signed-off-by: Dominik Csapak --- lib/pages/main_layout_slim.dart | 2 +- lib/widgets/pve_console_menu_widget.dart | 4 +-- lib/widgets/pve_first_welcome_screen.dart | 32 --- lib/widgets/pve_guest_backup_widget.dart

[pve-devel] [PATCH pve-flutter-frontend 01/10] avoid elements hiding behind Android softnav buttons

2022-09-08 Thread Dominik Csapak
: Dominik Csapak --- lib/widgets/pve_lxc_options_widget.dart | 140 lib/widgets/pve_qemu_options_widget.dart | 256 +++--- lib/widgets/pve_qemu_overview.dart| 319 +- .../pve_qemu_power_settings_widget.dart | 178 +- 4 files changed

[pve-devel] [PATCH pve-flutter-frontend] fix text selection theme

2022-09-12 Thread Dominik Csapak
background, making them invisible. Fix it by creating a manual textSelectionTheme with colors that properly contrast the background. (The color works well for both light and dark mode) The selectionHandleColor is modifed with an opacity of 0.4 like flutter does by default. Signed-off-by: Dominik

Re: [pve-devel] [PATCH container] fix #4192: add new architecture-dependent path to check for newer versions of systemd

2022-09-12 Thread Dominik Csapak
[snip] # non systemd based containers work with pure cgroupv2 sub unified_cgroupv2_support { -my ($self) = @_; +my ($self, $conf) = @_; why pass the whole config if you just need the arch? Please avoid overly generic parameter in signatures if only one specific thing is required.

Re: [pve-devel] [PATCH container] fix #4192: add new architecture-dependent path to check for newer versions of systemd

2022-09-12 Thread Dominik Csapak
On 9/12/22 11:30, Dominik Csapak wrote: [snip]   # non systemd based containers work with pure cgroupv2   sub unified_cgroupv2_support { -    my ($self) = @_; +    my ($self, $conf) = @_; why pass the whole config if you just need the arch? Please avoid overly generic parameter in signatures

Re: [pve-devel] [PATCH container] fix #4192: add new architecture-dependent path to check for newer versions of systemd

2022-09-12 Thread Dominik Csapak
On 9/12/22 11:30, Dominik Csapak wrote: [snip]   # non systemd based containers work with pure cgroupv2   sub unified_cgroupv2_support { -    my ($self) = @_; +    my ($self, $conf) = @_; why pass the whole config if you just need the arch? Please avoid overly generic parameter in signatures

[pve-devel] [RFC PATCH access-control] loosen locking restriction for users without tfa configured

2022-09-14 Thread Dominik Csapak
in at all because of a not quorate server (when there is not a good technical reason for it) seems bad It's still not possible to login when tfa is enabled though, but at least for simple setups it should be a bit better Signed-off-by: Dominik Csapak --- src/PVE/AccessControl.pm | 6

[pve-devel] [PATCH manager] ui: eslint: fix undefined check

2022-09-15 Thread Dominik Csapak
'typeof' cannot return 'undefined' only the string '"undefined"', newer eslint versions detect that as error to fix it, directly check it for undefined instead of using typeof Signed-off-by: Dominik Csapak --- www/manager6/storage/PBSEdit.js | 2 +- 1

Re: [pve-devel] [PATCH qemu-server v7 1/1] api: update: check 'admin' tags privileges

2022-09-15 Thread Dominik Csapak
different enough? On 6/21/22 11:19, Dominik Csapak wrote: normal tags require 'VM.Config.Options' on the VM, admin tags require 'Sys.Modify' on '/' a user can set/delete/reorder tags, as long as no admin tags get added/removed Signed-off-by: Dominik Csapak [...]

Re: [pve-devel] [PATCH manager v7 10/14] ui: tree/ResourceTree: show Tags in tree

2022-09-15 Thread Dominik Csapak
re but since we want the tags to be shown differently there (to be able to add/edit them) we cannot use that anymore On 6/21/22 11:20, Dominik Csapak wrote: [snip]   node: { @@ -114,6 +116,8 @@ Ext.define('PVE.tree.ResourceTree', {   }   } +    info.tex

Re: [pve-devel] [PATCH manager v7 14/14] ui: form/Tag(Edit): add drag & drop when editing tags

2022-09-15 Thread Dominik Csapak
On 9/14/22 16:15, Aaron Lauterer wrote: On 6/21/22 11:20, Dominik Csapak wrote: Signed-off-by: Dominik Csapak ---   www/manager6/form/Tag.js | 22 +++--   www/manager6/form/TagEdit.js | 96 +++-   2 files changed, 114 insertions(+), 4 deletions(-) diff

Re: [pve-devel] [RFC PATCH access-control] loosen locking restriction for users without tfa configured

2022-09-15 Thread Dominik Csapak
On 9/15/22 12:43, Thomas Lamprecht wrote: Am 14/09/2022 um 15:42 schrieb Dominik Csapak: The downside is that we cannot authenticate users anymore without quorum (since locking requires write access to pmxcfs), even for users without tfa configured (and also for clusters without any tfa

Re: [pve-devel] [RFC PATCH access-control] loosen locking restriction for users without tfa configured

2022-09-15 Thread Dominik Csapak
On 9/15/22 14:53, Thomas Lamprecht wrote: Am 15/09/2022 um 14:40 schrieb Dominik Csapak: On 9/15/22 12:43, Thomas Lamprecht wrote: Am 14/09/2022 um 15:42 schrieb Dominik Csapak: The downside is that we cannot authenticate users anymore without quorum (since locking requires write access to

Re: [pve-devel] [PATCH common/cluster/qemu/container/wt/manager v7] add tags to ui

2022-09-16 Thread Dominik Csapak
On 9/16/22 09:19, Thomas Lamprecht wrote: Am 21/06/2022 um 11:19 schrieb Dominik Csapak: this series brings the already existing 'tags' for ct/vms to the gui: * tags can be edited in the status toolbar of the guest * existing tags will be shown in the tree/global search/resource gr

[pve-devel] [PATCH access-control v3 1/1] PVE/AccessControl: add Hardware.* privileges and /hardware/ paths

2022-09-20 Thread Dominik Csapak
so that we can assign privileges on hardware level this will generate a new role (PVEHardwareAdmin) Signed-off-by: Dominik Csapak --- src/PVE/AccessControl.pm | 13 + src/PVE/RPCEnvironment.pm | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/PVE

[pve-devel] [PATCH qemu-server v3 10/13] PVE/API2/Qemu: migrate preconditions: use new check_local_resources info

2022-09-20 Thread Dominik Csapak
restrict the nodes also for mapped devices, and return them in their own property Signed-off-by: Dominik Csapak --- PVE/API2/Qemu.pm | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index d6d393f..cc726bd 100644 --- a/PVE

[pve-devel] [PATCH qemu-server v3 02/13] PCI: make mediated device path independent of pci id

2022-09-20 Thread Dominik Csapak
mdevs must have a host-unique uuid, and they appear in /sys/bus/mdev/devices/, so there is no need to reference the pciid with it Signed-off-by: Dominik Csapak --- PVE/QemuServer/PCI.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PVE/QemuServer/PCI.pm b/PVE/QemuServer

[pve-devel] [PATCH qemu-server v3 12/13] fix #3574: enable multi pci device mapping from config

2022-09-20 Thread Dominik Csapak
_pci_usage) so that a 'qm showcmd' does not actually reserve any pci id (this would break when using that on running vms). Additionally this also prevents the migration tests from failing (they use vm_commandline which in turn uses config_to_command) Signed-off-by: Dominik Csapak --

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