.....
make
make install
On Wed, Apr 17, 2013 at 6:25 PM, Wido den Hollander <w...@widodh.nl
<mailto:w...@widodh.nl>> wrote:
Hi,
On 04/17/2013 11:37 AM, Guangjian Liu wrote:
Thanks for your mail, you suggest compile libvirt with RBD enable.
I already build libvirt-0.10.2.tar.gz as document
http://ceph.com/docs/master/__rbd/libvirt/
<http://ceph.com/docs/master/rbd/libvirt/> in my SERVER C(Ubuntu
12.04),
Shall I build libvirt-0.10.2.tar.gz with RBD enable? use
./configure
--enable-rbd instead autogen.sh?
Well, you don't have to add --enable-rbd to configure nor
autogen.sh, but you have to make sure the development libraries for
librbd are installed.
On CentOS do this:
yum install librbd-devel
And retry autogen.sh for libvirt, it should tell you RBD is enabled.
Wido
cd libvirt
./autogen.sh
make
sudo make install
On Wed, Apr 17, 2013 at 4:37 PM, Wido den Hollander
<w...@widodh.nl <mailto:w...@widodh.nl>> wrote:
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]#
--
Guangjian