[pve-devel] [PATCH v2 manager 6/8] sort the skip list numerically

Fabian Ebner f.ebner at proxmox.com
Thu Oct 22 12:30:15 CEST 2020


The skip list was not always sorted if there were external IDs for multiple
external nodes.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 PVE/VZDump.pm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index e1c26b42..2f31c534 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -1060,8 +1060,11 @@ sub exec_backup {
     my $opts = $self->{opts};
 
     debugmsg ('info', "starting new backup job: $self->{cmdline}", undef, 1);
-    debugmsg ('info', "skip external VMs: " . join(', ', @{$self->{skiplist}}))
-	if scalar(@{$self->{skiplist}});
+
+    if (scalar(@{$self->{skiplist}})) {
+	my $skip_string = join(', ', sort { $a <=> $b } @{$self->{skiplist}});
+	debugmsg ('info', "skip external VMs: $skip_string");
+    }
 
     my $tasklist = [];
     my $vzdump_plugins =  {};
-- 
2.20.1






More information about the pve-devel mailing list