Skip to content

Whole snapshot chain is lost when the latest snapshot is deleted #9446

Description

@JoaoJandre
ISSUE TYPE
  • Bug Report
COMPONENT NAME
Storage
CLOUDSTACK VERSION
4.19.0
4.19.1
4.19.2
main
CONFIGURATION

N/A

OS / ENVIRONMENT

Env with XenServer

SUMMARY

When deleting a snapshot on XenServer, all of its parents will be erased, causing data loss.

STEPS TO REPRODUCE
1. Create a VM
2. Take a volume snapshot (S1).
3. Access the VM and write some data, for example with: dd if=/dev/zero of=test bs=1M count=1000
4. Use sync to make sure data is written to disk
5. Take a second volume snapshot (S2).
6. Delete the last volume snapshot (S2).
EXPECTED RESULTS
Only the last volume snapshot (S2) is deleted.
ACTUAL RESULTS
On the UI, only the last volume snapshot (S2) is deleted. However, actually, the whole snapshot chain is deleted (S2 AND S1). This can be verified directly on storage or through the snapshot_store_ref table. Any operation with the deleted snapshot (S1) will fail.

Activity

  1. self-assigned this
    on Jul 25, 2024
  2. added this to the 4.19.2.0 milestone on Jul 26, 2024
  3. yadvr commented on Jul 26, 2024

    @yadvr
    Member

    @JoaoJandre do you know if this was a regression in 4.19(.1) or did it happen also with earlier versions?

  4. JoaoJandre commented on Jul 26, 2024

    @JoaoJandre
    ContributorAuthor

    @rohityadavcloud this regression was introduced in 4.19.0.0 (#7873)

  5. modified the milestones: 4.19.2.0, 4.19.1.1 on Jul 29, 2024
  6. added a commit that references this issue on Aug 1, 2024
    9033ab7
  7. added 2 commits that reference this issue on Aug 6, 2024
    7cfbcf4
    6fbdda9
  8. modified the milestones: 4.19.1.1, 4.19.2.0 on Aug 8, 2024
  9. added 2 commits that reference this issue on Aug 22, 2024
    0fa57f5
    514de6e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions