apache / apache/cloudstack

Orphaned snapshots remain after deleting volumes in CLVM_NG primary storage

Aberta
#14,154 1 comentário 0 reações 0 responsáveis Ver no GitHub
bug
Linguagem predominante
Java
Estrelas
3.1k
Forks
1.4k
Merge médio
6d 19h
PRs com merge (30d)
32

Descrição

### 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

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece reproduzindo o workflow listado de volume e snapshot no ACS 4.23 com CLVM_NG e rastreando o caminho de exclusão do volume pelos registros do banco de dados e da GUI. Compare-o com o caminho explícito de exclusão de Volume Snapshot; considera-se concluído quando a exclusão do volume original não deixar mais um snapshot que faça referência a ele, enquanto a limpeza subjacente do LVM permanece intacta.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
java
Domínio
backend, cloud, databases
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Ativa
Clareza
Razoavelmente clara
Facilidade para iniciantes
58/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.