[pve-devel] [PATCH qemu-server] fix cloning of cloudinit disks in raw format on file level storages

2020-12-01 Thread Mira Limbeck
We only added the format extension when it was not 'raw'. But on file level storages we always require it. To fix this, always add the format extension if the storage provides the 'path' property. This is the same logic we use in create_disks for cloudinit disks. Signed-off-by: Mira Limbeck ---

[pve-devel] [PATCH v3 qemu-server 4/5] migration: sort volumes migrated with storage_migrate

2020-12-01 Thread Fabian Ebner
Having a deterministic order here is useful for testing. Signed-off-by: Fabian Ebner --- New in v3. PVE/QemuMigrate.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 97af397..5c019fc 100644 --- a/PVE/QemuMigrate.pm +++

[pve-devel] [PATCH v3 qemu-server 5/5] create test environment for migration

2020-12-01 Thread Fabian Ebner
and the associated parts for 'qm start'. Each test will first populate the MigrationTest/run directory with the relevant configuration files and files keeping track of the state of everything necessary. Second, the mock-script for migration is executed, which in turn will execute the 'qm start'

[pve-devel] [PATCH v3 qemu-server 3/5] migration: factor out starting remote tunnel

2020-12-01 Thread Fabian Ebner
so it can be mocked when testing. Signed-off-by: Fabian Ebner --- PVE/QemuMigrate.pm | 119 - 1 file changed, 64 insertions(+), 55 deletions(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index a8f6644..97af397 100644 ---

[pve-devel] [PATCH-SERIES v3] migration tests

2020-12-01 Thread Fabian Ebner
Refactor some code and create a test enviroment for migration. See the last patch for a description of the latter. The first two patches depend on libpve-guest-common-perl >=3.1-3 Changes from v2: * drop already applied patch introducing move_config_to_node helper * rebase on current

Re: [pve-devel] [PATCH pve-manager]: api2:/cluster return intiger format for VMID

2020-12-01 Thread Stefan Reiter
On 01/12/2020 10:42, Dietmar Maurer wrote: On 12/01/2020 10:41 AM Dietmar Maurer wrote: for (my $i = 100; $i < 1; $i++) { - return $i if !defined($idlist->{$i}); + return int($i) if !defined($idlist->{$i}); IMO, this does not solve the problem, because

Re: [pve-devel] [PATCH pve-manager]: api2:/cluster return intiger format for VMID

2020-12-01 Thread Dietmar Maurer
> On 12/01/2020 10:41 AM Dietmar Maurer wrote: > > > > for (my $i = 100; $i < 1; $i++) { > > - return $i if !defined($idlist->{$i}); > > + return int($i) if !defined($idlist->{$i}); > > IMO, this does not solve the problem, because $i is already and int. or does

Re: [pve-devel] [PATCH pve-manager]: api2:/cluster return intiger format for VMID

2020-12-01 Thread Dietmar Maurer
> for (my $i = 100; $i < 1; $i++) { > - return $i if !defined($idlist->{$i}); > + return int($i) if !defined($idlist->{$i}); IMO, this does not solve the problem, because $i is already and int. ___ pve-devel mailing list

Re: [pve-devel] [PATCH pve-manager]: api2:/cluster return intiger format for VMID

2020-12-01 Thread Aaron Lauterer
After taking a quick look, isn't there another instance just above in the code on line 720 which would benefit from the same change? - if (my $vmid = $param->{vmid}) { return $vmid if !defined($idlist->{$vmid}); ^ raise_param_exc({

[pve-devel] [PATCH pve-manager]: api2:/cluster return intiger format for VMID

2020-12-01 Thread Moayad Almalat
When call /cluster/nextid over API, it returns ID as a string format like {"data":"100"}. in the API pve-viewer, the result type is an integer format. Signed-off-by: Moayad Almalat --- PVE/API2/Cluster.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/API2/Cluster.pm

[pve-devel] [PATCH manager 4/4] vzdump: defaults: correctly parse prune-backups and convert maxfiles

2020-12-01 Thread Fabian Ebner
Also simplify handling in new(), now that we never have maxfiles there anymore. Signed-off-by: Fabian Ebner --- PVE/VZDump.pm | 20 ++-- test/vzdump_new_retention_test.pl | 85 +++ 2 files changed, 90 insertions(+), 15 deletions(-) diff --git

[pve-devel] [PATCH manager 1/4] test: add tests for retention parameters for vzdump's new()

2020-12-01 Thread Fabian Ebner
To get a more complete picture, instead of mocking storage_config, PVE::Cluster's get_config is mocked. This ensures that the prune-backups validation and the maxfiles conversion are also called. Signed-off-by: Fabian Ebner --- test/Makefile | 1 +

[pve-devel] [PATCH manager 3/4] vzdump: convert maxfiles CLI parameter to prune-backups

2020-12-01 Thread Fabian Ebner
in preparation to clean up handling in new(). Signed-off-by: Fabian Ebner --- PVE/VZDump.pm | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index 94aa76ab..8574fc94 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm @@

[pve-devel] [PATCH manager 2/4] vzdump: storage_info: adapt to new maxfiles backend behavior

2020-12-01 Thread Fabian Ebner
It's automatically converted to prune-backups when using storage_config() now. Signed-off-by: Fabian Ebner --- PVE/VZDump.pm | 4 1 file changed, 4 deletions(-) diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index c37fa513..94aa76ab 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm @@ -86,15