Unable to launch a vm with a template which is direct download template and having nfs metalink
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 58/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- java
- 領域
- cloud, infrastructure
研究方向
從 agent.log 追蹤中顯示的 KVMStorageProcessor 和 MetalinkDirectTemplateDownloader 入口點開始,然後使用 issue 中的 XML 和步驟重現 NFS metalink 啟動流程。追蹤掛載、複製和清理的結果;完成的標準是,使用 NFS metalink 的直接下載範本能夠成功啟動 VM,且不會出現回報的掛載點錯誤和虛假成功錯誤。
由索引模型根據 Issue 內容生成。
描述
problem
Unable to launch a vm with a template which is direct download template and having nfs metalink
versions
ACS 4.22.1
The steps to reproduce the bug
- Create a metalink file
Example
<?xml version="1.0" encoding="UTF-8"?>
<metalink version="3.0" xmlns="http://www.metalinker.org/">
<files>
<file name="ubuntu24-cloud-image-root-password-with-tools.qcow2">
<size>10485760</size>
<resources>
<url type="nfs" preference="100">nfs://10.0.35.201/export/templates/ubuntu24-cloud-image-root-password-with-tools.qcow2</url>
</resources>
</file>
</files>
</metalink>
- Expose it via http server
python3 -m http.server 8081 --bind 0.0.0.0
-
Register it a direct download template in cloudstack
-
Launch a vm
-
Exception in agent.log
2026-08-19 04:36:53,965 DEBUG [cloud.agent.Agent] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Request:Seq 1-6884877930342650195: { Cmd , MgmtId: 32985734710148, via: 1, Ver: v1, Flags: 100011, [{"org.apache.cloudstack.agent.directdownload.MetalinkDirectDownloadCommand":{"url":"http://10.0.35.201:8081/good-nfs.metalink","templateId":"202","destData":{"origUrl":"http://10.0.35.201:8081/good-nfs.metalink","uuid":"e50a9618-71f4-4b68-881a-54a2527d3e02","id":"202","format":"QCOW2","accountId":"2","hvm":"true","displayText":"test-nfs-metalink","imageDataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"24518d40-97cd-3433-bafa-dcb0291c03f9","name":"ref-trl-12221-k-Mol8-kiran-chavala-kvm-pri1","id":"1","poolType":"NetworkFilesystem","host":"10.0.32.4","path":"/acs/primary/ref-trl-12221-k-Mol8-kiran-chavala/ref-trl-12221-k-Mol8-kiran-chavala-kvm-pri1","port":"2049","url":"NetworkFilesystem://10.0.32.4/acs/primary/ref-trl-12221-k-Mol8-kiran-chavala/ref-trl-12221-k-Mol8-kiran-chavala-kvm-pri1/?ROLE=Primary&STOREUUID=24518d40-97cd-3433-bafa-dcb0291c03f9","isManaged":"false"}},"name":"202-2-7772abb0-fd86-32ff-add7-ef855cd70293","size":"(6580590.5000 TB) 7235435666033759572","hypervisorType":"KVM","bootable":"false","uniqueName":"202-2-7772abb0-fd86-32ff-add7-ef855cd70293","directDownload":"true","deployAsIs":"false","followRedirects":"false"},"destPool":{"uuid":"24518d40-97cd-3433-bafa-dcb0291c03f9","name":"ref-trl-12221-k-Mol8-kiran-chavala-kvm-pri1","id":"1","poolType":"NetworkFilesystem","host":"10.0.32.4","path":"/acs/primary/ref-trl-12221-k-Mol8-kiran-chavala/ref-trl-12221-k-Mol8-kiran-chavala-kvm-pri1","port":"2049","url":"NetworkFilesystem://10.0.32.4/acs/primary/ref-trl-12221-k-Mol8-kiran-chavala/ref-trl-12221-k-Mol8-kiran-chavala-kvm-pri1/?ROLE=Primary&STOREUUID=24518d40-97cd-3433-bafa-dcb0291c03f9","isManaged":"false"},"headers":{},"connectTimeout":"5000","soTimeout":"5000","templateSize":"(6580590.5000 TB) 7235435666033759572","format":"QCOW2","followRedirects":"false","wait":"10800","bypassHostMaintenance":"false"}}] }
2026-08-19 04:36:53,965 DEBUG [cloud.agent.Agent] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Processing command: org.apache.cloudstack.agent.directdownload.MetalinkDirectDownloadCommand
2026-08-19 04:36:53,965 DEBUG [storage.resource.StorageSubsystemCommandHandlerBase] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Executing command MetalinkDirectDownloadCommand: [{"url":"http://10.0.35.201:8081/good-nfs.metalink","templateId":202,"destData":{"origUrl":"http://10.0.35.201:8081/good-nfs.metalink","uuid":"e50a9618-71f4-4b68-881a-54a2527d3e02","id":202,"format":"QCOW2","accountId":2,"hvm":true,"displayText":"test-nfs-metalink","imageDataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"24518d40-97cd-3433-bafa-dcb0291c03f9","name":"ref-trl-12221-k-Mol8-kiran-chavala-kvm-pri1","id":1,"poolType":"NetworkFilesystem","host":"10.0.32.4","path":"/acs/primary/ref-trl-12221-k-Mol8-kiran-chavala/ref-trl-12221-k-Mol8-kiran-chavala-kvm-pri1","port":2049,"url":"NetworkFilesystem://10.0.32.4/acs/primary/ref-trl-12221-k-Mol8-kiran-chavala/ref-trl-12221-k-Mol8-kiran-chavala-kvm-pri1/?ROLE=Primary&STOREUUID=24518d40-97cd-3433-bafa-dcb0291c03f9","isManaged":false}},"name":"202-2-7772abb0-fd86-32ff-add7-ef855cd70293","size":7235435666033759572,"hypervisorType":"KVM","bootable":false,"uniqueName":"202-2-7772abb0-fd86-32ff-add7-ef855cd70293","directDownload":true,"deployAsIs":false,"followRedirects":false},"destPool":{"uuid":"24518d40-97cd-3433-bafa-dcb0291c03f9","name":"ref-trl-12221-k-Mol8-kiran-chavala-kvm-pri1","id":1,"poolType":"NetworkFilesystem","host":"10.0.32.4","path":"/acs/primary/ref-trl-12221-k-Mol8-kiran-chavala/ref-trl-12221-k-Mol8-kiran-chavala-kvm-pri1","port":2049,"url":"NetworkFilesystem://10.0.32.4/acs/primary/ref-trl-12221-k-Mol8-kiran-chavala/ref-trl-12221-k-Mol8-kiran-chavala-kvm-pri1/?ROLE=Primary&STOREUUID=24518d40-97cd-3433-bafa-dcb0291c03f9","isManaged":false},"headers":{},"connectTimeout":5000,"soTimeout":5000,"templateSize":7235435666033759572,"format":"QCOW2","followRedirects":false,"wait":10800,"bypassHostMaintenance":false}].
2026-08-19 04:36:53,965 DEBUG [kvm.storage.KVMStorageProcessor] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Verifying temporary location for downloading the template exists on the host
2026-08-19 04:36:53,967 DEBUG [kvm.storage.KVMStorageProcessor] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Checking for free space on the host for downloading the template with physical size: 413 and virtual size: 7235435666033759572
2026-08-19 04:36:53,967 DEBUG [utils.script.Script] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Executing command [/bin/bash -c df --output=avail /var/lib/libvirt/images -B 1 | tail -1 ].
2026-08-19 04:36:53,973 DEBUG [utils.script.Script] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Successfully executed process [68470] for command [/bin/bash -c df --output=avail /var/lib/libvirt/images -B 1 | tail -1 ].
2026-08-19 04:36:53,973 INFO [kvm.storage.LibvirtStorageAdaptor] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Trying to fetch storage pool 24518d40-97cd-3433-bafa-dcb0291c03f9 from libvirt
2026-08-19 04:36:53,974 DEBUG [kvm.resource.LibvirtConnection] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Looking for libvirtd connection at: qemu:///system
2026-08-19 04:36:53,978 DEBUG [kvm.storage.LibvirtStorageAdaptor] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Successfully refreshed pool 24518d40-97cd-3433-bafa-dcb0291c03f9 Capacity: (3.4170 TB) 3757022642176 Used: (2.7297 TB) 3001299238912 Available: (703.82 GB) 755723403264
2026-08-19 04:36:53,987 ERROR [cloud.utils.UriUtils] (AgentRequest-Handler-3:[]) (logid:fe7c1979) no hash tag in XML response...
2026-08-19 04:36:53,987 INFO [direct.download.MetalinkDirectTemplateDownloader] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Metalink downloader created, metalink URL: http://10.0.35.201:8081/good-nfs.metalink parsed - 1 urls and 0 checksums found
2026-08-19 04:36:53,987 DEBUG [kvm.storage.KVMStorageProcessor] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Trying to download template
2026-08-19 04:36:53,987 INFO [direct.download.MetalinkDirectTemplateDownloader] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Trying to download Template from URL: nfs://10.0.35.201/export/templates/ubuntu24-cloud-image-root-password-with-tools.qcow2
2026-08-19 04:36:53,987 DEBUG [utils.script.Script] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Executing command [/bin/bash -c mount -t nfs 10.0.35.201:/export/templates/ubuntu24-cloud-image-root-password-with-tools.qcow2 /mnt/e460cef8-0a57-4080-878f-ddcb1abf4f04 ].
2026-08-19 04:36:53,999 WARN [utils.script.Script] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Execution of process [68473] for command [/bin/bash -c mount -t nfs 10.0.35.201:/export/templates/ubuntu24-cloud-image-root-password-with-tools.qcow2 /mnt/e460cef8-0a57-4080-878f-ddcb1abf4f04 ] failed.
2026-08-19 04:36:53,999 DEBUG [utils.script.Script] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Exit value of process [68473] for command [/bin/bash -c mount -t nfs 10.0.35.201:/export/templates/ubuntu24-cloud-image-root-password-with-tools.qcow2 /mnt/e460cef8-0a57-4080-878f-ddcb1abf4f04 ] is [32].
2026-08-19 04:36:53,999 WARN [utils.script.Script] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Process [68473] for command [/bin/bash -c mount -t nfs 10.0.35.201:/export/templates/ubuntu24-cloud-image-root-password-with-tools.qcow2 /mnt/e460cef8-0a57-4080-878f-ddcb1abf4f04 ] encountered the error: [mount.nfs: mount point /mnt/e460cef8-0a57-4080-878f-ddcb1abf4f04 does not exist].
2026-08-19 04:36:53,999 DEBUG [utils.script.Script] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Executing command [/bin/bash -c cp /mnt/e460cef8-0a57-4080-878f-ddcb1abf4f04/export/templates/ubuntu24-cloud-image-root-password-with-tools.qcow2 null/null/template/n/null/96fa2884-a398-48f9-acb6-7d00e894520f.qcow2 ].
2026-08-19 04:36:54,005 WARN [utils.script.Script] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Execution of process [68475] for command [/bin/bash -c cp /mnt/e460cef8-0a57-4080-878f-ddcb1abf4f04/export/templates/ubuntu24-cloud-image-root-password-with-tools.qcow2 null/null/template/n/null/96fa2884-a398-48f9-acb6-7d00e894520f.qcow2 ] failed.
2026-08-19 04:36:54,006 DEBUG [utils.script.Script] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Exit value of process [68475] for command [/bin/bash -c cp /mnt/e460cef8-0a57-4080-878f-ddcb1abf4f04/export/templates/ubuntu24-cloud-image-root-password-with-tools.qcow2 null/null/template/n/null/96fa2884-a398-48f9-acb6-7d00e894520f.qcow2 ] is [1].
2026-08-19 04:36:54,006 WARN [utils.script.Script] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Process [68475] for command [/bin/bash -c cp /mnt/e460cef8-0a57-4080-878f-ddcb1abf4f04/export/templates/ubuntu24-cloud-image-root-password-with-tools.qcow2 null/null/template/n/null/96fa2884-a398-48f9-acb6-7d00e894520f.qcow2 ] encountered the error: [cp: cannot stat '/mnt/e460cef8-0a57-4080-878f-ddcb1abf4f04/export/templates/ubuntu24-cloud-image-root-password-with-tools.qcow2': No such file or directory].
2026-08-19 04:36:54,006 DEBUG [utils.script.Script] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Executing command [/bin/bash -c umount /mnt/e460cef8-0a57-4080-878f-ddcb1abf4f04 ].
2026-08-19 04:36:54,011 WARN [utils.script.Script] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Execution of process [68476] for command [/bin/bash -c umount /mnt/e460cef8-0a57-4080-878f-ddcb1abf4f04 ] failed.
2026-08-19 04:36:54,011 DEBUG [utils.script.Script] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Exit value of process [68476] for command [/bin/bash -c umount /mnt/e460cef8-0a57-4080-878f-ddcb1abf4f04 ] is [32].
2026-08-19 04:36:54,011 WARN [utils.script.Script] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Process [68476] for command [/bin/bash -c umount /mnt/e460cef8-0a57-4080-878f-ddcb1abf4f04 ] encountered the error: [umount: /mnt/e460cef8-0a57-4080-878f-ddcb1abf4f04: no mount point specified.].
2026-08-19 04:36:54,011 INFO [direct.download.MetalinkDirectTemplateDownloader] (AgentRequest-Handler-3:[]) (logid:fe7c1979) Successfully downloaded Template from URL: nfs://10.0.35.201/export/templates/ubuntu24-cloud-image-root-password-with-tools.qcow2
What to do about it?
Should be able to successfully launch a vm from metalink url which has a nfs file
- 主要語言
- Java
- 星號
- 3.1k
- 分支
- 1.4k
- 平均合併
- 6 天 20 小時
- 30 天內合併 PR
- 27
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
apache/cloudstack 的其他 Issue
-
bug
難度 1/5 1 小時以內 新手友好度 90/100
apache/cloudstack#14222 ·
-
bug component:kubernetes
難度 1/5 1 小時以內 新手友好度 88/100
apache/cloudstack#14180 ·
-
bug component:projects component:UI
難度 1/5 1 小時以內 新手友好度 88/100
apache/cloudstack#14070 · 5 則留言 ·
-
component:backup
難度 2/5 1-3 小時 新手友好度 76/100
apache/cloudstack#14013 ·
-
KVM agent fails to connect to Ceph RBD storage pool after upgrading Ceph client to Tentacle 20.2.4 未關閉bug component:ceph
難度 2/5 1-3 小時 新手友好度 78/100
apache/cloudstack#13989 · 3 則留言 ·
查看 apache/cloudstack 的全部 Issue
相似的 Issue
-
area/plugin
難度 2/5 1-3 小時 新手友好度 75/100
kestra-io/plugin-kestra#190 ·
-
難度 2/5 1-3 小時 新手友好度 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
bug
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt 未關閉
難度 2/5 1-3 小時 新手友好度 75/100
apache/rocketmq-dashboard#5064 ·