apache / apache/cloudstack

VM deployment randomly fails on XCP-ng 8.3 due to stale template_spool_ref

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

説明

### problem

We are experiencing intermittent/random VM deployment failures in CloudStack 4.22.1 with XCP-ng 8.3.

During the investigation, we observed that the template copy/base volume associated with the deployment is no longer present in the primary storage. However, the corresponding database entry still exists in the template_spool_ref table.

When CloudStack subsequently attempts to deploy a VM from the affected template, it appears to retrieve the stale storage reference from the database and attempts to access a VDI that no longer exists.

The deployment then fails with an XCP-ng API error indicating that the VDI UUID is invalid.

### versions

Apache CloudStack: 4.22.1
Hypervisor: XCP-ng 8.3
Storage: Presetup [iSCSI]

### The steps to reproduce the bug

VM Launch is failing below is observed in logs:
```

2026-09-08 15:02:51,295 ERROR [o.a.c.e.o.VolumeOrchestrator] (Work-Job-Executor-51:[ctx-21e4a1d0, job-5595/job-5596, ctx-af6a6525]) (logid:0b1aca2f) Unable to create volume [{"name":"ROOT-449","uuid":"6871902e-df60-4d42-9b9a-7dd2851e0c1b"}] due to [com.cloud.utils.exception.CloudRuntimeException: Catch Exception com.xensource.xenapi.Types$UuidInvalid :VDI getByUuid for uuid: 85032e3f-3d1a-4336-af29-4b7039fc71a0 failed due to The uuid you supplied was invalid.].
2026-09-08 15:02:51,295 WARN [c.c.v.ClusteredVirtualMachineManagerImpl] (Work-Job-Executor-51:[ctx-21e4a1d0, job-5595/job-5596, ctx-af6a6525]) (logid:0b1aca2f) Unable to contact resource. com.cloud.exception.StorageUnavailableException: Resource [StoragePool:1] is unreachable: Unable to create volume [{"name":"ROOT-449","uuid":"6871902e-df60-4d42-9b9a-7dd2851e0c1b"}] due to [com.cloud.utils.exception.CloudRuntimeException: Catch Exception com.xensource.xenapi.Types$UuidInvalid :VDI getByUuid for uuid: 85032e3f-3d1a-4336-af29-4b7039fc71a0 failed due to The uuid you supplied was invalid.].
```

### What to do about it?

Should the corresponding template_spool_ref entry be removed or marked appropriately when the template copy is deleted?

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

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

調査の方向性

まず、テンプレートのコピーまたはベースボリュームが削除されたときに template_spool_ref エントリがどのように作成・処理されるかを追跡し、報告された XCP-ng のデプロイ失敗を再現の手がかりとして使用します。適切なクリーンアップ動作を判断し、影響を受けたテンプレートからのデプロイで、存在しない VDI へのアクセスが試行されなくなったことを確認します。

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

評価

技術スタック
java
領域
database, infrastructure
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
説明が足りない
初心者へのやさしさ
45/100

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

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