Dear all, Any advise? I have tried to uninstall and reinstall cloudstack-management on the management server, as well as the cloudstack-agent on the hypervisors. The problem still persists.
When I try to add primary storage from the Cloudstack GUI, is the adding process performed by the management server or by the hypervisors? Looking forward to your reply, thank you. Cheers. On Wed, Jul 10, 2013 at 9:42 PM, Chip Childers <chip.child...@sungard.com>wrote: > Cc'ing Wido, our resident Ceph expert. ;-) > > On Wed, Jul 10, 2013 at 05:45:25PM +0800, Indra Pramana wrote: > > Dear all, > > > > I am installing CloudStack 4.1.0 (upgraded from 4.0.2) and I also have a > > Ceph cluster running. However, I am having issues in adding the RBD as > > primary storage. Tried to follow the instruction here, but unable to make > > it work: > > > > http://ceph.com/docs/master/rbd/rbd-cloudstack/ > > > > I have setup a pool on the Ceph cluster. The status of the cluster is > > healthy. Since I am using Ubuntu 12.04.2 LTS (Precise) for the > hypervisors, > > I also have compiled libvirt manually to ensure that the version 0.9.13 > is > > installed (previously it's 0.9.8). > > > > indra@hv-kvm-01:~/rbd$ ceph > > ceph> health > > HEALTH_OK > > > > indra@hv-kvm-01:~$ ceph osd lspools > > 0 data,1 metadata,2 rbd,3 sc1, > > > > root@hv-kvm-01:/home/indra# libvirtd --version > > libvirtd (libvirt) 0.9.13 > > > > I tried to add Primary Storage into the Cloudstack zone which I have > > created: > > > > Add Primary Storage: > > > > Zone: my zone name > > Pod: my pod name > > Cluster: my cluster name > > Name: ceph-rbd-pri-storage > > Protocol: RBD > > RADOS Monitor: my first Ceph monitor IP address > > RADOS Pool: sc1 (the pool name on Ceph cluster) > > RADOS User: client.admin > > RADOS Secret: /etc/ceph/ceph.client.admin.keyring (keyring file location) > > Storage Tags: rbd > > > > This is the error message when I tried to add the primary storage by > > clicking OK: > > > > DB Exception on: com.mysql.jdbc.JDBC4PreparedStatement@4b2eb56: INSERT > INTO > > storage_pool (storage_pool.id, storage_pool.name, storage_pool.uuid, > > storage_pool.pool_type, storage_pool.created, storage_pool.update_time, > > storage_pool.data_center_id, storage_pool.pod_id, > > storage_pool.available_bytes, storage_pool.capacity_bytes, > > storage_pool.status, storage_pool.scope, > storage_pool.storage_provider_id, > > storage_pool.host_address, storage_pool.path, storage_pool.port, > > storage_pool.user_info, storage_pool.cluster_id) VALUES (217, > > _binary'ceph-rbd-pri-storage', > > _binary'a226c9a1-da78-3f3a-b5ac-e18b925c9634', 'RBD', '2013-07-10 > > 09:08:28', null, 2, 2, 0, 0, 'Up', null, null, null, _binary'ceph/ > > ceph.client.admin.keyring@10.237.11.2/sc1', 6789, null, 2) > > > > On the management-server.log file: > > > > 2013-07-10 17:08:28,845 DEBUG [cloud.api.ApiServlet] > (catalina-exec-2:null) > > ===START=== 192.168.0.100 -- GET > > command=createStoragePool&zoneid=c116950e-e4ae-4f23-a7e7- > > > 74a75c4ee638&podId=a748b063-3a83-4175-a0e9-de39118fe5ce&clusterid=1f87eb09-324d-4d49-83c2-88d84d7a15df&name=ceph-rbd-pri-storage&url=rbd%3A%2F%2Fclient.admin%3A_etc%2Fc > > > eph%2Fceph.client.admin.keyring%4010.237.11.2%2Fsc1&tags=rbd&response=json&sessionkey=rDRfWpqeKfQKbKZtHr398ULV%2F8k%3D&_=1373447307839 > > 2013-07-10 17:08:28,862 DEBUG [cloud.storage.StorageManagerImpl] > > (catalina-exec-2:null) createPool Params @ scheme - rbd storageHost - > null > > hostPath - /ceph/ceph.client > > .admin.keyring@10.237.11.2/sc1 port - -1 > > 2013-07-10 17:08:28,918 DEBUG [cloud.storage.StorageManagerImpl] > > (catalina-exec-2:null) In createPool Setting poolId - 217 uuid - > > a226c9a1-da78-3f3a-b5ac-e18b925c9634 z > > oneId - 2 podId - 2 poolName - ceph-rbd-pri-storage > > 2013-07-10 17:08:28,921 DEBUG [db.Transaction.Transaction] > > (catalina-exec-2:null) Rolling back the transaction: Time = 3 Name = > > persist; called by -Transaction.rollbac > > > k:890-Transaction.removeUpTo:833-Transaction.close:657-TransactionContextBuilder.interceptException:63-ComponentInstantiationPostProcessor$InterceptorDispatcher.interce > > > pt:133-StorageManagerImpl.createPool:1378-StorageManagerImpl.createPool:147-CreateStoragePoolCmd.execute:123-ApiDispatcher.dispatch:162-ApiServer.queueCommand:505-ApiSe > > rver.handleRequest:355-ApiServlet.processRequest:302 > > 2013-07-10 17:08:28,923 ERROR [cloud.api.ApiServer] > (catalina-exec-2:null) > > unhandled exception executing api command: createStoragePool > > com.cloud.utils.exception.CloudRuntimeException: DB Exception on: > > com.mysql.jdbc.JDBC4PreparedStatement@4b2eb56: INSERT INTO storage_pool > ( > > storage_pool.id, storage_pool > > .name, storage_pool.uuid, storage_pool.pool_type, storage_pool.created, > > storage_pool.update_time, storage_pool.data_center_id, > storage_pool.pod_id, > > storage_pool.availab > > le_bytes, storage_pool.capacity_bytes, storage_pool.status, > > storage_pool.scope, storage_pool.storage_provider_id, > > storage_pool.host_address, storage_pool.path, storage_ > > pool.port, storage_pool.user_info, storage_pool.cluster_id) VALUES (217, > > _binary'ceph-rbd-pri-storage', > > _binary'a226c9a1-da78-3f3a-b5ac-e18b925c9634', 'RBD', '2013-07-1 > > 0 09:08:28', null, 2, 2, 0, 0, 'Up', null, null, null, _binary'ceph/ > > ceph.client.admin.keyring@10.237.11.2/sc1', 6789, null, 2) > > at > > com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1342) > > at > > > com.cloud.storage.dao.StoragePoolDaoImpl.persist(StoragePoolDaoImpl.java:232) > > at > > > com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125) > > at > > > com.cloud.storage.StorageManagerImpl.createPool(StorageManagerImpl.java:1378) > > at > > > com.cloud.storage.StorageManagerImpl.createPool(StorageManagerImpl.java:147) > > at > > > org.apache.cloudstack.api.command.admin.storage.CreateStoragePoolCmd.execute(CreateStoragePoolCmd.java:123) > > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:162) > > at com.cloud.api.ApiServer.queueCommand(ApiServer.java:505) > > at com.cloud.api.ApiServer.handleRequest(ApiServer.java:355) > > at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:302) > > at com.cloud.api.ApiServlet.doGet(ApiServlet.java:66) > > 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:615) > > at > > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) > > at > > > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) > > at > > > org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889) > > at > > > org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:744) > > at > > > org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2282) > > 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) > > Caused by: > > > com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: > > Column 'host_address' cannot be null > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > at > > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) > > at > > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) > > at > java.lang.reflect.Constructor.newInstance(Constructor.java:532) > > at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) > > at com.mysql.jdbc.Util.getInstance(Util.java:386) > > at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040) > > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074) > > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006) > > at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2468) > > at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629) > > at > com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2719) > > at > > > com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155) > > at > > > com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2450) > > at > > > com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2371) > > at > > > com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2355) > > at > > > org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) > > at > > > org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) > > at > > com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1305) > > ... 32 more > > 2013-07-10 17:08:28,927 DEBUG [cloud.api.ApiServlet] > (catalina-exec-2:null) > > ===END=== 192.168.0.100 -- GET > > > command=createStoragePool&zoneid=c116950e-e4ae-4f23-a7e7-74a75c4ee638&podId=a748b063-3a83-4175-a0e9-de39118fe5ce&clusterid=1f87eb09-324d-4d49-83c2-88d84d7a15df&name=ceph-rbd-pri-storage&url=rbd%3A%2F%2Fclient.admin%3A_etc%2Fceph%2Fceph.client.admin.keyring%4010.237.11.2%2Fsc1&tags=rbd&response=json&sessionkey=rDRfWpqeKfQKbKZtHr398ULV%2F8k%3D&_=1373447307839 > > > > Based on the error message, I tried to map the value of each field being > > submitted, and it seems the problem is here: > > > > Caused by: > > > com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: > > Column 'host_address' cannot be null > > > > storage_pool.id, 215 > > storage_pool.name, _binary'sc1' > > storage_pool.uuid, _binary'a226c9a1-da78-3f3a-b5ac-e18b925c9634' > > storage_pool.pool_type, 'RBD' > > storage_pool.created, '2013-07-10 08:27:03' > > storage_pool.update_time, null > > storage_pool.data_center_id, 2 > > storage_pool.pod_id, 2 > > storage_pool.available_bytes, 0 > > storage_pool.capacity_bytes, 0 > > storage_pool.status, 'Up' > > storage_pool.scope, null > > storage_pool.storage_provider_id, null > > storage_pool.host_address, null <======= > > storage_pool.path, _binary'ceph/ > ceph.client.admin.keyring@10.237.11.2/sc1 > > storage_pool.port, 6789 > > storage_pool.user_info, null > > storage_pool.cluster_id, 2 > > > > It seems that it's expecting the IP address / hostname of the monitor > > server on the "storage_pool.host_address" field. However, I noted that > the > > IP address is in the storage_pool.path field rather than the > > storage_pool.host_address. > > > > Anyone knows what can be done to resolve this problem? > > > > Looking forward to your reply, thank you. > > > > Cheers. >