]> git.proxmox.com Git - pve-storage.git/commitdiff
rbd: list images: sort by keys when pushing on result array
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 9 Apr 2021 11:49:56 +0000 (13:49 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 9 Apr 2021 11:49:56 +0000 (13:49 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/Storage/RBDPlugin.pm

index 1566571e63376c58f2eeac81848a2dad9c82f314..8c4ce4527bea9af505ced6adfe2bcc0fa9a68c29 100644 (file)
@@ -545,7 +545,7 @@ sub list_images {
     my $res = [];
 
     if (my $dat = $cache->{rbd}->{$pool}) {
-       foreach my $image (keys %$dat) {
+       for my $image (sort keys %$dat) {
 
            my $info = $dat->{$image};