apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2.11k stars 1.11k forks source link

Cant attach volume to vm #9444

Open 0sorkon opened 4 months ago

0sorkon commented 4 months ago
ISSUE TYPE
COMPONENT NAME
storage
CLOUDSTACK VERSION
4.19.1.0
CONFIGURATION

storage: linstor

OS / ENVIRONMENT
SUMMARY

There are two main storages located on linstor, conventionally, ‘ssd’ and ‘hdd’. The main drive (ROOT volume) is located on ‘ssd’, when I try to attach ‘DATA volume’ to ‘hdd’ I get an error:

Jul 25 11:34:34 cloud4 java[998325]: WARN [cloud.agent.Agent] (agentRequest-Handler-3:) (logid:dee379ed) Caught: Jul 25 11:34:34 cloud4 java[998325]: java.lang.NullPointerException Jul 25 11:34:34 cloud4 java[998325]: #011at com.cloud.hypervisor.kvm.storage.LinstorStorageAdaptor.connectPhysicalDisk(LinstorStorageAdaptor.java:256) Jul 25 11:34:34 cloud4 java[998325]: #011at com.cloud.hypervisor.kvm.storage.KVMStoragePoolManager.connectPhysicalDisk(KVMStoragePoolManager.java:136) Jul 25 11:34:34 cloud4 java[998325]: #011at com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.attachVolume(KVMStorageProcessor.java:1523) Jul 25 11:34:34 cloud4 java[998325]: #011at com.cloud.storage.resource.StorageSubsystemCommandHandlerBase.execute(StorageSubsystemCommandHandlerBase.java:168) Jul 25 11:34:34 cloud4 java[998325]: #011at com.cloud.storage.resource.StorageSubsystemCommandHandlerBase.handleStorageCommands(StorageSubsystemCommandHandlerBase.java:70) Jul 25 11:34:34 cloud4 java[998325]: #011at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtStorageSubSystemCommandWrapper.execute(LibvirtStorageSubSystemCommandWrapper.java:36) Jul 25 11:34:34 cloud4 java[998325]: #011at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtStorageSubSystemCommandWrapper.execute(LibvirtStorageSubSystemCommandWrapper.java:30) Jul 25 11:34:34 cloud4 java[998325]: #011at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRequestWrapper.execute(LibvirtRequestWrapper.java:78) Jul 25 11:34:34 cloud4 java[998325]: #011at com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.executeRequest(LibvirtComputingResource.java:1929) Jul 25 11:34:34 cloud4 java[998325]: #011at com.cloud.agent.Agent.processRequest(Agent.java:683) Jul 25 11:34:34 cloud4 java[998325]: #011at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:1106) Jul 25 11:34:34 cloud4 java[998325]: #011at com.cloud.utils.nio.Task.call(Task.java:83) Jul 25 11:34:34 cloud4 java[998325]: #011at com.cloud.utils.nio.Task.call(Task.java:29) Jul 25 11:34:34 cloud4 java[998325]: #011at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) Jul 25 11:34:34 cloud4 java[998325]: #011at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) Jul 25 11:34:34 cloud4 java[998325]: #011at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) Jul 25 11:34:34 cloud4 java[998325]: #011at java.base/java.lang.Thread.run(Thread.java:829) Jul 25 11:34:47 cloud4 java[998325]: WARN [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:) (logid:f2a8af56) Couldn't retrieve free memory, returning -1.

At the same time the resource on linstor is created normally, it doesn't look like the problem is coming from linstor. please help me to find the cause

sureshanaparti commented 3 months ago

Hi @rp- can you check/confirm if any linstor issue here, with attach volume.

rp- commented 3 months ago

The only thing that can be really null in that line is the KVMStoragePool. Looks like the agent doesn't know anything about that pool, would need more agent log to investigate further.

0sorkon commented 3 months ago

Hi. No. There is nothing wrong with linstore as all other VMs are working fine and the drive attach/ detach function is working fine. In addition, I can mount a disc using the command virsh attach-disk i-2-686-VM /dev/drbd1134 sdb The problem seems to be related to a particular VM, but I can't figure out exactly where to look