cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Sorensen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CLOUDSTACK-4121) local storage can't find hypervisor type
Date Tue, 06 Aug 2013 22:21:47 GMT
Marcus Sorensen created CLOUDSTACK-4121:
-------------------------------------------

             Summary: local storage can't find hypervisor type
                 Key: CLOUDSTACK-4121
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4121
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
    Affects Versions: 4.2.0
            Reporter: Marcus Sorensen
            Priority: Blocker
             Fix For: 4.2.0


Deployed a fresh 4.2 zone with local storage. It seemed to fail in getting hypervisor type
for volumes created on this storage:

2013-08-06 15:55:29,873 WARN  [cloud.vm.SystemVmLoadScanner] (secstorage-1:null) Unexpected
exception DB Exception on: null
com.cloud.utils.exception.CloudRuntimeException: DB Exception on: null
	at com.cloud.storage.dao.VolumeDaoImpl.getHypervisorType(VolumeDaoImpl.java:261)
	at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
	at org.apache.cloudstack.storage.volume.VolumeObject.getHypervisorType(VolumeObject.java:448)
	at org.apache.cloudstack.storage.to.VolumeObjectTO.<init>(VolumeObjectTO.java:72)
	at org.apache.cloudstack.storage.volume.VolumeObject.getTO(VolumeObject.java:460)
	at org.apache.cloudstack.storage.datastore.driver.CloudStackPrimaryDataStoreDriverImpl.deleteAsync(CloudStackPrimaryDataStoreDriverImpl.java:127)
	at org.apache.cloudstack.storage.volume.VolumeServiceImpl.expungeVolumeAsync(VolumeServiceImpl.java:285)
	at com.cloud.storage.VolumeManagerImpl.cleanupVolumes(VolumeManagerImpl.java:2120)
	at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
	at com.cloud.vm.VirtualMachineManagerImpl.advanceExpunge(VirtualMachineManagerImpl.java:492)
	at com.cloud.vm.VirtualMachineManagerImpl.expunge(VirtualMachineManagerImpl.java:434)
	at com.cloud.storage.secondary.SecondaryStorageManagerImpl.destroySecStorageVm(SecondaryStorageManagerImpl.java:995)
	at com.cloud.storage.secondary.SecondaryStorageManagerImpl.allocCapacity(SecondaryStorageManagerImpl.java:720)
	at com.cloud.storage.secondary.SecondaryStorageManagerImpl.expandPool(SecondaryStorageManagerImpl.java:1307)
	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$301(ScheduledThreadPoolExecutor.java:178)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.sql.SQLException: SQL String can not be NULL
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
	at com.mysql.jdbc.PreparedStatement.<init>(PreparedStatement.java:946)
	at com.mysql.jdbc.JDBC4PreparedStatement.<init>(JDBC4PreparedStatement.java:48)
	at sun.reflect.GeneratedConstructorAccessor58.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.PreparedStatement.getInstance(PreparedStatement.java:882)
	at com.mysql.jdbc.ConnectionImpl.clientPrepareStatement(ConnectionImpl.java:1518)
	at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4313)
	at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4212)
	at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:281)
	at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:313)
	at com.cloud.utils.db.Transaction.prepareStatement(Transaction.java:468)
	at com.cloud.utils.db.Transaction.prepareAutoCloseStatement(Transaction.java:460)
	at com.cloud.storage.dao.VolumeDaoImpl.getHypervisorType(VolumeDaoImpl.java:250)
	... 36 more

I installed an nfs primary storage and turned off local storage for system vms and things
magically started working.

Looking at the volume_view table in the database shows that every volume has hypervisor_type
of 'KVM', whether the failed local storage volumes or the nfs primary storage.


Looking at VolumeDaoImpl:
                if (scope == ScopeType.CLUSTER)
                    sql = SELECT_HYPERTYPE_FROM_CLUSTER_VOLUME;
                else if (scope == ScopeType.ZONE)
                    sql = SELECT_HYPERTYPE_FROM_ZONE_VOLUME;

If I run the SELECT_HYPERTYPE_FROM_ZONE_VOLUME sql query against a local volume, I get:
mysql> SELECT s.hypervisor from volumes v, storage_pool s where v.pool_id = s.id and v.id
= 55;
+------------+
| hypervisor |
+------------+
| NULL       |
+------------+

If I run the cluster query I get:
mysql> SELECT c.hypervisor_type from volumes v, storage_pool s, cluster c where v.pool_id
= s.id and s.cluster_id = c.id and v.id = 55
    -> ;
+-----------------+
| hypervisor_type |
+-----------------+
| KVM             |
+-----------------+


We should probably switch that if/else statement to use the cluster call for local storage.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message