Skip to content

Snapshot chain - garbage collection not working as expected #9501

@nxsbi

Description

@nxsbi
ISSUE TYPE
  • Bug Report
COMPONENT NAME
UI
CLOUDSTACK VERSION
4.19.0.1
CONFIGURATION

XCP-Ng backend

OS / ENVIRONMENT

NA

SUMMARY

In Xenserver/XCP_NG backend, when a chain of snapshots exists, the cleanup of old snapshot files is not taking place correctly. Old snapshots contnue to exist, while some in the middle are destroyed and files are deleted as well, but older ones continue to exist.

STEPS TO REPRODUCE
I have not found a sure way to recreate this issue. Here is what I have though - Setup xcp-ng backend, ver 8.2. Set snapshot.delta.max = 7, setup a Volume with Daily Snapshot and Keep =3. 
Over time, you will start seeing this discrepency
EXPECTED RESULTS
The Keep = 3 should get respected, and besides the required chain of the last 3 snapshots, all old snapshot files should physically be deleted.
ACTUAL RESULTS
old files continue to exist. 
Example - 
![image](https://github.com/user-attachments/assets/77bb64c1-af5a-4502-889f-e7e3eadfb6f3)

and Physical file view
I have Keep = 3, I expect that the Aug 6 and Aug 7 files will exist, 
I also expect that Aug 5 file will exist (keep = 3), but since Aug 5 file is part of a chain (by looking at file size), all Files from Jul 30 to Aug 5 need to be kept. 
However, Jul 3, 4 and 6 files should not exist. These files also show as "Ready" in the snapshot_store_ref above. 

![image](https://github.com/user-attachments/assets/a6e42815-a134-442d-bd15-32c839439b72)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Status

    Todo

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions