* [pve-devel] [PATCH manager] backup: fix #2913 order jobs numerically by VMID
@ 2020-08-04 9:46 Aaron Lauterer
2020-08-11 12:32 ` [pve-devel] applied: " Fabian Grünbichler
0 siblings, 1 reply; 2+ messages in thread
From: Aaron Lauterer @ 2020-08-04 9:46 UTC (permalink / raw)
To: pve-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH manager] backup: fix #2913 order jobs numerically by VMID
2020-08-04 9:46 [pve-devel] [PATCH manager] backup: fix #2913 order jobs numerically by VMID Aaron Lauterer
@ 2020-08-11 12:32 ` Fabian Grünbichler
0 siblings, 0 replies; 2+ messages in thread
From: Fabian Grünbichler @ 2020-08-11 12:32 UTC (permalink / raw)
To: Proxmox VE development discussion
On August 4, 2020 11:46 am, Aaron Lauterer wrote:
> 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
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-11 12:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-04 9:46 [pve-devel] [PATCH manager] backup: fix #2913 order jobs numerically by VMID Aaron Lauterer
2020-08-11 12:32 ` [pve-devel] applied: " Fabian Grünbichler
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal