[pve-devel] [PATCH manager] vzdump: test: add first tests to the guest include logic

2020-04-28 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer --- I forgot the makefile, please ignore the other patch and use this one. test/Makefile | 5 +- test/vzdump_guest_included_test.pl | 190 + 2 files changed, 194 insertions(+), 1 deletion(-) create mode 100755 te

[pve-devel] [PATCH v2 common] print_text_table: handle undefined values in comparision

2020-04-28 Thread Fabian Ebner
by introducing a safe_compare helper. Fixes warnings, e.g. pvesh get /nodes//network would print "use of uninitialized"-warnings if there are inactive network interfaces, because for those, 'active' is undef. Signed-off-by: Fabian Ebner --- Changes from v1: * don't change sort_key depending

Re: [pve-devel] [PATCH v2 common] print_text_table: handle undefined values in comparision

2020-04-28 Thread Oğuz Bektaş
Tested-by: Oguz Bektas > Fabian Ebner hat am 28. April 2020 10:18 geschrieben: > > > by introducing a safe_compare helper. Fixes warnings, e.g. > pvesh get /nodes//network > would print "use of uninitialized"-warnings if there are inactive > network interfaces, because for those, 'active' is

Re: [pve-devel] [PATCH guest-common 2/2] fix 2682: make sure configuration file is up-to-date for lock_config-variants

2020-04-28 Thread Fabian Ebner
This patch breaks container creation for some reason. It'll fail with: unable to create CT : config file already exists I'll investigate why this happens. On 23.04.20 13:51, Fabian Ebner wrote: See [0] for the details. The call tree for the variants is lock_config -> lock_config_full -> lock_con

Re: [pve-devel] [PATCH guest-common 2/2] fix 2682: make sure configuration file is up-to-date for lock_config-variants

2020-04-28 Thread Fabian Ebner
On 28.04.20 13:00, Fabian Ebner wrote: This patch breaks container creation for some reason. It'll fail with: unable to create CT : config file already exist the real error message is: unable to create CT : CT already exists on node '' I pasted the wrong one in a hurry I'll investigate why th

Re: [pve-devel] [PATCH container 1/2] LXC: drop unused imported locking functions

2020-04-28 Thread Fabian Ebner
Played around for a bit with your patches applied on top of mine and found no obvious issue, except for LXC creation [0] which is exposed by my second patch. So for Fabian G.'s patches: Tested-By: Fabian Ebner [0]: https://pve.proxmox.com/pipermail/pve-devel/2020-April/043210.html On 27.04.2

[pve-devel] [PATCH qemu-server] restore: use correct storage for format check for cloudinit drives

2020-04-28 Thread Dominik Csapak
when a backup includes a cloudinit disk on a non-existent storage, the restore fails with 'storage' does not exist this happens because we want to get the format of the disk, by checking the source storage we fix this by using the target storage first and only the source as fallback this will st

[pve-devel] [PATCH storage v5 00/17] Fix: #2124 zstd

2020-04-28 Thread Alwin Antreich
Zstandard (zstd) [0] is a data compression algorithm, in addition to gzip, lzo for our backup/restore. It can utilize multiple core CPUs. But by default it has one compression and one writer thread. Here some quick tests I made on my workstation. The files where placed on a ram disk. And with dd

[pve-devel] [PATCH guest-common v5] Fix: #2124 add zstd support

2020-04-28 Thread Alwin Antreich
Signed-off-by: Alwin Antreich --- PVE/VZDump/Common.pm | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/PVE/VZDump/Common.pm b/PVE/VZDump/Common.pm index 4789a50..909e3af 100644 --- a/PVE/VZDump/Common.pm +++ b/PVE/VZDump/Common.pm @@ -88,7 +88,7 @@ my $confdesc = {

[pve-devel] [PATCH manager v5] Fix #2124: Add support for zstd

2020-04-28 Thread Alwin Antreich
This patch adds the zstd to the compression selection for backup on the GUI and add .zst to the backup file filter. Including zstd as package install dependency. Signed-off-by: Alwin Antreich --- PVE/VZDump.pm| 11 +-- debian/control

[pve-devel] [PATCH storage v5 03/12] test: parse_volname

2020-04-28 Thread Alwin Antreich
Test to reduce the potential for accidental breakage on regex changes. And to make sure that all vtype_subdirs are parsed. Signed-off-by: Alwin Antreich --- PVE/Storage/Plugin.pm | 4 + test/parse_volname_test.pm | 253 + test/run_plugin_tests.pl |

[pve-devel] [PATCH storage v5 05/12] Fix: backup: ctime was from stat not file name

2020-04-28 Thread Alwin Antreich
The vzdump file was passed with the full path to the regex. That regex captures the time from the file name, to calculate the epoch. As the regex didn't match, the ctime from stat was taken instead. This resulted in the ctime shown when the file was changed, not when the backup was made. Signed-o

[pve-devel] [PATCH storage v5 11/12] test: get_subdir

2020-04-28 Thread Alwin Antreich
Co-Authored-by: Dominic Jaeger Signed-off-by: Alwin Antreich --- test/get_subdir_test.pm | 44 test/run_plugin_tests.pl | 1 + 2 files changed, 45 insertions(+) create mode 100644 test/get_subdir_test.pm diff --git a/test/get_subdir_test.pm b/test/get

[pve-devel] [PATCH storage v5 02/12] storage: replace build-in stat occurrences

2020-04-28 Thread Alwin Antreich
with File::stat::stat to minimize variable declarations. And allow to mock this method in tests instead of the perl build-in stat. Signed-off-by: Alwin Antreich --- PVE/Diskmanage.pm | 9 + PVE/Storage/Plugin.pm | 34 ++ 2 files changed, 15 insertions

[pve-devel] [PATCH qemu-server v5 1/2] restore: replace archive format/compression

2020-04-28 Thread Alwin Antreich
regex to reduce the code duplication, as archive_info and decompressor_info provides the same information as well. Signed-off-by: Alwin Antreich --- PVE/QemuServer.pm | 36 ++-- 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE

[pve-devel] [PATCH storage v5 07/12] Fix: path_to_volume_id returned wrong content

2020-04-28 Thread Alwin Antreich
type for backup files. Patch includes changes of the test as well. Signed-off-by: Alwin Antreich --- PVE/Storage.pm | 2 +- test/path_to_volume_id_test.pm | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index bdd6ebc..1

[pve-devel] [PATCH storage v5 09/12] backup: compact regex for backup file filter

2020-04-28 Thread Alwin Antreich
the more compact form of the regex should allow easier addition of new file extensions. Signed-off-by: Alwin Antreich --- PVE/Storage.pm| 4 ++-- PVE/Storage/Plugin.pm | 6 -- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 5df074d

[pve-devel] [PATCH qemu-server v5 2/2] Fix #2124: Add support for zstd

2020-04-28 Thread Alwin Antreich
Signed-off-by: Alwin Antreich --- PVE/QemuServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 265d4f8..fda1acb 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -7165,7 +7165,7 @@ sub complete_backup_archives { my

[pve-devel] [PATCH container v5] Fix: #2124 add zstd

2020-04-28 Thread Alwin Antreich
Signed-off-by: Alwin Antreich --- src/PVE/LXC/Create.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PVE/LXC/Create.pm b/src/PVE/LXC/Create.pm index 52b0b48..39902a2 100644 --- a/src/PVE/LXC/Create.pm +++ b/src/PVE/LXC/Create.pm @@ -123,6 +123,7 @@ sub restore_tar_archive {

[pve-devel] [PATCH storage v5 08/12] Fix: add missing snippets subdir

2020-04-28 Thread Alwin Antreich
since it is a valid content type and adapt the path_to_volume_id_test. Also adds an extra check if all vtype_subdirs are returned. Signed-off-by: Alwin Antreich --- PVE/Storage.pm | 4 test/path_to_volume_id_test.pm | 26 +- 2 files changed, 25 inser

[pve-devel] [PATCH storage v5 01/12] storage: test: split archive format/compressor

2020-04-28 Thread Alwin Antreich
detection into separate functions so they are reusable and easier modifiable. This patch also adds the test for archive_info. Signed-off-by: Alwin Antreich --- test/Makefile | 5 +- PVE/Storage.pm| 79 +--- test/archive_info_test.pm | 125 ++

[pve-devel] [PATCH storage v5 06/12] test: path_to_volume_id

2020-04-28 Thread Alwin Antreich
Test to reduce the potential for accidental breakage on regex changes. Signed-off-by: Alwin Antreich --- test/path_to_volume_id_test.pm | 242 + test/run_plugin_tests.pl | 2 +- 2 files changed, 243 insertions(+), 1 deletion(-) create mode 100644 test/pat

[pve-devel] [PATCH storage v5 10/12] Fix: #2124 storage: add zstd support

2020-04-28 Thread Alwin Antreich
Signed-off-by: Alwin Antreich --- PVE/Storage.pm | 4 +++- PVE/Storage/Plugin.pm | 2 +- test/archive_info_test.pm | 4 +++- test/list_volumes_test.pm | 18 ++ test/parse_volname_test.pm | 6 +++--- test/path_to_volume_id_test.pm | 16 +++

[pve-devel] [PATCH storage v5 12/12] test: filesystem_path

2020-04-28 Thread Alwin Antreich
Signed-off-by: Alwin Antreich --- test/filesystem_path_test.pm | 91 test/run_plugin_tests.pl | 1 + 2 files changed, 92 insertions(+) create mode 100644 test/filesystem_path_test.pm diff --git a/test/filesystem_path_test.pm b/test/filesystem_path_test.

[pve-devel] [PATCH storage v5 04/12] test: list_volumes

2020-04-28 Thread Alwin Antreich
Test to reduce the potential for accidental breakage on regex changes. Co-Authored-by: Dominic Jaeger Signed-off-by: Alwin Antreich --- test/list_volumes_test.pm | 519 ++ test/run_plugin_tests.pl | 6 +- 2 files changed, 524 insertions(+), 1 deletion(-)