apache / apache/cloudstack

Orphaned snapshots remain after deleting volumes in CLVM_NG primary storage

オープン
#14,154 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Java
スター
3.1k
フォーク
1.4k
平均マージ
6日 19時間
マージ済み PR(30日)
32

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、CLVM_NG を使用して ACS 4.23 上で記載された volume と snapshot のワークフローを再現し、データベースと GUI のレコードを通じて volume 削除の経路を追跡します。これを明示的な Volume Snapshot 削除の経路と比較します。完了条件は、元の volume を削除してもそれを参照する snapshot が残らず、基盤となる LVM のクリーンアップが引き続き正常に行われることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
backend, cloud, databases
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
58/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。