[pve-devel] [PATCH common v3 1/4] ldap: handle errors explicitly everywhere instead of simply `die`ing

2023-08-10 Thread Christoph Heiss
Most codepaths already have explicit error handling (by the means of checking the return value), which is essential dead code due to setting `onerror`. As LDAP errors might get presented to users due to upcoming changes, the error location should not be present in these error messages, thus switch

[pve-devel] [PATCH common v3 2/4] section config: allow base properties for {create, update}Schema()

2023-08-10 Thread Christoph Heiss
This works the same way as e.g. get_standard_option does it. Signed-off-by: Christoph Heiss --- Changes v2 -> v3: * New patch; as suggested by Wolfgang src/PVE/SectionConfig.pm | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PVE/SectionConfig.pm b/src/PVE/Secti

[pve-devel] [PATCH access-control v3 3/4] ldap: add opt-in `check-connection` param to perform a bind check

2023-08-10 Thread Christoph Heiss
Removes the dreaded DN regex, instead introducing a optional connect/bind check on creation/update, aligning it with the way PBS does it. Additionally, it has the benefit that instead of letting a sync fail on the first try due to e.g. bad bind credentials, it gives the user some direct feedback w

[pve-devel] [PATCH common/access-control/manager v3 0/4] ldap: check bind connection on realm add/update

2023-08-10 Thread Christoph Heiss
First of, remove the dreaded LDAP DN regex. Further, upon saving a LDAP realm in the UI, it tries to connect & bind using the provided credentials, providing the user with immediate feedback whether they are valid or not. The same approach is already implemented in PBS [0], and I'll plan to imple

[pve-devel] [PATCH manager v3 4/4] ui: ldap: add 'Check connection' checkbox as advanced option

2023-08-10 Thread Christoph Heiss
The checkbox is enabled by default, setting the new `check-connection` parameter. See also [0] for the rationale. [0] https://lists.proxmox.com/pipermail/pve-devel/2023-July/058559.html Signed-off-by: Christoph Heiss --- N.B.: As this uses the newly introduced `check-connection` API parameter, a

[pve-devel] [PATCH installer 2/2] tui: disallow legacy BIOS boot from 4Kn disks for all filesystems

2023-08-10 Thread Christoph Heiss
The GUI installer already has the same rules in place, not allowing to boot from 4Kn disks when booting in legacy BIOS mode. The TUI installer currently only checks that for ZFS RAIDs, so extend that check to all filesystem configurations. Signed-off-by: Christoph Heiss --- proxmox-tui-installer

[pve-devel] [PATCH installer 1/2] raid setup: btrfs: do not allow legacy BIOS boot on 4Kn disks

2023-08-10 Thread Christoph Heiss
This is already checked for LVM and ZFS setups, but not for Btrfs. Add it there too, as it doesn't work anyway. Tested by creating a block device with 4K sectorsize using the following QEMU args: -device virtio-blk,drive=testdrive4k,logical_block_size=4096,physical_block_size=4096 -drive file

[pve-devel] [PATCH installer 0/2] add stricter checks w.r.t. BIOS boot on 4Kn disks

2023-08-10 Thread Christoph Heiss
Booting in legacy BIOS mode on 4Kn disks is generally unsupported, or rather, simply does not work. The GUI installer already checks that properly for LVM and ZFS, but is missing it for Btrfs, so extend the check appropriately. Further, the TUI installer only checked it for ZFS RAIDs, but not for

[pve-devel] [PATCH manager v4 0/2] fix #474: allow transfer from container/vms

2023-08-10 Thread Philipp Hufnagl
When a member of 2 pools wants to transfer a vm/container to an other pool they can not do that. The vm/container would have first to be removed form the current pool resulting in a loss of privileges of the pool member for this vm/contianer. This feature introduces a way to transfer a vm betwe

[pve-devel] [PATCH manager v4 2/2] fix #474: ui: allow transfer from container/vms

2023-08-10 Thread Philipp Hufnagl
A user can no see all vms/containers, even the ones that are already a member of a pool. They can be transfered now after checking the newly introduced "allow transfer" checkbox. Signed-off-by: Philipp Hufnagl --- www/manager6/grid/PoolMembers.js | 17 ++--- 1 file changed, 14 insert

[pve-devel] [PATCH manager v4 1/2] fix #474: api: allow transfer from container/vms

2023-08-10 Thread Philipp Hufnagl
When the newly introduced optional parameter "transfer" is set, the user add a vm/container to a pool even if it is already in one. If so it will be removed from the old pool Signed-off-by: Philipp Hufnagl --- PVE/API2/Pool.pm | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(

Re: [pve-devel] [PATCH manager] fix #474: allow transfer from container/vms

2023-08-10 Thread Philipp Hufnagl
On 8/10/23 09:16, Fiona Ebner wrote: But it should. After all, the operation is modifying the original pool, so the user better have an appropriate permission to do so. Currently, Permissions.Modify|VM.Allocate on the VM and Pool.Allocate on the target pool would be enough to "steal" the gue

[pve-devel] [PATCH v4 qemu-server] fix #3963: Skip TPM startup for template VMs

2023-08-10 Thread Filip Schauer
Skip the software TPM startup when starting a template VM for performing a backup. This fixes an error that occurs when the TPM state disk is write-protected. Signed-off-by: Filip Schauer --- Changes since v3: * Add a comment explaining why not to add a TPM to the command if the VM is a template

Re: [pve-devel] [PATCH access-control v2 2/3] ldap: add opt-in `check-connection` param to perform a bind check

2023-08-10 Thread Wolfgang Bumiller
On Thu, Aug 10, 2023 at 10:35:14AM +0200, Christoph Heiss wrote: > > On Thu, Aug 10, 2023 at 09:55:51AM +0200, Wolfgang Bumiller wrote: > > On Tue, Aug 01, 2023 at 02:37:18PM +0200, Christoph Heiss wrote: > [..] > > > @@ -137,7 +131,13 @@ sub properties { > > > type => 'boolean', > > >

Re: [pve-devel] [PATCH access-control v2 2/3] ldap: add opt-in `check-connection` param to perform a bind check

2023-08-10 Thread Christoph Heiss
On Thu, Aug 10, 2023 at 09:55:51AM +0200, Wolfgang Bumiller wrote: > On Tue, Aug 01, 2023 at 02:37:18PM +0200, Christoph Heiss wrote: [..] > > @@ -137,7 +131,13 @@ sub properties { > > type => 'boolean', > > optional => 1, > > default => 1, > > - } > > + }, > > + 'ch

Re: [pve-devel] [PATCH v3 qemu-server] fix #3963: Skip TPM startup for template VMs

2023-08-10 Thread Fiona Ebner
Am 09.08.23 um 17:24 schrieb Filip Schauer: > Skip the software TPM startup when starting a template VM for performing > a backup. This fixes an error that occurs when the TPM state disk is > write-protected. > > Signed-off-by: Filip Schauer Reviewed-by: Fiona Ebner > --- > Changes since v2: >

Re: [pve-devel] [PATCH access-control v2 2/3] ldap: add opt-in `check-connection` param to perform a bind check

2023-08-10 Thread Wolfgang Bumiller
On Tue, Aug 01, 2023 at 02:37:18PM +0200, Christoph Heiss wrote: > Removes the dreaded DN regex, instead introducing a optional > connect/bind check on creation/update, aligning it with the way PBS does > it. > > Additionally, it has the benefit that instead of letting a sync fail on > the first t

Re: [pve-devel] [PATCH manager] fix #474: allow transfer from container/vms

2023-08-10 Thread Fiona Ebner
Am 09.08.23 um 16:20 schrieb Philipp Hufnagl: > On 8/9/23 13:32, Fiona Ebner wrote: > >> The permission for the original pool should be checked here?! Or is >> that already done somewhere? > > The permission of the original pool does not matter. But it should. After all, the operation is modify

[pve-devel] applied: [PATCH ifupdown2] patch: fix ipv6 slaac on bridge

2023-08-10 Thread Wolfgang Bumiller
On Wed, Aug 09, 2023 at 05:16:06PM +, DERUMIER, Alexandre wrote: > Hi, > > could it be possible to apply this patch ? applied, thanks ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-dev