VM snapshot merge on KVM can leave volume.path in DB pointing to a file that no longer exists (multi-disk VMs)
- 主要言語
- Java
- スター
- 3.1k
- フォーク
- 1.4k
- 平均マージ
- 6日 19時間
- マージ済み PR(30日)
- 32
説明
Summary:
When deleting a VM snapshot on KVM for a VM with more than one disk, each disk's data gets folded back into its real file one at a time, but CloudStack only gets a single "succeeded or failed" answer for the whole set. If an earlier disk's fold finishes for real but a later disk's then fails or times out, the whole thing is reported as failed, so CloudStack never updates its record for the disk that actually finished. Its database is left pointing to a file that no longer exists, with nothing to catch or fix this later. The VM then fails to start with "Can't find volume:", and the only current fix is to manually correct the database to match the real file.
Steps to reproduce:
1. Create a VM with two or more disks on KVM.
2. Take a VM snapshot, then delete it while the VM has enough disk activity that the merge takes a while (or induce a timeout/communication failure partway through the multi-disk merge).
3. If one disk's merge completes on the host before another disk's merge fails/times out, the completed disk's volumes.path is left stale.
4. Attempt to start the VM. It fails looking for the old file.
Environment where this was observed: KVM, disk-only VM snapshots, VM with 2 disks (ROOT + DATA), primary storage on NFS.
コントリビューションガイド
調査の方向性
まず、マルチディスクのマージにおける KVM のスナップショット削除パスと、その集約結果がボリュームパスをどのように更新するかを追跡します。この issue にはファイル名やテスト名がありません。部分的なマージの失敗を再現し、完了したディスクが有効なデータベースパスを保持し、データベースを手動で修復しなくても VM を起動できることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 領域
- cloud, infrastructure
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100