apache / apache/cloudstack

Orphaned snapshots remain after deleting volumes in CLVM_NG primary storage

Offen
#14,154 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
Java
Sterne
3.1k
Forks
1.4k
Ø Merge
6 T. 19 Std.
Gemergte PRs (30 T.)
32

Beschreibung

### problem

**Issue: Orphaned snapshots remain after deleting volumes in CLVM_NG primary storage**

I'm seeing an issue with CLVM_NG primary storage where snapshots persist for volumes that have already been deleted.

**Reproduction steps:**
1. Deploy a VM with a single root volume that has an associated volume snapshot.
2. Create a new volume from that snapshot.
3. Detach the root volume from the VM.
4. Attach the newly created volume to the VM.
5. Delete the original volume (the one with the associated snapshot).

**Observed behavior:**
The snapshot remains in the system, still linked to the deleted volume.

**Additional observations:**
- When deleting the volume, I can confirm that the LVM logical volumes (LVs) associated with both the root volume and its snapshot **are** deleted on the KVM hosts. So the underlying storage is cleaned up correctly.
- However, the snapshot entry is **not** removed from the database/GUI
- If I then manually delete the snapshot from the **"Volume Snapshot"** section, the operation reports success and the snapshot is no longer displayed in the GUI. This suggests the deletion works, but only when triggered explicitly against the snapshot record.

**Expected behavior:**
Deleting a volume should also remove (or orphan-clean) any snapshots associated with it, or at minimum the snapshot should no longer reference a non-existent volume.

### versions

ACS: 4.23
Primary storage: CLVM_NG
Hypervisor: Rhel9 KVM

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, den aufgeführten Volume- und Snapshot-Workflow auf ACS 4.23 mit CLVM_NG zu reproduzieren und den Pfad zur Volume-Löschung durch die Datenbank- und GUI-Einträge zu verfolgen. Vergleiche ihn mit dem expliziten Volume Snapshot-Löschungspfad; abgeschlossen ist die Aufgabe, wenn das Löschen des ursprünglichen Volumes keinen Snapshot mehr hinterlässt, der darauf verweist, während die zugrunde liegende LVM-Bereinigung intakt bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
backend, cloud, databases
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
58/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.