[pve-devel] applied: [PATCH qemu-server] test: migrate: correctly mock storage module

2021-02-08 Thread Thomas Lamprecht
On 08.02.21 15:26, Fabian Ebner wrote: > by fixing a typo. Since cfs_read_file within the storage module was not > mocked, > the tests could fail on some setups. Now that get_bandwidth_limit is mocked, > cfs_read_file is not called anymore, but still mock it too for good measure > and > to make i

[pve-devel] applied: [PATCH V2 pve-common] add get_pressure_stat

2021-02-08 Thread Thomas Lamprecht
On 07.02.21 14:36, Alexandre Derumier wrote: > Signed-off-by: Alexandre Derumier > --- > src/PVE/CGroup.pm | 42 ++ > 1 file changed, 42 insertions(+) > > I now actually applied this patch, but followed up with two commits: * unify parsing from host and

[pve-devel] [PATCH qemu-server] test: migrate: correctly mock storage module

2021-02-08 Thread Fabian Ebner
by fixing a typo. Since cfs_read_file within the storage module was not mocked, the tests could fail on some setups. Now that get_bandwidth_limit is mocked, cfs_read_file is not called anymore, but still mock it too for good measure and to make it more future-proof. Reported-by: Fabian Grünbichler

[pve-devel] [PATCH v2 widget-toolkit 2/3] move DiskList.js from grid/ to panel/

2021-02-08 Thread Fabian Ebner
because it's a treepanel now. Signed-off-by: Fabian Ebner --- src/Makefile| 2 +- src/{grid => panel}/DiskList.js | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename src/{grid => panel}/DiskList.js (100%) diff --git a/src/Makefile b/src/Makefile index fbc2627..46b90a

[pve-devel] [PATCH v2 manager 3/3] ui: disk list: include partitions

2021-02-08 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- New in v2 Dependency bump manager -> pve-storage needed, because of the indirect dependency via widget-toolkit using the new API parameter. The dependency manager -> widget-toolkit itself is soft, because the parameter is simply ignored when manager is new and

[pve-devel] [PATCH-SERIES v2] partially fix #2285: extend Diskmanage to also list partitions

2021-02-08 Thread Fabian Ebner
The UI part still remains. Changes from v1: * dropped already applied patches * made sure it's backwards compatible (thanks to Thomas for catching this!) widget-toolkit: Fabian Ebner (2): convert disk list to disk tree and conditionally include partitions move DiskList.js from grid

[pve-devel] [PATCH v2 widget-toolkit 1/3] convert disk list to disk tree and conditionally include partitions

2021-02-08 Thread Fabian Ebner
Assigning the store directly to the treepanel doesn't work, more manual handling is needed. This is mostly based on what we do for PBS's datastore content view. The store monitoring also needs to be changed slightly. The buttons are restricted to work on disks only, based on the parent attribute,

Re: [pve-devel] [PATCH V2 pve-common] add get_pressure_stat

2021-02-08 Thread Thomas Lamprecht
On 07.02.21 14:36, Alexandre Derumier wrote: > Signed-off-by: Alexandre Derumier > --- > src/PVE/CGroup.pm | 42 ++ > 1 file changed, 42 insertions(+) > > diff --git a/src/PVE/CGroup.pm b/src/PVE/CGroup.pm > index 71d0846..cbd77cb 100644 > --- a/src/PVE/CG

[pve-devel] applied: [PATCH v2 common 2/6] format: handle undef, 0, and decimals in render_duration

2021-02-08 Thread Thomas Lamprecht
On 08.02.21 12:15, Stefan Reiter wrote: > Signed-off-by: Stefan Reiter > --- > > This might be a "breaking" change for some situations, but I believe this > should > be more correct in the long run... If this is not wanted, we must do a ceil() > or > similar on the value passed in from patch 4/

[pve-devel] applied: [PATCH v2 common 1/6] extract PVE::Format from PVE::CLIFormatter for reuse

2021-02-08 Thread Thomas Lamprecht
On 08.02.21 12:15, Stefan Reiter wrote: > and add some tests > > Signed-off-by: Stefan Reiter > --- > src/Makefile| 1 + > src/PVE/CLIFormatter.pm | 81 ++--- > src/PVE/Format.pm | 77 +++ > test/format_te

[pve-devel] [PATCH qemu-server] vzdump: add master key support

2021-02-08 Thread Fabian Grünbichler
running outdated VMs without master key support will generate a warning but proceed with a backup without encrypted key upload. Signed-off-by: Fabian Grünbichler --- Notes: requires libpve-storage-perl with master key support. PVE/VZDump/QemuServer.pm | 13 + 1 file changed, 13

[pve-devel] [PATCH v2 storage] pbs: allow setting up a master key

2021-02-08 Thread Fabian Grünbichler
similar to the existing encryption key handling, but without auto-generation since we only have the public part here. Signed-off-by: Fabian Grünbichler --- Notes: v2: only use master key for backup command PVE/API2/Storage/Config.pm | 2 +- PVE/CLI/pvesm.pm | 14 +- PVE/Stor

[pve-devel] [PATCH qemu] pbs: add master key support

2021-02-08 Thread Fabian Grünbichler
this requires a new enough libproxmox-backup-qemu0, and allows querying from the PVE side to avoid QMP calls with unsupported parameters. Signed-off-by: Fabian Grünbichler --- Notes: requires versioned build and runtime dep on libproxmox-backup-qemu with changed API for masterkey support

[pve-devel] [PATCH proxmox-backup-qemu] api: add master key support

2021-02-08 Thread Fabian Grünbichler
this is a breaking change/API extension. Signed-off-by: Fabian Grünbichler --- Notes: requires appropriate Breaks on old pve-qemu-kvm, and versioned build and runtime dep from pve-qemu-kvm on bumped libproxmox-backup-qemu. backwards compat with outdated QEMU + lib versions is ha

[pve-devel] [PATCH-SERIES 0/4] PBS master key integration

2021-02-08 Thread Fabian Grünbichler
this series enables master key integration for PVE->PBS, by allowing the configuration of a per-storage master key which is used for (encrypted) VM and CT backups. while the diffs are small, the following bumps/dependencies/.. are required: proxmox-backup needs a bump (commits from other series)

[pve-devel] [PATCH widget-toolkit 5/5] vlan edit: Match explicit values to name field

2021-02-08 Thread Dominic Jäger
Signed-off-by: Dominic Jäger --- src/node/NetworkEdit.js | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/node/NetworkEdit.js b/src/node/NetworkEdit.js index 9e56360..d1ac454 100644 --- a/src/node/NetworkEdit.js +++ b/src/node/NetworkEdit.js @@ -258,8 +258,22 @@ Ext.define(

[pve-devel] [PATCH widget-toolkit 4/5] vlan edit: Set valid default name

2021-02-08 Thread Dominic Jäger
Using find_next_iface_id we get a valid VLAN name. This way, inserting a vlan raw device is still required (but everything that is inserted so far is valid). Signed-off-by: Dominic Jäger --- Wasn't sure if we want this. Feel free to squash with previous 3/5. src/node/NetworkView.js | 1 + 1 fil

[pve-devel] [PATCH widget-toolkit 3/5] vlan edit: Move example from default value to tooltip

2021-02-08 Thread Dominic Jäger
We usually choose default values that are valid input for the field. interfaceX.1 is rejected by the API. Instead, use a tooltip to demonstrate possible valid inputs for the field. Signed-off-by: Dominic Jäger --- src/node/NetworkEdit.js | 4 src/node/NetworkView.js | 1 - 2 files changed,

[pve-devel] [PATCH widget-toolkit 2/5] vlan edit: Forbid blank vlan raw device

2021-02-08 Thread Dominic Jäger
Users certainly have to insert a vlan raw device when the textfield is enabled. Currently, they only see `invalid network interface name "` when submitting. Forbidding the blank field shows the problem earlier. Signed-off-by: Dominic Jäger --- src/node/NetworkEdit.js | 1 + 1 file changed, 1 ins

[pve-devel] [PATCH widget-toolkit 1/5] vlan edit: Fix automatic field disabling

2021-02-08 Thread Dominic Jäger
The regex are are created as literals (with // and not new RegExp). Therefore - The old Vlan_match value with double \\ has matched e.g. vlan\ddd instead of e.g. vlan123 and - the old VlanInterface_match value with double \\ has matched e.g. \www\X\ instead of e.g. vmbr0.1234 This fix

[pve-devel] [PATCH v2 common 2/6] format: handle undef, 0, and decimals in render_duration

2021-02-08 Thread Stefan Reiter
Signed-off-by: Stefan Reiter --- This might be a "breaking" change for some situations, but I believe this should be more correct in the long run... If this is not wanted, we must do a ceil() or similar on the value passed in from patch 4/6, otherwise it will not print a time value for the first

[pve-devel] [PATCH v2 qemu-server 4/6] savevm: periodically print progress

2021-02-08 Thread Stefan Reiter
Signed-off-by: Stefan Reiter --- v2: * rename helper * return tuple * use 'total-time' * improve messages PVE/QemuConfig.pm | 12 1 file changed, 12 insertions(+) diff --git a/PVE/QemuConfig.pm b/PVE/QemuConfig.pm index 3f4605f..0c4b8fd 100644 --- a/PVE/QemuConfig.pm +++ b/PVE/Qem

[pve-devel] [PATCH v2 common 1/6] extract PVE::Format from PVE::CLIFormatter for reuse

2021-02-08 Thread Stefan Reiter
and add some tests Signed-off-by: Stefan Reiter --- src/Makefile| 1 + src/PVE/CLIFormatter.pm | 81 ++--- src/PVE/Format.pm | 77 +++ test/format_test.pl | 29 ++- 4 files changed, 117 ins

[pve-devel] [PATCH v2 manager 6/6] ui: snapshot: show task viewer for progress log

2021-02-08 Thread Stefan Reiter
Signed-off-by: Stefan Reiter --- v2: * always show task viewer, since with patch 5 we always print something to the task log - I'm honestly fine with whatever here, might as well apply v1 of this or go with Fabians idea and use 'vmstate' as well... www/manager6/window/Snapshot.js | 2 +- 1

[pve-devel] [PATCH v2 qemu-server 5/6] savevm: show information about drives during snapshot

2021-02-08 Thread Stefan Reiter
Signed-off-by: Stefan Reiter --- v2: * use $device PVE/QemuConfig.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PVE/QemuConfig.pm b/PVE/QemuConfig.pm index 0c4b8fd..31b3e36 100644 --- a/PVE/QemuConfig.pm +++ b/PVE/QemuConfig.pm @@ -339,6 +339,8 @@ sub __snapshot_create_vol_snapshot {

[pve-devel] [PATCH v2 qemu-server 3/6] vzdump: use renderers from Tools instead of duplicating code

2021-02-08 Thread Stefan Reiter
...taking card not to lose the custom precision for byte conversion. Signed-off-by: Stefan Reiter --- v2: * add precision parameter to render_bytes now needs a dependency bump on common PVE/VZDump/QemuServer.pm | 64 1 file changed, 13 insertions(+), 5