Skip to content

Deleting snapshots leaves empty directories #7516

Closed

Description

@yadvr

CloudStack doesn't delete snapshot directories when snapshots are deleted. This leaves behind empty directories on the secondary storage's snapshots directory.

As a side-effect of this, very large number of empty directories can cause template/ISO upload failure due to SSVM checking these directories for capacity/limit checks.

ISSUE TYPE
  • Bug Report
COMPONENT NAME
Snapshots, Secondary Storage, SSVM
CLOUDSTACK VERSION
4.17.2.0, 4.18.0.0 (possibly by design all versions of ACS)
CONFIGURATION

Advance zone environment, tested and reproduce this against VMware 6.5u2, 6.7u3 and EL8/KVM.

STEPS TO REPRODUCE
1. Deploy a VM and create volume snapshot of its disks.
2. Delete the volume snapshot once they are backed up.
3. On the secondary storage, the snapshots are stored at the path convention: `snapshots/<volume ID>/<snapshot ID>/<snapshots files or folders>`. Before deletion of the snapshots, you should be able to see snapshots files in the snapshots directory for the specific volume/snapshot.
4. Post-deletion of the snapshots, we see empty directories which aren't removed.
EXPECTED RESULTS
Empty directories aren't kept, but removed
ACTUAL RESULTS
snapshot directories had several empty directories for removed snapshots

Activity

  1. added this to the 4.18.1.0 milestone on May 11, 2023
  2. yadvr commented on May 11, 2023

    @yadvr
    MemberAuthor

    Could be reviewed for the next LTS - 4.18.1.0 or 4.19.0.0 cc @weizhouapache @shwstppr

  3. added a commit that references this issue on May 12, 2023
    2a7d875
  4. added a commit that references this issue on Jun 1, 2023
    0941d01
  5. yadvr commented on Jun 1, 2023

    @yadvr
    MemberAuthor

    Fixed in #7524

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions