The 'order' property is only used for external snapshots. For internal
qcow2 snapshots, when a new snapshot is taken, the ID is one more than
the highest currently present ID. Thus, the order is currently
reversed compared to the one for the external snapshot backing chain,
where images further back in the chain have higher IDs. Just drop the
information, since it is not used. The qcow2 ID cannot be used for the
'id' property for replication either, because two snapshots with the
same name might end up with the same ID, which violates a requirement.

Signed-off-by: Fiona Ebner <[email protected]>
---
 src/PVE/Storage/Plugin.pm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
index 221c872..1fc2b8f 100644
--- a/src/PVE/Storage/Plugin.pm
+++ b/src/PVE/Storage/Plugin.pm
@@ -1916,7 +1916,6 @@ sub volume_snapshot_info {
         my $snapshots = $json_decode->{snapshots};
         for my $snap (@$snapshots) {
             my $snapname = $snap->{name};
-            $info->{$snapname}->{order} = $snap->{id};
             $info->{$snapname}->{timestamp} = $snap->{'date-sec'};
 
         }
-- 
2.47.3



_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to