[pve-devel] [PATCH v2 qemu] add two more stable patches

2022-07-19 Thread Fabian Ebner
For the io_uring patch, it's not very clear which configurations can trigger it, but it should be rather uncommon. See qemu commit be6a166fde652589761cf70471bcde623e9bd72a for a bit more information. Signed-off-by: Fabian Ebner --- Changes from v1: * Cherry-pick io_uring patch instead of tak

[pve-devel] [PATCH container] fix #4164: use DHCP=yes instead of DHCP=both in systemd-networkd config

2022-07-19 Thread Oguz Bektas
"both" option is deprecated, this gets rid of the warning in the journal Signed-off-by: Oguz Bektas --- src/PVE/LXC/Setup/Base.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/LXC/Setup/Base.pm b/src/PVE/LXC/Setup/Base.pm index 8580bf0..cc12914 100644 --- a/src/PVE/

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

2022-07-19 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 @@ -76

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

2022-07-19 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 | 1 + 2 files changed, 14 insertions(+) diff --git a/src/PVE/AccessControl.pm b/src/PV

[pve-devel] [PATCH qemu-server 1/7] PVE/QemuServer: allow mapped usb devices in config

2022-07-19 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 7d9cf22..a6ca80d 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@

[pve-devel] [PATCH qemu-server 6/7] PVE/API2/Qemu: migrate preconditions: use new check_local_resources info

2022-07-19 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 a8029c2..72c8755 100644 --- a/PVE/AP

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

2022-07-19 Thread Dominik Csapak
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 index 99b426e..aa7ddea 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -26,6 +26,7 @@ use PVE

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

2022-07-19 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..d40be

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

2022-07-19 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/Mak

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

2022-07-19 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 aa7ddea..a8029c2 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -26,6 +26,7 @

[pve-devel] [PATCH manager 09/12] ui: add window/USBEdit: edit window for usb mappings

2022-07-19 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 manager 08/12] ui: add window/PCIEdit: edit window for pci mappings

2022-07-19 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 | 323 +++ 3 files changed, 340 insertions(+), 1 deletion(-) cr

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

2022-07-19 Thread Dominik Csapak
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 index 7c37c6e..c1b712d 100644 --- a/src/PVE/RPCEnvironment.pm +++ b/src/PVE/RPCEnvironment.pm @@

[pve-devel] [PATCH qemu-server 2/7] PVE/QemuServer: allow mapped pci deviced in config

2022-07-19 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 23fe508..1ff4bce 100644 --- a/PVE/QemuServer/PCI.pm

[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/QemuServer.pm b/PVE/Qem

[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 f

[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/PCIMapSelecto

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

2022-07-19 Thread Dominik Csapak
this series aims to add a cluster-wide device mapping for pci and usb devices. so that an admin can configure a device to be availble for migration and configuring for uses that are non-root built-in are some additional safety checks in contrast to current passthrough, e.g. if pci addresses shift,

[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..82af78f9 100

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

2022-07-19 Thread Dominik Csapak
this adds functionality for the hardwaremap config (as json) the format of the config is like this: { usb => { name => { nodename1 => { /* mapping object */ }, nodename2 => { /* mapping object */ } } }, pci => { /* same as above */ },

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

2022-07-19 Thread Dominik Csapak
this is a cluster wide api call that returns the list of mappings in a manner that is easy to consume by the ui (as a tree) it also automatically includes the validity of mappings on the node where it is called. for a consumer of this api call to get a complete picture, it is necessary to do an a

[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 | 1 + www/manag

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

2022-07-19 Thread Dominik Csapak
adds the basic api calls to list/get/create/update/delete device mappings these api calls are only per node, so it only affects the node specific mapping (thought consistency checks are done for the whole config, e.g if an id exists already on another node with a different type) Signed-off-by: Do

Re: [pve-devel] [PATCH container] fix #4164: use DHCP=yes instead of DHCP=both in systemd-networkd config

2022-07-19 Thread Fabian Grünbichler
On July 19, 2022 1:24 pm, Oguz Bektas wrote: > "both" option is deprecated, this gets rid of the warning in the journal > > Signed-off-by: Oguz Bektas some notion which templates you tested this with, when the deprecation happened in systemd, whether we need a fallback to 'both' for older vers

[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/Migrate.js | 37 +

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

2022-07-19 Thread Dominik Csapak
qemu/HardwareView: with the new Hardware privileges, we want to adapt a few places where we now allow to show the add/edit window with those permissions. form/{PCI,USB}Selector: increase the minHeight property of the PCI/USBSelector, so that the user can see the error message if he has not enoug

[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 Signed-off-by: Dominik Csapak --- www/

Re: [pve-devel] [PATCH container] fix #4164: use DHCP=yes instead of DHCP=both in systemd-networkd config

2022-07-19 Thread Oguz Bektas
On Tue, Jul 19, 2022 at 01:52:37PM +0200, Fabian Grünbichler wrote: > On July 19, 2022 1:24 pm, Oguz Bektas wrote: > > "both" option is deprecated, this gets rid of the warning in the journal > > > > Signed-off-by: Oguz Bektas > > some notion which templates you tested this with, when the deprec

[pve-devel] [PATCH V3 pve-manager 0/2] add iscsi, lvm, lvmthin & zfs storage on all cluster nodes (fix #2822)

2022-07-19 Thread Stefan Hrdlicka
V1 -> V2: # pve-storage * removed because patch is not needed # pve-manager (1/3) * remove storage controller from V1 * added custom ComboBox with API URL & setNodeName function * added scan node selection for iSCSI * scan node selection field no longer send to server ## (optional) pve-manager (

[pve-devel] [PATCH V3 pve-manager 1/2] fix #2822: add lvm, lvmthin & zfs storage for all cluster nodes

2022-07-19 Thread Stefan Hrdlicka
This adds a dropdown box for LVM, LVMThin & ZFS storage options where a cluster node needs to be chosen. As default the current node is selected. It restricts the the storage to be only availabe on the selected node. Signed-off-by: Stefan Hrdlicka --- www/manager6/storage/Base.js| 40 +++

[pve-devel] [PATCH V3 pve-manager 2/2] cleanup: "var" to "let", fix some indentation in related files

2022-07-19 Thread Stefan Hrdlicka
replace all "var" with "let" in files related to patch for ticket 2822 Signed-off-by: Stefan Hrdlicka --- www/manager6/storage/Base.js| 10 +- www/manager6/storage/IScsiEdit.js | 6 +++--- www/manager6/storage/LVMEdit.js | 14 +++--- www/manager6/storage/LvmThinEdi

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

[pve-devel] applied: [PATCH manager] ceph-after-pve-cluster: enable for ceph-volume, disable for ceph-disk

2022-07-19 Thread Thomas Lamprecht
Am 18/07/2022 um 16:09 schrieb Aaron Lauterer: > The ceph-disk service seems to have been removed with octopus (v15) and > we did not yet have them for ceph-volume which could lead to some > startup issues in cases where the pve-cluster service did not start fast > enough. > > Signed-off-by: Aaron

[pve-devel] applied: [PATCH v2 qemu] add two more stable patches

2022-07-19 Thread Thomas Lamprecht
Am 19/07/2022 um 10:19 schrieb Fabian Ebner: > For the io_uring patch, it's not very clear which configurations can > trigger it, but it should be rather uncommon. See qemu commit > be6a166fde652589761cf70471bcde623e9bd72a for a bit more information. > > Signed-off-by: Fabian Ebner > --- > > Cha