SystemVM template registration failure in upgrading to 4.22
- 主要言語
- Java
- スター
- 3.1k
- フォーク
- 1.4k
- 平均マージ
- 6日 19時間
- マージ済み PR(30日)
- 32
説明
### problem
When upgrading an environment on 4.20.1 with KVM,VMware and Xenserver hypervisors the upgrade process reported an error in upgrading HyperV SystemVM template.
Workaround : Download the template from https://download.cloudstack.org/systemvm/4.22/systemvmtemplate-4.22.0-x86_64-hyperv.vhd.zip to /usr/share/cloudstack-management/templates/systemvm/ on the management server before upgrade. Or use the old method to register the systemVM templates after restarting the service.
```
2025-11-14 05:55:59,844 DEBUG [c.c.u.SystemVmTemplateRegistration] (main:[]) (logid:) /usr/share/cloudstack-management/templates/systemvm/systemvmtemplate-4.22.0-x86_64-hyperv.vhd.zip is not present
2025-11-14 05:55:59,844 ERROR [o.a.c.u.s.DigestHelper] (main:[]) (logid:) Failed to calculate sha512 checksum of template
2025-11-14 05:55:59,847 ERROR [c.c.u.SystemVmTemplateRegistration] (main:[]) (logid:) Exception while registering/updating system VM templates for hypervisors in metadata com.cloud.utils.exception.CloudRuntimeException: Failed to register 4.22.0 templates for hypervisors: [vmware,xenserver,kvm-x86_64,hyperv]. Cannot upgrade system VMs
at com.cloud.upgrade.SystemVmTemplateRegistration.registerOrUpdateSystemVmTemplate(SystemVmTemplateRegistration.java:1040)
```
### versions
4.20.1
### The steps to reproduce the bug
Upgrade 4.20.1 to .422 with KVM,VMware and Xenserver
### What to do about it?
Something is wrong in the upgrade process, needs to be fixed. The issue was not seen when upgraded to RC versions of 4.22, only with KVM.
コントリビューションガイド
調査の方向性
SystemVmTemplateRegistration.java:1040 の com.cloud.upgrade.SystemVmTemplateRegistration.registerOrUpdateSystemVmTemplate から始め、/usr/share/cloudstack-management/templates/systemvm/ にある欠落した HyperV テンプレートについてアップグレードログを確認してください。記載されているハイパーバイザーを使用して 4.20.1 から 4.22 へのアップグレードを再現し、その後、4.22 の SystemVM テンプレートが checksum エラーや Cannot upgrade system VMs エラーなしで登録されることを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- cloud, infrastructure
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100