public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: [pve-devel] applied: [PATCH manager] backup: fix #2913 order jobs numerically by VMID
Date: Tue, 11 Aug 2020 14:32:52 +0200	[thread overview]
Message-ID: <1597149165.wkwa2vmjmd.astroid@nora.none> (raw)
In-Reply-To: <20200804094638.25399-1-a.lauterer@proxmox.com>

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
> 
> 
> 




      reply	other threads:[~2020-08-11 12:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-04  9:46 [pve-devel] " Aaron Lauterer
2020-08-11 12:32 ` Fabian Grünbichler [this message]

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=1597149165.wkwa2vmjmd.astroid@nora.none \
    --to=f.gruenbichler@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal