Please check you cluster_details table for memory and cpu overcommit values. This statement expects to have these details in cluster_details table.
-Harikrishna On 11-Aug-2013, at 4:45 AM, Pedro Roque Marques <pedro.r.marq...@gmail.com> wrote: > I've bumped into exceptions with similar signature in the past when the > database schema has not been updated to match the Dao objects. > > Check whether the cloud.cluster database has all the fields listed in the > select statement displayed in the exception. > > Pedro. > > On Aug 10, 2013, at 3:03 PM, Vijayendra Bhamidipati wrote: > >> On a fresh nonoss dev setup of the latest 4.2 branch, I'm running into this >> DB exception when the SSVM is being started upon enabling a zone: >> >> >> INFO [storage.endpoint.DefaultEndPointSelector] (StatsCollector-2:) No >> running ssvm is found, so command will be sent to LocalHostEndPoint >> INFO [cloud.secstorage.PremiumSecondaryStorageManagerImpl] (secstorage-1:) >> No running secondary storage vms found in datacenter id=1, starting one >> INFO [storage.secondary.SecondaryStorageManagerImpl] (secstorage-1:) No >> stopped secondary storage vm is available, need to allocate a new secondary >> storage vm >> WARN [storage.secondary.SecondaryStorageManagerImpl] (secstorage-1:) >> Exception while trying to start secondary storage vm >> com.cloud.utils.exception.CloudRuntimeException: DB Exception on: SELECT >> clusterList.cluster_id FROM ( SELECT cluster.cluster_id cluster_id, ( >> (sum(cluster.used) + sum(cluster.reserved) + ?)/sum(cluster.total) ) ratio, >> cluster.configValue value FROM (SELECT capacity.cluster_id cluster_id, >> capacity.used_capacity used, capacity.reserved_capacity reserved, >> capacity.total_capacity * overcommit.value total, CASE (SELECT count(*) FROM >> `cloud`.`cluster_details` details WHERE details.cluster_id = >> capacity.cluster_id AND details.name = ? ) WHEN 1 THEN ( CASE WHEN (SELECT >> details.value FROM `cloud`.`cluster_details` details WHERE >> details.cluster_id = capacity.cluster_id AND details.name = ?) is NULL THEN >> (SELECT config.value FROM `cloud`.`configuration` config WHERE config.name = >> ?)ELSE (SELECT details.value FROM `cloud`.`cluster_details` details WHERE >> details.cluster_id = capacity.cluster_id AND details.name = ? ) END )ELSE ( >> SELECT config.value FROM `cloud`.`configuration` config WHERE config.name = >> ?) END configValue FROM `cloud`.`op_host_capacity` capacity INNER JOIN >> `cloud`.`cluster_details` overcommit ON overcommit.cluster_id = >> capacity.cluster_id WHERE capacity.data_center_id = ? AND >> capacity.capacity_type = ? AND capacity.total_capacity > 0 AND >> overcommit.name = ?) cluster GROUP BY cluster.cluster_id) clusterList WHERE >> clusterList.ratio > clusterList.value; >> at >> com.cloud.capacity.dao.CapacityDaoImpl.listClustersCrossingThreshold(CapacityDaoImpl.java:217) >> at >> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125) >> at >> com.cloud.deploy.FirstFitPlanner.removeClustersCrossingThreshold(FirstFitPlanner.java:284) >> at >> com.cloud.deploy.FirstFitPlanner.scanClustersForDestinationInZoneOrPod(FirstFitPlanner.java:339) >> at >> com.cloud.deploy.FirstFitPlanner.orderClusters(FirstFitPlanner.java:175) >> at >> com.cloud.deploy.DeploymentPlanningManagerImpl.planDeployment(DeploymentPlanningManagerImpl.java:405) >> at >> com.cloud.vm.VirtualMachineManagerImpl.advanceStart(VirtualMachineManagerImpl.java:822) >> at >> com.cloud.vm.VirtualMachineManagerImpl.start(VirtualMachineManagerImpl.java:574) >> at >> com.cloud.vm.VirtualMachineManagerImpl.start(VirtualMachineManagerImpl.java:567) >> at >> com.cloud.storage.secondary.SecondaryStorageManagerImpl.startSecStorageVm(SecondaryStorageManagerImpl.java:268) >> at >> com.cloud.storage.secondary.SecondaryStorageManagerImpl.allocCapacity(SecondaryStorageManagerImpl.java:693) >> at >> com.cloud.storage.secondary.SecondaryStorageManagerImpl.expandPool(SecondaryStorageManagerImpl.java:1300) >> at >> com.cloud.secstorage.PremiumSecondaryStorageManagerImpl.scanPool(PremiumSecondaryStorageManagerImpl.java:123) >> at >> com.cloud.secstorage.PremiumSecondaryStorageManagerImpl.scanPool(PremiumSecondaryStorageManagerImpl.java:50) >> at >> com.cloud.vm.SystemVmLoadScanner.loadScan(SystemVmLoadScanner.java:104) >> at >> com.cloud.vm.SystemVmLoadScanner.access$100(SystemVmLoadScanner.java:33) >> at >> com.cloud.vm.SystemVmLoadScanner$1.reallyRun(SystemVmLoadScanner.java:81) >> at com.cloud.vm.SystemVmLoadScanner$1.run(SystemVmLoadScanner.java:72) >> at >> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) >> at >> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351) >> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) >> at >> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165) >> at >> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267) >> 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: java.sql.SQLException: Got error 28 from storage engine >> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074) >> 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.executeQuery(PreparedStatement.java:2318) >> at >> org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) >> at >> org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) >> at >> com.cloud.capacity.dao.CapacityDaoImpl.listClustersCrossingThreshold(CapacityDaoImpl.java:211) >> ... 30 more >> INFO [storage.secondary.SecondaryStorageManagerImpl] (secstorage-1:) Unable >> to start secondary storage vm for standby capacity, secStorageVm vm Id : 5, >> will recycle it and start a new one >> >> >> >> Is anyone else seeing this?? >> >> >> Regards, >> Vijay >