Re: [pve-devel] [PATCH v2 container] lxc start: warn in case of conflicting lxc.idmap entries

2023-05-12 Thread Wolfgang Bumiller
On Tue, May 02, 2023 at 05:05:36PM +0200, Friedrich Weber wrote: > Users can customize the mapping between host and container uids/gids > by providing `lxc.idmap` entries in the container config. The syntax > is described in lxc.container.conf(5). One source of errors are > conflicting entries for

Re: [pve-devel] [PATCH v2 container] lxc start: warn in case of conflicting lxc.idmap entries

2023-05-12 Thread Friedrich Weber
Thanks for the review! On 12/05/2023 11:19, Wolfgang Bumiller wrote: >> So to report *all* conflicts, we'd need an algorithm that keeps track >> of all currently active intervals while iterating. I'm open for > > ^ Only the end really. I think you're right, we only need to track the endp

Re: [pve-devel] [PATCH RFC container manager] Introduce cloud-init support for LXC

2023-05-12 Thread Wolfgang Bumiller
On Thu, May 11, 2023 at 01:12:44PM +0200, Leo Nunner wrote: > This series introduces basic cloudinit support for containers. All in > all, it works quite similar to VMs, with the caveat that we only allow > network configuration through the alrady existing systems, and not via > cloud-init. > > Th

[pve-devel] [PATCH http-server 2/2] use proper arrays for array parameter

2023-05-12 Thread Dominik Csapak
since there is no other way to get an array parameter when using x-www-form-urlencoded content type the previous format with \0 separated strings (known as '-alist' format) should not be used anymore (in favor of the now supported arrays) Signed-off-by: Dominik Csapak --- this technically breaks

[pve-devel] [PATCH manager 1/1] vzdump: prepare 'exclude-path' for array format

2023-05-12 Thread Dominik Csapak
we want to move the 'exclude-path' to an array format (from 'string-alist') prepare the code that it can be either a string or a list Signed-off-by: Dominik Csapak --- PVE/VZDump.pm | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/PVE/VZDump.pm b/PVE/VZD

[pve-devel] [PATCH common 1/3] JSONSchema: add support for array parameter in api calls, cli and config

2023-05-12 Thread Dominik Csapak
only three small things were missing for it to work: * on the cli, we have to get the option as an array if the type is an array * the untainting must be done recursively, otherwise, the regex matching converts an array hash into the string 'ARRAY(0x123412341234)' * JSONSchema::parse_config did n

[pve-devel] [PATCH common/manager/http/guest/qemu-server] schema/config array support

2023-05-12 Thread Dominik Csapak
and removal of the '-alist' format This series aims to implement array support for the api and (section)config and remove the support for the (rarely used) '-alist' formats. currently sending arrays over the api (by sending a parameter multiple times with form-urlencoded) results in the api call

[pve-devel] [PATCH common 3/3] JSONSchema: disable '-alist' format

2023-05-12 Thread Dominik Csapak
this should not be needed anymore since we can now use a simple array in the api instead Signed-off-by: Dominik Csapak --- this breaks all packages which have an '-alist' format defined src/PVE/JSONSchema.pm | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/

[pve-devel] [PATCH http-server 1/2] proxy request: forward json content type and parameters

2023-05-12 Thread Dominik Csapak
instead of always trying to encode them as x-www-form-urlencoded Signed-off-by: Dominik Csapak --- src/PVE/APIServer/AnyEvent.pm | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm index b2ae99b..e9d87

[pve-devel] [PATCH v2 common 2/3] section config: implement array support

2023-05-12 Thread Dominik Csapak
enables section configs in the style of: type: id property value property value2 property value3 can be combined with property strings the provided create and update schema just pass through the array type to the api, so the api call must always contain the complete array

[pve-devel] [PATCH guest-common 1/1] vzdump: change 'exclude-path' from alist to an array format

2023-05-12 Thread Dominik Csapak
to get rid of the '-alist' format Signed-off-by: Dominik Csapak --- src/PVE/VZDump/Common.pm | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/PVE/VZDump/Common.pm b/src/PVE/VZDump/Common.pm index 4b0e8e0..7d3c311 100644 --- a/src/PVE/VZDump/Common.pm +++ b/src/PVE/V

[pve-devel] [PATCH qemu-server 1/1] api: switch agent api call to 'array' type

2023-05-12 Thread Dominik Csapak
we don't want to use the '-alist' formats anymore in favor of real arrays Signed-off-by: Dominik Csapak --- PVE/API2/Qemu/Agent.pm | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/PVE/API2/Qemu/Agent.pm b/PVE/API2/Qemu/Agent.pm index 5ff1fa9d..dceee770 100644 -

[pve-devel] [PATCH qemu-server v2 3/6] migration: fail when aliased volume is detected

2023-05-12 Thread Aaron Lauterer
Aliased volumes (referencing the same disk image multiple times) can lead to unexpected behavior in a migration. Therefore, stop the migration in such a case. The check works by comparing the path returned by the storage plugin. This means that we should be able to catch the common situations whe

[pve-devel] [PATCH qemu-server v2 4/6] tests: add migration alias check

2023-05-12 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer --- test/run_qemu_migrate_tests.pl | 55 ++ 1 file changed, 55 insertions(+) diff --git a/test/run_qemu_migrate_tests.pl b/test/run_qemu_migrate_tests.pl index a2c7d0c..9e2983a 100755 --- a/test/run_qemu_migrate_tests.pl +++ b/test/ru

[pve-devel] [PATCH container v2 6/6] migration: fail when aliased volume is detected

2023-05-12 Thread Aaron Lauterer
Aliased volumes (referencing the same volume multiple times) can lead to unexpected behavior in a migration. Therefore, stop the migration in such a case. The check works by comparing the path returned by the storage plugin. This means that we should be able to catch the common situations where i

[pve-devel] [PATCH qemu-server v2 2/6] tests: add migration test for pending disk

2023-05-12 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer --- test/run_qemu_migrate_tests.pl | 65 ++ 1 file changed, 65 insertions(+) diff --git a/test/run_qemu_migrate_tests.pl b/test/run_qemu_migrate_tests.pl index fbe87e6..a2c7d0c 100755 --- a/test/run_qemu_migrate_tests.pl +++ b/test/ru

[pve-devel] [PATCH qemu-server, container v2 0/6] migration: don't scan all storages, fail on aliases

2023-05-12 Thread Aaron Lauterer
v1 was the series: avoid migrating disk images multiple times We decided to take a different approach to avoid migrating potentially aliased disk images / volumes in a migration. Do not scan the storages for potential images belonging to the guest. Only migrate images referenced in the config. Th

[pve-devel] [PATCH container v2 5/6] migration: only migrate volumes used by the guest

2023-05-12 Thread Aaron Lauterer
When scanning all configured storages for volumes belonging to the container, the migration could easily fail if a storage is not available, but enabled. That storage might not even be used by the container at all. By not doing that and only looking at the disk images referenced in the config, we

[pve-devel] [PATCH qemu-server v2 1/6] migration: only migrate disks used by the guest

2023-05-12 Thread Aaron Lauterer
When scanning all configured storages for disk images belonging to the VM, the migration could easily fail if a storage is not available, but enabled. That storage might not even be used by the VM at all. By not doing that and only looking at the disk images referenced in the VM config, we can avo

[pve-devel] [PATCH qemu 2/5] d/rules: set job flag for make based on DEB_BUILD_OPTIONS

2023-05-12 Thread Fiona Ebner
Copied from Debian's QEMU package's d/rules. Otherwise, ninja will end up using only a single job (in Debian Bookworm/Proxmox VE 8). Suggested-by: Fabian Grünbichler Signed-off-by: Fiona Ebner --- debian/rules | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian/rules b/debian/rules in

[pve-devel] [PATCH qemu 1/5] d/rules: drop virtiofsd switch

2023-05-12 Thread Fiona Ebner
virtiofsd is no longer part of QEMU 8.0. It got replaced by a separate implementation written in Rust, which will be its own package. See QEMU commit 0aaf44776e ("Merge tag 'pull-virtiofs-20230216b' of https://gitlab.com/dagrh/qemu into staging"). Signed-off-by: Fiona Ebner --- debian/rules | 1

[pve-devel] [PATCH-SERIES qemu] update to QEMU 8.0

2023-05-12 Thread Fiona Ebner
After weeks and weeks of (sometimes painful) debugging, it's finally here. And got a load of stable fixes on top already. More testing is always appreciated, especially backup, PBS live restore and snapshots, which needed quite a few changes! I'm planning to squash many of the backup-related patch

[pve-devel] [PATCH qemu 5/5] PVE backup: don't call no_co_wrapper function from coroutine

2023-05-12 Thread Fiona Ebner
Namely, pvebackup_co_prepare() needs to call bdrv_co_open() rather than bdrv_open(), because it is a coroutine itself. Signed-off-by: Fiona Ebner --- Sorry that this is not already in the rebase patch-patch, didn't notice earlier, because this is only in the BACKUP_FORMAT_DIR case. This is what

Re: [pve-devel] [PATCH pve-container 1/1] Adding new mount point type named 'zfs' to let configure a ZFS dataset as mount point for LXC container

2023-05-12 Thread Konstantin via pve-devel
--- Begin Message --- Hello, /> nit: for single patches, there is no need to add a coverletter. also, please include relevant information in the commit message!/ I'm new here, so sorry - will follow rules in future. />//could you give a reason why you want to hide the container contents from

[pve-devel] [PATCH qemu 4/5] add stable patches for 8.0.0

2023-05-12 Thread Fiona Ebner
Changes to other patches are all just metadata/context changes except for pvebackup_co_prepare() needing to call bdrv_co_unref() rather than bdrv_unref(), because it is a coroutine itself. This is documented in d6ee2e324e ("block-coroutine-wrapper: Introduce no_co_wrapper"). The change is necessary