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

Error when using CLVM in KVM Hypervisor #9915

Open
Luskan777 opened this issue Nov 8, 2024 · 11 comments · Fixed by #9922
Open

Error when using CLVM in KVM Hypervisor #9915

Luskan777 opened this issue Nov 8, 2024 · 11 comments · Fixed by #9922

Comments

@Luskan777
Copy link

Luskan777 commented Nov 8, 2024

ISSUE TYPE
  • Bug Report
COMPONENT NAME
STORAGE
CLVM
CLOUDSTACK VERSION
4.20
CONFIGURATION
OS / ENVIRONMENT
  • KVM/libvirt as Virtualization is used
  • Ubuntu 22.04.5 LTS (Agent)
  • CLVM Primary Storage
SUMMARY

I am trying to use CLVM as Primary Storage, but when I try to add Primary Storage it gives me an error.

However, if I check the KVM agent hosts, it creates the storage pool in libvirt as expected, but it doesn't finish creating the Primary Storage in Cloudstack Management

Cloustack Agents KVM:

Captura de Tela 2024-11-08 às 13 57 38

STEPS TO REPRODUCE
Using KVM as Hypervisor, try adding a Primary Storage of type CLVM
EXPECTED RESULTS
Primary Storage created successfully
ACTUAL RESULTS

Cloudstack UI:

Request failed. (530)
Failed to add data store: Failed to access storage pool
Captura de Tela 2024-11-08 às 11 40 36

Cloudstack management (Logs):

DEBUG [c.c.a.t.Request] (AgentManager-Handler-1:[]) (logid:) Seq 18-5556597515245060226: Processing:  { Ans: , MgmtId: 42374915704331, via: 18, Ver: v1, Flags: 10, [{"com.cloud.agent.api.Answer":{"result":"false","details":"java.lang.IllegalArgumentException: No enum constant com.cloud.hypervisor.kvm.resource.LibvirtStoragePoolDef.PoolType.LOGICAL
	at java.base/java.lang.Enum.valueOf(Enum.java:273)
	at com.cloud.hypervisor.kvm.resource.LibvirtStoragePoolDef$PoolType.valueOf(LibvirtStoragePoolDef.java:26)
	at com.cloud.hypervisor.kvm.resource.LibvirtStoragePoolXMLParser.parseStoragePoolXML(LibvirtStoragePoolXMLParser.java:118)
	at com.cloud.hypervisor.kvm.storage.LibvirtStorageAdaptor.getStoragePoolDef(LibvirtStorageAdaptor.java:502)
	at com.cloud.hypervisor.kvm.storage.LibvirtStorageAdaptor.getStoragePool(LibvirtStorageAdaptor.java:534)
	at com.cloud.hypervisor.kvm.storage.LibvirtStorageAdaptor.getStoragePool(LibvirtStorageAdaptor.java:519)
	at com.cloud.hypervisor.kvm.storage.LibvirtStorageAdaptor.createStoragePool(LibvirtStorageAdaptor.java:763)
	at com.cloud.hypervisor.kvm.storage.KVMStoragePoolManager.createStoragePool(KVMStoragePoolManager.java:392)
	at com.cloud.hypervisor.kvm.storage.KVMStoragePoolManager.createStoragePool(KVMStoragePoolManager.java:386)
	at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtModifyStoragePoolCommandWrapper.execute(LibvirtModifyStoragePoolCommandWrapper.java:42)
	at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtModifyStoragePoolCommandWrapper.execute(LibvirtModifyStoragePoolCommandWrapper.java:35)
	at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRequestWrapper.execute(LibvirtRequestWrapper.java:78)
	at com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.executeRequest(LibvirtComputingResource.java:1944)
	at com.cloud.agent.Agent.processRequest(Agent.java:686)
	at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:1109)
	at com.cloud.utils.nio.Task.call(Task.java:83)
	at com.cloud.utils.nio.Task.call(Task.java:29)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
","wait":"0","bypassHostMaintenance":"false"}}] }
@DaanHoogland
Copy link
Contributor

@Luskan777 the exception trace means that at the agent side the requested pool type is not recognised. Can you look at the agent log some more related messages above the stack trace.

pooltypes are

ISCSI("iscsi"), NETFS("netfs"), LOGICAL("logical"), DIR("dir"), RBD("rbd"), GLUSTERFS("glusterfs"), POWERFLEX("powerflex")

it seems to be the 'logical' in

<pool type='logical'>

which is not recognised, so that seems a false negative.
any more info is welcome.

@slavkap
Copy link
Contributor

slavkap commented Nov 13, 2024

Hi @DaanHoogland, @Luskan777, there was a typo in the PR for upgrading log4j

ISCSI("iscsi"), NETFS("netfs"), loggerICAL("logical"), DIR("dir"), RBD("rbd"), GLUSTERFS("glusterfs"), POWERFLEX("powerflex");

after I spoke with @DaanHoogland, this typo is only in version 4.20 not in the version mentioned in the issue

@Luskan777
Copy link
Author

Hi @slavkap , @DaanHoogland sorry, I'm on version 4.20.0, I'm using 4.20 to test some features and forgot to revert to 4.19.

However, I noticed that the typo was from PR #7131 , I'll fix it and test to see if everything works as expected.

@weizhouapache
Copy link
Member

Hi @DaanHoogland, @Luskan777, there was a typo in the PR for upgrading log4j

ISCSI("iscsi"), NETFS("netfs"), loggerICAL("logical"), DIR("dir"), RBD("rbd"), GLUSTERFS("glusterfs"), POWERFLEX("powerflex");

after I spoke with @DaanHoogland, this typo is only in version 4.20 not in the version mentioned in the issue

Good finding
Can you create a pr ? @slavkap

@slavkap
Copy link
Contributor

slavkap commented Nov 14, 2024

@weizhouapache, @DaanHoogland already made a fix #9922

@weizhouapache
Copy link
Member

@weizhouapache, @DaanHoogland already made a fix #9922

Thanks @slavkap

Sorry , I did not see your pr @DaanHoogland

@DaanHoogland
Copy link
Contributor

However, I noticed that the typo was from PR #7131 , I'll fix it and test to see if everything works as expected.

@Luskan777 , as a matter of formality we ask third party testing. Could you apply #9922 and confirm this solves your issue?

@JoaoJandre
Copy link
Contributor

However, I noticed that the typo was from PR #7131 , I'll fix it and test to see if everything works as expected.

@Luskan777 , as a matter of formality we ask third party testing. Could you apply #9922 and confirm this solves your issue?

I'm sorry @DaanHoogland, I did not see your comment prior to merging. As the change was simple and all the basic merging criteria was met, I did not think we needed third party testing.

@JoaoJandre
Copy link
Contributor

In any case, since the change in #9922 is tied to a bigger problem, we should wait for @Luskan777 to confirm that it fixes #9915. Otherwise, we can create another PR to solve this.

@JoaoJandre JoaoJandre reopened this Nov 14, 2024
@Luskan777
Copy link
Author

However, I noticed that the typo was from PR #7131 , I'll fix it and test to see if everything works as expected.

@Luskan777 , as a matter of formality we ask third party testing. Could you apply #9922 and confirm this solves your issue?

Hi @DaanHoogland, ok, I'm already testing this.

@DaanHoogland
Copy link
Contributor

Hi @DaanHoogland, ok, I'm already testing this.

🙏

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.

5 participants