Skip to content

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

Closed

Description

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

Activity

  1. slavkap commented on Oct 7, 2024

    @slavkap
    Contributor

    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

  2. added this to the 4.20.1.0 milestone on Oct 7, 2024
  3. tampler commented on Oct 7, 2024

    @tampler
    Author

    @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 🙏

  4. slavkap commented on Oct 7, 2024

    @slavkap
    Contributor

    @tampler, I'm sorry I didn't discuss the SSVM issue because I think it was unrelated to the direct download case.

  5. rp- commented on Oct 11, 2024

    @rp-
    Contributor

    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.

  6. modified the milestones: 4.20.1, 4.19.2 on Nov 28, 2024
  7. DaanHoogland commented on Nov 28, 2024

    @DaanHoogland
    Contributor

    fixed in #9792

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions