Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: vm is not created for a direct download setup #9772

Open
tampler opened this issue Oct 5, 2024 · 4 comments · May be fixed by #9792
Open

bug: vm is not created for a direct download setup #9772

tampler opened this issue Oct 5, 2024 · 4 comments · May be fixed by #9792
Assignees
Milestone

Comments

@tampler
Copy link

tampler commented Oct 5, 2024

ISSUE TYPE
  • Bug Report
  • Improvement Request
COMPONENT NAME
Core, UI
CLOUDSTACK VERSION
 4.20.0.0-snapshot.20240928
CONFIGURATION

KVM, Advanced zone, Linstor Primary, NFS Secondary, Alpine Linux ISO setup with a "Direct Download" knob

acs-vms

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')

@slavkap
Copy link
Contributor

slavkap commented 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

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

@tampler
Copy link
Author

tampler commented 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
Copy link
Contributor

slavkap commented 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-
Copy link
Contributor

rp- commented 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.

@rp- rp- linked a pull request Oct 14, 2024 that will close this issue
14 tasks
@rp- rp- linked a pull request Nov 12, 2024 that will close this issue
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants