[pve-devel] applied: [PATCH access-control] api: get user: declare token schema

2022-03-21 Thread Thomas Lamprecht
On 21.03.22 15:29, Wolfgang Bumiller wrote: > Signed-off-by: Wolfgang Bumiller > --- > The tokens are a mapping from tokenid to the token data, so let's > include this in the output specification. > > We don't really make use of additionalProperties like this yet but it > *is* supported in

Re: [pve-devel] [PATCH proxmox-openid-rs] add http proxy support

2022-03-21 Thread Wolfgang Bumiller
On Mon, Mar 21, 2022 at 02:24:54PM +0100, Mira Limbeck wrote: > ureq has support for a HTTP proxy, but no support for HTTPS proxy yet. > > ureq doesn't query `all_proxy` and `ALL_PROXY` environment variables by > itself the way curl does. So set the proxy in code if any of the above > environment

[pve-devel] [PATCH access-control] api: get user: declare token schema

2022-03-21 Thread Wolfgang Bumiller
Signed-off-by: Wolfgang Bumiller --- The tokens are a mapping from tokenid to the token data, so let's include this in the output specification. We don't really make use of additionalProperties like this yet but it *is* supported in PVE::JSONSchema, and it's the only way to clarify what this is

[pve-devel] [PATCH proxmox-openid-rs] add http proxy support

2022-03-21 Thread Mira Limbeck
ureq has support for a HTTP proxy, but no support for HTTPS proxy yet. ureq doesn't query `all_proxy` and `ALL_PROXY` environment variables by itself the way curl does. So set the proxy in code if any of the above environment variables are set. Signed-off-by: Mira Limbeck ---

[pve-devel] [PATCH-SERIES storage/manager/container/qemu-server] improve check_volume_access

2022-03-21 Thread Fabian Ebner
The first patch is in preparation for the import-from API, allowing users with VM.Config.Disk to list images of their VMs. The rest of the series introduces a content type parameter to check_volume_access() for future-proofing. Dependency bumps for storage are needed for the parameter to

[pve-devel] [PATCH storage 3/4] pvesm: extract config: add content type check

2022-03-21 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/CLI/pvesm.pm | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/PVE/CLI/pvesm.pm b/PVE/CLI/pvesm.pm index 190de91..44d15fd 100755 --- a/PVE/CLI/pvesm.pm +++ b/PVE/CLI/pvesm.pm @@ -170,7 +170,14 @@ __PACKAGE__->register_method ({

[pve-devel] [PATCH manager 2/2] api: vzdump: extract config: add content type check

2022-03-21 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/API2/VZDump.pm | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/PVE/API2/VZDump.pm b/PVE/API2/VZDump.pm index 2c0df4c3..1adc169a 100644 --- a/PVE/API2/VZDump.pm +++ b/PVE/API2/VZDump.pm @@ -267,7 +267,14 @@

[pve-devel] [PATCH storage 1/4] check volume access: allow if user has VM.Config.Disk

2022-03-21 Thread Fabian Ebner
Listing guest images should not require Datastore.Allocate in this case. In preparation for adding disk import to the GUI. Signed-off-by: Fabian Ebner --- PVE/Storage.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 6112991..efa304a 100755 ---

[pve-devel] [PATCH storage 4/4] api: file restore: use check_volume_access to restrict content type

2022-03-21 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/API2/Storage/FileRestore.pm | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/PVE/API2/Storage/FileRestore.pm b/PVE/API2/Storage/FileRestore.pm index a4bad44..ccc56e5 100644 --- a/PVE/API2/Storage/FileRestore.pm +++

[pve-devel] [PATCH qemu-server 1/1] api: create/modify: add content type checks

2022-03-21 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/API2/Qemu.pm | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index cb6973f1..1dd0cf28 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -104,7 +104,14 @@ my

[pve-devel] [PATCH container 1/1] api: create/modify: add content type checks

2022-03-21 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- For root@pam, the check is skipped in check_ct_modify_config_perm() (everything is), but I didn't want to refactor the whole function just for this... src/PVE/API2/LXC.pm | 10 +- src/PVE/LXC.pm | 9 - 2 files changed, 17 insertions(+), 2

[pve-devel] [PATCH manager 1/2] pveam: remove: add content type check

2022-03-21 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/CLI/pveam.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/CLI/pveam.pm b/PVE/CLI/pveam.pm index 6c26f209..67a912bd 100644 --- a/PVE/CLI/pveam.pm +++ b/PVE/CLI/pveam.pm @@ -170,7 +170,7 @@ __PACKAGE__->register_method ({ my

[pve-devel] [PATCH storage 2/4] check volume accesss: add content type parameter

2022-03-21 Thread Fabian Ebner
Adding such a check here avoids the need to parse at the call sites in many cases. Signed-off-by: Fabian Ebner --- PVE/Storage.pm | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index efa304a..83760c4 100755 --- a/PVE/Storage.pm +++

[pve-devel] [PATCH v3 container] fix: #3927: Error codes when starting/stopping

2022-03-21 Thread Daniel Tschlatscher
containers Stopping and starting a container that is already in the desired state will not return an error value on the CLI anymore. The same as VMs do, when they are stopped but not running. Signed-off-by: Daniel Tschlatscher --- Changes from v2: return statements are now in the correct

[pve-devel] [PATCH qemu-server] Starting a running VM does not return an error

2022-03-21 Thread Daniel Tschlatscher
code anymore This was adapted to match the behaviour of stopping a VM that's already stopped and the new container patches. Signed-off-by: Daniel Tschlatscher --- PVE/QemuServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index

[pve-devel] [PATCH V2 pve-common 0/1] network: tap_plug: fix mtu bugs

2022-03-21 Thread Alexandre Derumier
changelog v2: - rebase on last git a forum user have reported strange bug with ovs + mtu9000 when switching between 2 ovs bridge with different mtu. (1500 vs 9000) https://forum.proxmox.com/threads/ovs-problem-with-mtu-9000-on-vms-assigned-to-vmbr0.105172/ (user confirmed that this patch fix the

[pve-devel] [PATCH V2 pve-common 1/1] network: tap_plug: fix mtu

2022-03-21 Thread Alexandre Derumier
- ovsint port mtu need to be set with ""ovs-vsctl set mtu-request" - update mtu on already existing interfaces (fwbr,fwln,tap,veth) if existing tap|veth interface is replugged on a different mtu bridge Signed-off-by: Alexandre Derumier --- src/PVE/Network.pm | 31

[pve-devel] [PATCH V2 qemu-server 3/3] migration : add del_nets_bridge_fdb

2022-03-21 Thread Alexandre Derumier
at the end of a live migration, we need to remove old mac entries on source host (vm is not yet stopped), before resume vm on target host Signed-off-by: Alexandre Derumier --- PVE/QemuMigrate.pm| 1 + PVE/QemuServer.pm | 20

[pve-devel] [PATCH V2 qemu-server 0/3] add disable bridge learning feature

2022-03-21 Thread Alexandre Derumier
Allow to disable bridge learning changelog v2: - rebase with $opts->{learning} Alexandre Derumier (3): tap_plug: add support for bridge disable learning vm_start/vm_resume : add_nets_bridge_fdb migration : add del_nets_bridge_fdb PVE/QemuMigrate.pm| 1 +

[pve-devel] [PATCH V2 qemu-server 2/3] vm_start/vm_resume : add_nets_bridge_fdb

2022-03-21 Thread Alexandre Derumier
on vm start (no live migration), we can simply add mac address in fdb. In case of a live migration, we add the mac address just before the resume. Signed-off-by: Alexandre Derumier --- PVE/QemuServer.pm | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git

[pve-devel] [PATCH V2 qemu-server 1/3] tap_plug: add support for bridge disable learning

2022-03-21 Thread Alexandre Derumier
This disabling mac learning && unicast flood for the tap interface for vmstart, we don't add mac directly to fdb. We set it latter if it's a migration or a fresh start. for nic hotplug, we directly add mac to fdb Signed-off-by: Alexandre Derumier --- PVE/QemuServer.pm | 8 +++-

[pve-devel] [PATCH V2 pve-container 1/1] net : add support for bridge disable mac learning

2022-03-21 Thread Alexandre Derumier
Signed-off-by: Alexandre Derumier --- src/PVE/LXC.pm | 16 ++-- src/lxcnetaddbr | 7 ++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index b07d986..c0f7c5e 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -949,8 +949,14 @@

[pve-devel] [PATCH V2 pve-container 0/1] add disable bridge learning feature

2022-03-21 Thread Alexandre Derumier
Allow to disable bridge learning changelog v2: - rebase with $opts->{learning} Alexandre Derumier (1): net : add support for bridge disable mac learning src/PVE/LXC.pm | 16 ++-- src/lxcnetaddbr | 7 ++- 2 files changed, 20 insertions(+), 3 deletions(-) -- 2.30.2

[pve-devel] [PATCH pve-network 0/1] fix bridge-disable-mac-learning

2022-03-21 Thread Alexandre Derumier
- rebase with $opts->{learning} Alexandre Derumier (1): bridge-disable-mac-learning : use $opts for tap_plug PVE/Network/SDN/Zones.pm| 5 +++-- PVE/Network/SDN/Zones/Plugin.pm | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) -- 2.30.2

[pve-devel] [PATCH pve-network 1/1] bridge-disable-mac-learning : use $opts for tap_plug

2022-03-21 Thread Alexandre Derumier
--- PVE/Network/SDN/Zones.pm| 5 +++-- PVE/Network/SDN/Zones/Plugin.pm | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/PVE/Network/SDN/Zones.pm b/PVE/Network/SDN/Zones.pm index 492defd..f8e40b1 100644 --- a/PVE/Network/SDN/Zones.pm +++ b/PVE/Network/SDN/Zones.pm