From: Aaron Lauterer <a.lauterer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] backup: fix #2913 order jobs numerically by VMID
Date: Tue, 4 Aug 2020 11:46:38 +0200 [thread overview]
Message-ID: <20200804094638.25399-1-a.lauterer@proxmox.com> (raw)
At this point, the VMIDs are already numerically sorted by the
PVE::VZDump::check_vmids method. Calling another sort on the array,
especially without `{$a <=> $b}`, resulted in reordering the array
alphabetically.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
PVE/VZDump.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index f80faeff..88437bd7 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -1048,7 +1048,7 @@ sub exec_backup {
}
my $vmlist = PVE::Cluster::get_vmlist();
- foreach my $vmid (sort @{$opts->{vmids}}) {
+ foreach my $vmid (@{$opts->{vmids}}) {
my $guest_type = $vmlist->{ids}->{$vmid}->{type};
my $plugin = $vzdump_plugins->{$guest_type};
next if !$rpcenv->check($authuser, "/vms/$vmid", [ 'VM.Backup' ], $opts->{all});
--
2.20.1
next reply other threads:[~2020-08-04 9:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-04 9:46 Aaron Lauterer [this message]
2020-08-11 12:32 ` [pve-devel] applied: " Fabian Grünbichler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200804094638.25399-1-a.lauterer@proxmox.com \
--to=a.lauterer@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox