Skip to content

Deleting snapshots leaves empty directories #7516

@yadvr

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions