Re: [pve-devel] [PATCH v2 container 02/10] create_vm: avoid premature write_config caused by update_pct_config

2020-05-05 Thread Fabian Ebner
On 5/5/20 12:02 PM, Thomas Lamprecht wrote: On 5/5/20 10:27 AM, Fabian Ebner wrote: by moving the write_config calls from vmconfig_*_pending to their call sites. The single other call site for update_pct_config in update_vm is also adapted. The update_pct_config call lead to a write_config

[pve-devel] [PATCH manager] Improve storage selection on restore

2020-05-05 Thread Fabian Ebner
efault behavior in the backend is to use the original layout from the backup configuration file, which makes sense to use as the default in the GUI as well. Signed-off-by: Fabian Ebner --- www/manager6/window/Restore.js | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/

Re: [pve-devel] [PATCH manager] Improve storage selection on restore

2020-05-06 Thread Fabian Ebner
On 5/5/20 1:40 PM, Thomas Lamprecht wrote: On 5/5/20 1:20 PM, Fabian Ebner wrote: Previously, the blank '' would be passed along and lead to a parameter verfication failure. For LXC the default behavior in the backend is to use 'local' as the storage, so disallow blank

[pve-devel] [PATCH v2 manager] Improve storage selection on restore

2020-05-06 Thread Fabian Ebner
r in the backend is to use the original layout from the backup configuration file, which makes sense to use as the default in the GUI as well. Signed-off-by: Fabian Ebner --- Changes from v1: * avoid unnecessary ?-operators * better emptyText www/manager6/window/Restore.js | 9 ++---

[pve-devel] [PATCH manager] Fix 2718: GUI: handle localtime option correctly

2020-05-11 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- www/manager6/Utils.js| 7 +++ www/manager6/qemu/Options.js | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index 0cce81d4..24e7f1e2 100644 --- a/www/manager6/Utils.js +++ b/ww

[pve-devel] [PATCH qemu-server] sync_disks: fix check

2020-05-13 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- The real issue is that the shared volumes are scanned here and that happens in the scan_volids call above. I'll try to address that as part of the sync_disks cleanup I'm working on. PVE/QemuMigrate.pm | 4 +++- 1 file changed, 3 insertions(+),

Re: [pve-devel] [PATCH qemu-server] add is_replicated field to migration check result

2020-05-14 Thread Fabian Ebner
On 5/12/20 3:45 PM, Mira Limbeck wrote: For better warnings regarding replicated disks and the ignored target storage, add the 'is_replicated' field to the migration check result. This contains the result of the replication checks. The first one checks if the VM is replicated, and the second one

Re: [pve-devel] [PATCH manager] add warning for replicated disks

2020-05-14 Thread Fabian Ebner
On 5/12/20 3:45 PM, Mira Limbeck wrote: Replicated disks can only be live migrated to the same storage on the target node. Add a warning that mentions that limitation. The warning is only printed when the target node is a replication target. When the target node is not a replication target, the o

[pve-devel] [PATCH qemu-server] Warn if target is not a replication target when live-migrating

2020-05-14 Thread Fabian Ebner
Partially fixes #2728 (GUI part is still needed). Signed-off-by: Fabian Ebner --- PVE/API2/Qemu.pm | 6 ++ 1 file changed, 6 insertions(+) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index fd51bf3..8e993a9 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -3486,6 +3486,12

[pve-devel] [PATCH v2 qemu-server] Fix #2728: die/warn if target is not a replication target when live-migrating

2020-05-18 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- Changes from v1: * die/warn depending on force (thanks to Thomas and Aaron for the suggestion) * don't die/warn if VM is not replicated at all PVE/API2/Qemu.pm | 13 + 1 file changed, 13 insertions(+) diff --git a/PVE/API2/Qemu.pm

[pve-devel] [PATCH v2 manager] Fix 2718: GUI: handle localtime option correctly

2020-05-19 Thread Fabian Ebner
The backend treats an undefined value and 0 differently. If the option is undefined, it will still be set for Windows in config_to_command. Replace the checkbox with a combobox covering all options. Signed-off-by: Fabian Ebner --- Changes from v1: * use a combobox with all options to allow

[pve-devel] [PATCH qemu-server 02/11] update_disksize: make interface leaner

2020-05-20 Thread Fabian Ebner
Pass new size directly, so the function doesn't need to know about how some hash is organized. And return a message directly, instead of both size-strings. Also dropped the wantarray, because both existing callers use the message anyways. Signed-off-by: Fabian Ebner --- PVE/QemuMigra

[pve-devel] [PATCH qemu-server 04/11] Avoid re-scanning all volumes

2020-05-20 Thread Fabian Ebner
by using the information obtained in the first scan. This also makes sure we only scan local storages. Signed-off-by: Fabian Ebner --- PVE/QemuMigrate.pm | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index e65b28f..3b138c4

[pve-devel] [PATCH qemu-server 05/11] Split out config_update_local_disksizes from scan_local_volumes

2020-05-20 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/QemuMigrate.pm | 55 ++ 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 3b138c4..152cb25 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm

[pve-devel] [PATCH qemu-server 06/11] Save targetstorage and bwlimit in local_volumes hash and re-use information

2020-05-20 Thread Fabian Ebner
It is enough to call get_bandwith_limit once for each source_storage. Signed-off-by: Fabian Ebner --- PVE/QemuMigrate.pm | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 152cb25..777ba2e 100644 --- a/PVE

[pve-devel] [PATCH qemu-server 09/11] Simplify removal of local volumes and get rid of self->{volumes}

2020-05-20 Thread Fabian Ebner
elf->{online_local_volumes}, and hence is the place to look for which volumes we need to remove. Of course, replicated volumes still need to be skipped. Signed-off-by: Fabian Ebner --- Who needs phase3 anyways ;)? PVE/QemuMigrate.pm | 45 - 1 file c

[pve-devel] [PATCH qemu-server 08/11] cleanup_remotedisks: simplify and also include those migrated with storage_migrate

2020-05-20 Thread Fabian Ebner
by using the information from volume_map. Call cleanup_remotedisks in phase1_cleanup as well, because that's where we end if sync_disks fails and some disks might already have been transfered successfully. Signed-off-by: Fabian Ebner --- PVE/QemuMigrate.pm | 19 ++- 1

[pve-devel] [PATCH qemu-server 07/11] Add nbd migrated volumes to volume_map earlier

2020-05-20 Thread Fabian Ebner
This makes sure that they are present in volume_map as soon as the remote node tells us, that they have been allocated. Signed-off-by: Fabian Ebner --- Makes the cleanup_remotedisks simplyfication in the next patch possible. Another idea would be to do it in its own loop, after obtaining the

[pve-devel] [PATCH qemu-server 10/11] Use storage_migration for checks instead of online_local_volumes

2020-05-20 Thread Fabian Ebner
Like this we don't need to worry about auto-vivifaction. Signed-off-by: Fabian Ebner --- PVE/QemuMigrate.pm | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index a6f42df..49a0e03 100644 ---

[pve-devel] [PATCH qemu-server 03/11] Split sync_disks into two functions

2020-05-20 Thread Fabian Ebner
by making local_volumes class-accessible. One functions is for scanning all local volumes and one is for actually syncing offline volumes via storage_migrate. Signed-off-by: Fabian Ebner --- PVE/QemuMigrate.pm | 98 ++ 1 file changed, 64 insertions

[pve-devel] [PATCH qemu-server 01/11] sync_disks: fix check

2020-05-20 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- This is a re-send of a previously stand-alone patch. PVE/QemuMigrate.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index b729940..f6baeda 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm

[pve-devel] [PATCH qemu-server 11/11] Keep track of replicated volumes via local_volumes

2020-05-20 Thread Fabian Ebner
by extending filter_local_volumes. Signed-off-by: Fabian Ebner --- PVE/QemuMigrate.pm | 38 +- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 49a0e03..e7d16c7 100644 --- a/PVE/QemuMigrate.pm +++ b

[pve-devel] [PATCH-SERIES qemu-server] Cleanup migration code and improve migration disk cleanup

2020-05-20 Thread Fabian Ebner
merge them somehow. But before thinking too much about those things I wanted to get some feedback for this and ask if this is the right direction to go in. Fabian Ebner (11): sync_disks: fix check update_disksize: make interface leaner Split sync_disks into two functions Avoid re-s

[pve-devel] [PATCH storage] Fix 2763: Revert "storage_migrate: check if target storage supports content type"

2020-05-25 Thread Fabian Ebner
This reverts commit 95015dbbf24b710011965805e689c03923fb830c. parse_volname always gives 'images' and not 'rootdir'. In most cases the volume name alone does not contain the needed information, e.g. vm-123-disk-0 can be both a VM volume or a container volume. Signed-

[pve-devel] [PATCH storage 3/6] Introduce prune-backups property for directory-based storages

2020-06-04 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/Storage/CIFSPlugin.pm | 1 + PVE/Storage/CephFSPlugin.pm| 1 + PVE/Storage/DirPlugin.pm | 5 ++-- PVE/Storage/GlusterfsPlugin.pm | 5 ++-- PVE/Storage/NFSPlugin.pm | 5 ++-- PVE/Storage/PBSPlugin.pm | 1 + PVE/Storage/Plugin.pm

[pve-devel] [PATCH storage 4/6] Add prune_backups to storage API

2020-06-04 Thread Fabian Ebner
Implement it for generic storages supporting backups (i.e. directory-based storages) and add a wrapper for PBS. Signed-off-by: Fabian Ebner --- PVE/Storage.pm | 27 - PVE/Storage/PBSPlugin.pm | 50 PVE/Storage/Plugin.pm | 128 test

[pve-devel] [PATCH storage 6/6] Add API and pvesm calls for prune_backups

2020-06-04 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- Not sure if this is the best place for the new API endpoints. I decided to opt for two distinct calls rather than just using a --dry-run option and use a worker for actually pruning, because removing many backups over the network might take a while. PVE/API2

[pve-devel] [PATCH storage 0/6] partially fix #2649: Introduce prune-backups for storages supporting backups

2020-06-04 Thread Fabian Ebner
ely '{volume}', so it's not possible to create endpoints like '{storage}/content/prunebackups'. Instead, I introduced '{storage}/prunebackups'. Fabian Ebner (6): PBSPlugin: list_volumes: filter by vmid if specified Expand archive_info to include ctime, v

[pve-devel] [PATCH storage 2/6] Expand archive_info to include ctime, vmid and is_std_name

2020-06-04 Thread Fabian Ebner
where 'is_std_name' shows whether the backup name uses the standard naming schema and most likely was created by our tools. Also adds a '^' to the existing filename matching regex, which should be fine since basename() is used beforehand. Signed-off-by: Fabian Ebner

[pve-devel] [PATCH storage 5/6] Whitespace cleanup

2020-06-04 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/API2/Storage/Status.pm | 65 +++--- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/PVE/API2/Storage/Status.pm b/PVE/API2/Storage/Status.pm index 14f5930..d9d9b36 100644 --- a/PVE/API2/Storage/Status.pm +++ b/PVE

[pve-devel] [PATCH storage 1/6] PBSPlugin: list_volumes: filter by vmid if specified

2020-06-04 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/Storage/PBSPlugin.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/PVE/Storage/PBSPlugin.pm b/PVE/Storage/PBSPlugin.pm index 3c0879c..65696f4 100644 --- a/PVE/Storage/PBSPlugin.pm +++ b/PVE/Storage/PBSPlugin.pm @@ -291,6 +291,7 @@ sub list_volumes

Re: [pve-devel] [PATCH v2 manager 1/2] Don't show empty parentheses when size is not known

2020-06-04 Thread Fabian Ebner
Any feedback for these patches? On 5/4/20 10:50 AM, Fabian Ebner wrote: The size of VM state files and the size of unused disks not referenced by any snapshot is not saved in the VM configuration, so it's not available here either. Signed-off-by: Fabian Ebner --- Changes from v1:

Re: [pve-devel] [PATCH storage 4/6] Add prune_backups to storage API

2020-06-04 Thread Fabian Ebner
On 6/4/20 11:08 AM, Fabian Ebner wrote: Implement it for generic storages supporting backups (i.e. directory-based storages) and add a wrapper for PBS. Signed-off-by: Fabian Ebner --- PVE/Storage.pm | 27 - PVE/Storage/PBSPlugin.pm | 50 PVE/Storage/Plugin.pm

[pve-devel] [PATCH v2 storage 01/13] Introduce prune-backups property for directory-based storages

2020-06-10 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/Storage/CIFSPlugin.pm | 1 + PVE/Storage/CephFSPlugin.pm| 1 + PVE/Storage/DirPlugin.pm | 5 ++-- PVE/Storage/GlusterfsPlugin.pm | 5 ++-- PVE/Storage/NFSPlugin.pm | 5 ++-- PVE/Storage/PBSPlugin.pm | 1 + PVE/Storage/Plugin.pm

[pve-devel] [PATCH v2 manager 08/13] Die if dumpdir and storage are both defined

2020-06-10 Thread Fabian Ebner
dumpdir will be overwritten if a storage is specified. Signed-off-by: Fabian Ebner --- New in v2 PVE/VZDump.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index bdbf641e..bc4ac751 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm @@ -449,7

[pve-devel] [PATCH v2 manager 11/13] Make use of archive_info and archive_remove

2020-06-10 Thread Fabian Ebner
to avoid some code duplication. Signed-off-by: Fabian Ebner --- New in v2 PVE/VZDump.pm | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index 6d68ac34..8ef9fbf0 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm

[pve-devel] [PATCH v2 manager 10/13] Simplify how maxfiles is determined

2020-06-10 Thread Fabian Ebner
No functional change is intended. The preference order is: option, then storage config, then vzdump defaults. Signed-off-by: Fabian Ebner --- New in v2 IMHO the old method was very confusing. PVE/VZDump.pm | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/PVE

[pve-devel] [PATCH v2 manager 09/13] storage_info: avoid duplication

2020-06-10 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- New in v2 PVE/VZDump.pm | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index bc4ac751..12c02a2a 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm @@ -84,19 +84,18 @@ sub storage_info

[pve-devel] [PATCH v2 storage 04/13] PBSPlugin: Add print_volid helper

2020-06-10 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- New in v2 PVE/Storage/PBSPlugin.pm | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/PVE/Storage/PBSPlugin.pm b/PVE/Storage/PBSPlugin.pm index fba4b2b..f029e55 100644 --- a/PVE/Storage/PBSPlugin.pm +++ b/PVE/Storage/PBSPlugin.pm

[pve-devel] [PATCH v2 storage 03/13] Add archive_remove

2020-06-10 Thread Fabian Ebner
to keep the removal of the archive and its log file together. Signed-off-by: Fabian Ebner --- New in v2 PVE/Storage.pm | 11 +++ 1 file changed, 11 insertions(+) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index ac0dccd..a459572 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm

[pve-devel] [PATCH v2 storage 06/13] Whitespace cleanup

2020-06-10 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/API2/Storage/Status.pm | 65 +++--- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/PVE/API2/Storage/Status.pm b/PVE/API2/Storage/Status.pm index 14f5930..d9d9b36 100644 --- a/PVE/API2/Storage/Status.pm +++ b/PVE

[pve-devel] [PATCH v2 storage 02/13] Extend archive_info to include filename and logfilename

2020-06-10 Thread Fabian Ebner
Add a test case for this. Signed-off-by: Fabian Ebner --- New in v2 PVE/Storage.pm| 13 - test/archive_info_test.pm | 22 ++ 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 07a4f53..ac0dccd 1

[pve-devel] [PATCH v2 storage 07/13] Add API and pvesm calls for prune_backups

2020-06-10 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/API2/Storage/Makefile| 2 +- PVE/API2/Storage/PruneBackups.pm | 153 +++ PVE/API2/Storage/Status.pm | 7 ++ PVE/CLI/pvesm.pm | 27 ++ 4 files changed, 188 insertions(+), 1 deletion(-) create

[pve-devel] [PATCH-SERIES v2] fix #2649: introduce prune-backups property for storages supporting backups

2020-06-10 Thread Fabian Ebner
e's a regex below '{storage}/content', namely '{volume}', so it's not possible to create endpoints like '{storage}/content/prunebackups'. Instead, I introduced '{storage}/prunebackups'. A dependency bump 'manager -> storage' is needed for

[pve-devel] [PATCH v2 storage 05/13] Add prune_backups to storage API

2020-06-10 Thread Fabian Ebner
Implement it for generic storages supporting backups (i.e. directory-based storages) and add a wrapper for PBS. Signed-off-by: Fabian Ebner --- Changes in v2: * Return actual volid in PBS using the new print_volid helper * Split out prune_mark_backup_group and move it to Storage.pm

[pve-devel] [PATCH v2 manager 13/13] Always use prune-backups instead of maxfiles internally

2020-06-10 Thread Fabian Ebner
For the use case with '--dumpdir', it's not possible to call prune_backups directly, so a little bit of special handling is required there. Note that $opts->{'prune-backups'} is always defined after new() Signed-off-by: Fabian Ebner --- Ne

[pve-devel] [PATCH v2 manager 12/13] Use prune-backups instead of maxfiles when configured

2020-06-10 Thread Fabian Ebner
e next prune is executed. Still, the job with remove=0 does not execute a prune, so: 1. There is a well-defined limit. 2. A job with remove=0 never removes an old backup. Signed-off-by: Fabian Ebner --- New in v2 PVE/VZDump.pm | 83 +++ 1 f

Re: [pve-devel] [PATCH v2 storage 03/13] Add archive_remove

2020-06-29 Thread Fabian Ebner
On 6/15/20 2:01 PM, Thomas Lamprecht wrote: Am 6/10/20 um 1:23 PM schrieb Fabian Ebner: to keep the removal of the archive and its log file together. Signed-off-by: Fabian Ebner --- New in v2 PVE/Storage.pm | 11 +++ 1 file changed, 11 insertions(+) diff --git a/PVE/Storage.pm b

Re: [pve-devel] [PATCH v2 storage 05/13] Add prune_backups to storage API

2020-06-29 Thread Fabian Ebner
On 6/15/20 2:21 PM, Thomas Lamprecht wrote: Am 6/10/20 um 1:23 PM schrieb Fabian Ebner: Implement it for generic storages supporting backups (i.e. directory-based storages) and add a wrapper for PBS. Signed-off-by: Fabian Ebner --- Changes in v2: * Return actual volid in PBS using the

[pve-devel] [PATCH v3 manager 08/13] Die if dumpdir and storage are both defined

2020-06-30 Thread Fabian Ebner
dumpdir will be overwritten if a storage is specified Signed-off-by: Fabian Ebner --- PVE/VZDump.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index dceeb9ca..ce8796d9 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm @@ -449,7 +449,9

[pve-devel] [PATCH v3 storage 04/13] PBSPlugin: Add print_volid helper

2020-06-30 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/Storage/PBSPlugin.pm | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/PVE/Storage/PBSPlugin.pm b/PVE/Storage/PBSPlugin.pm index fba4b2b..f029e55 100644 --- a/PVE/Storage/PBSPlugin.pm +++ b/PVE/Storage/PBSPlugin.pm @@ -88,6

[pve-devel] [PATCH v3 storage 01/13] Introduce prune-backups property for directory-based storages

2020-06-30 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/Storage/CIFSPlugin.pm | 1 + PVE/Storage/CephFSPlugin.pm| 1 + PVE/Storage/DirPlugin.pm | 5 ++-- PVE/Storage/GlusterfsPlugin.pm | 5 ++-- PVE/Storage/NFSPlugin.pm | 5 ++-- PVE/Storage/PBSPlugin.pm | 1 + PVE/Storage/Plugin.pm

[pve-devel] [PATCH v3 storage 02/13] Extend archive_info to include filename and logfilename

2020-06-30 Thread Fabian Ebner
7;). Add a test case for this. Signed-off-by: Fabian Ebner --- PVE/Storage.pm| 13 - test/archive_info_test.pm | 22 ++ 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 07a4f53..ac0dccd 100755 --- a

[pve-devel] [PATCH-SERIES v3] fix #2649: introduce prune-backups property for storages supporting backups

2020-06-30 Thread Fabian Ebner
/content/prunebackups'. Instead, I introduced '{storage}/prunebackups'. A dependency bump 'manager -> storage' is needed for patches #11-#13. storage: Fabian Ebner (7): Introduce prune-backups property for directory-based storages Extend archive_info to include fil

[pve-devel] [PATCH v3 storage 03/13] Add archive_remove

2020-06-30 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- Changes in v3: * die if unlink of archive fails * check whether log file exists before trying to unlink it * warn if unlink of log file fails PVE/Storage.pm | 17 + 1 file changed, 17 insertions(+) diff --git a/PVE/Storage.pm b/PVE

[pve-devel] [PATCH v3 manager 12/13] Use prune-backups instead of maxfiles when configured

2020-06-30 Thread Fabian Ebner
e next prune is executed. Still, the job with remove=0 does not execute a prune, so: 1. There is a well-defined limit. 2. A job with remove=0 never removes an old backup. Signed-off-by: Fabian Ebner --- PVE/VZDump.pm | 83 +++ 1 file changed, 58 in

[pve-devel] [PATCH v3 manager 10/13] Simplify how maxfiles is determined

2020-06-30 Thread Fabian Ebner
No functional change is intended. The preference order is: option, then storage config, then vzdump defaults. Signed-off-by: Fabian Ebner --- IMHO the old method was very confusing. PVE/VZDump.pm | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/PVE/VZDump.pm b

[pve-devel] [PATCH v3 storage 05/13] Add prune_backups to storage API

2020-06-30 Thread Fabian Ebner
Implement it for generic storages supporting backups (i.e. directory-based storages) and add a wrapper for PBS. Signed-off-by: Fabian Ebner --- Changes in v3: * When checking if all keep-options are 0, improve readability by using hash values directly * For creation times in

[pve-devel] [PATCH v3 manager 11/13] make use of archive_info and archive_remove

2020-06-30 Thread Fabian Ebner
to avoid some code duplication. Signed-off-by: Fabian Ebner --- PVE/VZDump.pm | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index b1107eac..e8669665 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm @@ -631,10 +631,15

[pve-devel] [PATCH v3 manager 13/13] Always use prune-backups instead of maxfiles internally

2020-06-30 Thread Fabian Ebner
For the use case with '--dumpdir', it's not possible to call prune_backups directly, so a little bit of special handling is required there. Signed-off-by: Fabian Ebner --- Note that $opts->{'prune-backups'} is always defined after

[pve-devel] [PATCH v3 storage 07/13] Add API and pvesm calls for prune_backups

2020-06-30 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/API2/Storage/Makefile| 2 +- PVE/API2/Storage/PruneBackups.pm | 153 +++ PVE/API2/Storage/Status.pm | 7 ++ PVE/CLI/pvesm.pm | 27 ++ 4 files changed, 188 insertions(+), 1 deletion(-) create

[pve-devel] [PATCH v3 manager 09/13] storage_info: avoid duplication

2020-06-30 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/VZDump.pm | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index ce8796d9..9bdb5ab0 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm @@ -84,19 +84,18 @@ sub storage_info { PVE::Storage

[pve-devel] [PATCH v3 storage 06/13] Whitespace cleanup

2020-06-30 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/API2/Storage/Status.pm | 65 +++--- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/PVE/API2/Storage/Status.pm b/PVE/API2/Storage/Status.pm index 14f5930..d9d9b36 100644 --- a/PVE/API2/Storage/Status.pm +++ b/PVE

[pve-devel] [PATCH qemu-server 3/3] Use new move_config_to_node method

2020-07-01 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- PVE/QemuMigrate.pm | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 96de0db..cd4a005 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -1179,16 +1179,9 @@ sub phase3_cleanup

[pve-devel] [PATCH guest-common 1/3] Add move_config_to_node method

2020-07-01 Thread Fabian Ebner
Allows to mock moving the configuration for testing and reduces duplication between the migration modules by a tiny amount. Signed-off-by: Fabian Ebner --- Dependency bumps container,qemu-server -> guest-common are needed PVE/AbstractConfig.pm | 11 +++ 1 file changed, 11 inserti

[pve-devel] [PATCH container 2/3] Use new move_config_to_node method

2020-07-01 Thread Fabian Ebner
Signed-off-by: Fabian Ebner --- I felt like this makes sense as a single block now (without each line being separated by a blank), but I can send a v2 without that style change if you want. Same for the next patch. src/PVE/LXC/Migrate.pm | 12 ++-- 1 file changed, 2 insertions(+), 10

[pve-devel] [PATCH qemu-server] set resume parameter for vm_start_nolock if there is a vmstate

2020-07-07 Thread Fabian Ebner
nded' lock, but apparently [0] we cannot rely on the lock to be set if and only if there is a vmstate. [0]: https://forum.proxmox.com/threads/task-error-start-failed.72450 Signed-off-by: Fabian Ebner --- PVE/QemuServer.pm | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a

[pve-devel] [PATCH common] Fix 2339: Handle multiple blank lines correctly

2019-08-27 Thread Fabian Ebner
Otherwise two blank lines between sections cause the loop to end prematurely. Signed-off-by: Fabian Ebner --- src/PVE/SectionConfig.pm | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PVE/SectionConfig.pm b/src/PVE/SectionConfig.pm index dcecce6..1bb285f 100644 --- a

<    1   2   3   4   5