Hi,
On 04/17/2013 01:44 AM, Guangjian Liu wrote:
Create rbd primary storage fail in CS 4.0.1
Anybody can help about it!
Environment:
1. Server A: CS 4.0.1 OS: RHEL 6.2 x86-64
2. Server B: Ceph 0.56.4 OS: RHEL 6.2 x86-64
3. Server C: KVM/Qemu OS: Ubuntu 12.04
compile libvirt and Qemu as document
root@ubuntu:/usr/local/lib# virsh version
Compiled against library: libvirt 0.10.2
Using library: libvirt 0.10.2
Using API: QEMU 0.10.2
Running hypervisor: QEMU 1.0.0
Are you sure both libvirt and Qemu are compiled with RBD enabled?
On your CentOS system you should make sure librbd-dev is installed
during compilation of libvirt and Qemu.
The most important part is the RBD storage pool support in libvirt, that
should be enabled.
In the e-mail you send me directly I saw this:
root@ubuntu:~/scripts# virsh pool-define rbd-pool.xml error: Failed to
define pool from rbd-pool.xml error: internal error missing backend for
pool type 8
That suggest RBD storage pool support is not enabled in libvirt.
Wido
Problem:
create primary storage fail with rbd device.
Fail log:
2013-04-16 16:27:14,224 DEBUG [cloud.storage.StorageManagerImpl]
(catalina-exec-9:null) createPool Params @ scheme - rbd storageHost -
10.0.0.41 hostPath - /cloudstack port - -1
2013-04-16 16:27:14,270 DEBUG [cloud.storage.StorageManagerImpl]
(catalina-exec-9:null) In createPool Setting poolId - 218 uuid -
5924a2df-d658-3119-8aba-f90307683206 zoneId - 4 podId - 4 poolName - ceph
2013-04-16 16:27:14,318 DEBUG [cloud.storage.StorageManagerImpl]
(catalina-exec-9:null) creating pool ceph on host 18
2013-04-16 16:27:14,320 DEBUG [agent.transport.Request]
(catalina-exec-9:null) Seq 18-1625162275: Sending { Cmd , MgmtId:
37528005876872, via: 18, Ver: v1, Flags: 100011,
[{"CreateStoragePoolCommand":{"add":true,"pool":{"id":218,"uuid":"5924a2df-d658-3119-8aba-f90307683206","host":"10.0.0.41","path":"cloudstack","userInfo":":","port":6789,"type":"RBD"},"localPath":"/mnt//3cf4f0e8-781d-39d8-b81c-9896da212335","wait":0}}]
}
2013-04-16 16:27:14,323 DEBUG [agent.transport.Request]
(AgentManager-Handler-2:null) Seq 18-1625162275: Processing: { Ans: ,
MgmtId: 37528005876872, via: 18, Ver: v1, Flags: 10,
[{"Answer":{"result":true,"details":"success","wait":0}}] }
2013-04-16 16:27:14,323 DEBUG [agent.transport.Request]
(catalina-exec-9:null) Seq 18-1625162275: Received: { Ans: , MgmtId:
37528005876872, via: 18, Ver: v1, Flags: 10, { Answer } }
2013-04-16 16:27:14,323 DEBUG [agent.manager.AgentManagerImpl]
(catalina-exec-9:null) Details from executing class
com.cloud.agent.api.CreateStoragePoolCommand: success
2013-04-16 16:27:14,323 DEBUG [cloud.storage.StorageManagerImpl]
(catalina-exec-9:null) In createPool Adding the pool to each of the hosts
2013-04-16 16:27:14,323 DEBUG [cloud.storage.StorageManagerImpl]
(catalina-exec-9:null) Adding pool ceph to host 18
2013-04-16 16:27:14,326 DEBUG [agent.transport.Request]
(catalina-exec-9:null) Seq 18-1625162276: Sending { Cmd , MgmtId:
37528005876872, via: 18, Ver: v1, Flags: 100011,
[{"ModifyStoragePoolCommand":{"add":true,"pool":{"id":218,"uuid":"5924a2df-d658-3119-8aba-f90307683206","host":"10.0.0.41","path":"cloudstack","userInfo":":","port":6789,"type":"RBD"},"localPath":"/mnt//3cf4f0e8-781d-39d8-b81c-9896da212335","wait":0}}]
}
2013-04-16 16:27:14,411 DEBUG [agent.transport.Request]
(AgentManager-Handler-6:null) Seq 18-1625162276: Processing: { Ans: ,
MgmtId: 37528005876872, via: 18, Ver: v1, Flags: 10,
[{"Answer":{"result":false,"details":"java.lang.NullPointerException\n\tat
com.cloud.hypervisor.kvm.storage.LibvirtStorageAdaptor.createStoragePool(LibvirtStorageAdaptor.java:462)\n\tat
com.cloud.hypervisor.kvm.storage.KVMStoragePoolManager.createStoragePool(KVMStoragePoolManager.java:57)\n\tat
com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.execute(LibvirtComputingResource.java:2087)\n\tat
com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.executeRequest(LibvirtComputingResource.java:1053)\n\tat
com.cloud.agent.Agent.processRequest(Agent.java:518)\n\tat
com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:831)\n\tat
com.cloud.utils.nio.Task.run(Task.java:83)\n\tat
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)\n\tat
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\n\tat
java.lang.Thread.run(Thread.java:679)\n","wait":0}}] }
2013-04-16 16:27:14,412 DEBUG [agent.transport.Request]
(catalina-exec-9:null) Seq 18-1625162276: Received: { Ans: , MgmtId:
37528005876872, via: 18, Ver: v1, Flags: 10, { Answer } }
2013-04-16 16:27:14,412 DEBUG [agent.manager.AgentManagerImpl]
(catalina-exec-9:null) Details from executing class
com.cloud.agent.api.ModifyStoragePoolCommand: java.lang.NullPointerException
at
com.cloud.hypervisor.kvm.storage.LibvirtStorageAdaptor.createStoragePool(LibvirtStorageAdaptor.java:462)
at
com.cloud.hypervisor.kvm.storage.KVMStoragePoolManager.createStoragePool(KVMStoragePoolManager.java:57)
at
com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.execute(LibvirtComputingResource.java:2087)
at
com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.executeRequest(LibvirtComputingResource.java:1053)
at com.cloud.agent.Agent.processRequest(Agent.java:518)
at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:831)
at com.cloud.utils.nio.Task.run(Task.java:83)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
2013-04-16 16:27:14,451 WARN [cloud.storage.StorageManagerImpl]
(catalina-exec-9:null) Unable to establish a connection between
Host[-18-Routing] and Pool[218|RBD]
com.cloud.exception.StorageUnavailableException: Resource [StoragePool:218]
is unreachable: Unable establish connection from storage head to storage
pool 218 due to java.lang.NullPointerException
at
com.cloud.hypervisor.kvm.storage.LibvirtStorageAdaptor.createStoragePool(LibvirtStorageAdaptor.java:462)
at
com.cloud.hypervisor.kvm.storage.KVMStoragePoolManager.createStoragePool(KVMStoragePoolManager.java:57)
at
com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.execute(LibvirtComputingResource.java:2087)
at
com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.executeRequest(LibvirtComputingResource.java:1053)
at com.cloud.agent.Agent.processRequest(Agent.java:518)
at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:831)
at com.cloud.utils.nio.Task.run(Task.java:83)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
at
com.cloud.storage.StorageManagerImpl.connectHostToSharedPool(StorageManagerImpl.java:1685)
at
com.cloud.storage.StorageManagerImpl.createPool(StorageManagerImpl.java:1450)
at
com.cloud.storage.StorageManagerImpl.createPool(StorageManagerImpl.java:215)
at
com.cloud.api.commands.CreateStoragePoolCmd.execute(CreateStoragePoolCmd.java:120)
at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:138)
at com.cloud.api.ApiServer.queueCommand(ApiServer.java:543)
at com.cloud.api.ApiServer.handleRequest(ApiServer.java:422)
at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:304)
at com.cloud.api.ApiServlet.doGet(ApiServlet.java:63)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2260)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
2013-04-16 16:27:14,452 WARN [cloud.storage.StorageManagerImpl]
(catalina-exec-9:null) No host can access storage pool Pool[218|RBD] on
cluster 5
2013-04-16 16:27:14,504 WARN [cloud.api.ApiDispatcher]
(catalina-exec-9:null) class com.cloud.api.ServerApiException : Failed to
add storage pool
2013-04-16 16:27:15,293 DEBUG [agent.manager.AgentManagerImpl]
(AgentManager-Handler-12:null) Ping from 18
^C
[root@RDR02S02 management]#