You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: vm is not created for a direct download setup #9772
KVM, Advanced zone, Linstor Primary, NFS Secondary, Alpine Linux ISO setup with a "Direct Download" knob
OS / ENVIRONMENT
Ubuntu 24.04.1
SUMMARY
VM won't start for an ISO installed with the "direct download" feature. The full log is here
STEPS TO REPRODUCE
- Install ACS
- Setup an Advanced Zone
- Add a KVM host
- Prepare/test/validate Linstor cluster
- Create Primary Storage with Linstor
- Create Secondary Storage with NFS
- Start a zone
- Make sure to run 2 SytemVMs
- Create a VPC
- Create a VPC network
- Install Alpine Linux ISO with the "Direct Download" feature
- Create and run VM
EXPECTED RESULTS
VM is created
ACTUAL RESULTS
VM create fails with the following error: Unable to complete AsyncJobVO: {id:42, userId: 2, accountId: 2, instanceType: null, instanceId: null, cmd: com.cloud.vm.VmWorkStart, cmdInfo: XRocmVzaG9sZHhwP0AAAAAAAAx3CAAAABAAAAABdAAKVm1QYXNzd29yZHQAHHJPMEFCWFFBRG5OaGRtVmtYM0JoYzNOM2IzSmt4cA, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 178597682375863, completeMsid: null, lastUpdated: null, lastPolled: null, created: Sat Oct 05 20:42:39 MSK 2024, removed: null}, job origin: 41 java.lang.ClassCastException: class com.cloud.agent.api.Answer cannot be cast to class org.apache.cloudstack.agent.directdownload.DirectDownloadAnswer (com.cloud.agent.api.Answer and org.apache.cloudstack.agent.directdownload.DirectDownloadAnswer are in unnamed module of loader 'app')
Hi @tampler, from what I see in the log the VM is not created because the template couldn't be created on the primary storage with direct download
2024-10-05 20:43:17,524 DEBUG [c.c.a.m.ClusteredAgentManagerImpl] (Work-Job-Executor-10:[ctx-2d567a50, job-41/job-42, ctx-f880dc5b]) (logid:d5e2ac24) Details from executing class org.apache.cloudstack.agent.directdownload.HttpsDirectDownloadCommand: java.lang.NullPointerException: Cannot invoke "com.cloud.hypervisor.kvm.storage.KVMPhysicalDisk.getSize()" because "template" is null at com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.handleDownloadTemplateToPrimaryStorage(KVMStorageProcessor.java:2462)
I think Linstor doesn't support this feature from what I saw in the code
@slavkap One of the things that concern me is the status of SSVM. I highlighted "Agent State = Off" on the picture above, which indicates invalid SSVM state.
For me, using "Direct Download" feature is a workaround for invalid SSVM setup 😏 , which is another issue and is covered in #9746. I used to use Primary NFS and that option worked well for me ☝️
Now I'd love to switch to the Linstor Primary and this feature won't work. @rp - let me know if you need more info about Linstor setup or related info 🙏
Activity
slavkap commentedon Oct 7, 2024
Hi @tampler, from what I see in the log the VM is not created because the template couldn't be created on the primary storage with direct download
I think Linstor doesn't support this feature from what I saw in the code
tampler commentedon Oct 7, 2024
@slavkap One of the things that concern me is the status of SSVM. I highlighted "Agent State = Off" on the picture above, which indicates invalid SSVM state.
For me, using "Direct Download" feature is a workaround for invalid SSVM setup 😏 , which is another issue and is covered in #9746. I used to use Primary NFS and that option worked well for me ☝️
Now I'd love to switch to the Linstor Primary and this feature won't work. @rp - let me know if you need more info about Linstor setup or related info 🙏
slavkap commentedon Oct 7, 2024
@tampler, I'm sorry I didn't discuss the SSVM issue because I think it was unrelated to the direct download case.
rp- commentedon Oct 11, 2024
Yeah, this isn't implemented yet.
I think I got the Linstor part, but it needs some addition support code for CDROM BLOCK devices in CloudStack.
DaanHoogland commentedon Nov 28, 2024
fixed in #9792