You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Likitha Shetty (JIRA)" <ji...@apache.org> on 2014/09/24 15:29:33 UTC

[jira] [Commented] (CLOUDSTACK-6631) unable to attach new Volume to VM

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-6631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14146309#comment-14146309 ] 

Likitha Shetty commented on CLOUDSTACK-6631:
--------------------------------------------

To attach a volume to a VM, CCP creates the volume in primary storage if it hasn't already been created. During this creation, CCP tries to select a storage pool to deploy the volume in.
And the storage pool selection fails with the error you mentioned if the following two conditions are met -
1. ROOT volume of the VM we are trying to attach a datadisk to is in a zone-wide primary storage.
2. Global config vm.allocation.algorithm is set to userdispersing.

Is the above true in your case?

> unable to attach new Volume to VM
> ---------------------------------
>
>                 Key: CLOUDSTACK-6631
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-6631
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Volumes
>    Affects Versions: 4.2.1
>         Environment: Cloudstack 4.2.1 + KVM on CentOS 6.4
>            Reporter: Kazuhiro Ito
>            Assignee: Likitha Shetty
>         Attachments: management-server.log.0521
>
>
> 1. I added new volume.
> 2. I tried to attach the volume to a VM on UI.
> 3. It failed and the following log appeared.
> 2014-05-12 11:29:47,096 DEBUG [cloud.api.ApiServlet] (http-6443-exec-116:null) ===START===  133.xx.xxx.xxx -- GET  command=attachVolume&id=ac7099fb-ac66-4c63-bf1e-ed0e1429f412&virtualMachineId=ecdc2c1d-e21e-4c04-962a-4efac1a69a74&response=json&sessionkey=TDcTy%2FQRb5%2F%2Bk28wsjg6BWd6pcA%3D&_=1399861774316
> 2014-05-12 11:29:47,143 DEBUG [cloud.async.AsyncJobManagerImpl] (http-6443-exec-116:null) submit async job-4916 = [ dd8fab57-96aa-446f-8ebd-53c32ce4501a ], details: AsyncJobVO {id:4916, userId: 3, accountId: 3, sessionKey: null, instanceType: Volume, instanceId: 1543, cmd: org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd, cmdOriginator: null, cmdInfo: {"response":"json","id":"ac7099fb-ac66-4c63-bf1e-ed0e1429f412","sessionkey":"TDcTy/QRb5/+k28wsjg6BWd6pcA\u003d","cmdEventType":"VOLUME.ATTACH","ctxUserId":"3","virtualMachineId":"ecdc2c1d-e21e-4c04-962a-4efac1a69a74","httpmethod":"GET","_":"1399861774316","ctxAccountId":"3","ctxStartEventId":"34276"}, cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, processStatus: 0, resultCode: 0, result: null, initMsid: 90520731085572, completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2014-05-12 11:29:47,144 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-146:job-4916 = [ dd8fab57-96aa-446f-8ebd-53c32ce4501a ]) Executing org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd for job-4916 = [ dd8fab57-96aa-446f-8ebd-53c32ce4501a ]
> 2014-05-12 11:29:47,147 DEBUG [cloud.api.ApiServlet] (http-6443-exec-116:null) ===END===  133.xx.xxx.xxx -- GET  command=attachVolume&id=ac7099fb-ac66-4c63-bf1e-ed0e1429f412&virtualMachineId=ecdc2c1d-e21e-4c04-962a-4efac1a69a74&response=json&sessionkey=TDcTy%2FQRb5%2F%2Bk28wsjg6BWd6pcA%3D&_=1399861774316
> 2014-05-12 11:29:47,192 DEBUG [cloud.user.AccountManagerImpl] (Job-Executor-146:job-4916 = [ dd8fab57-96aa-446f-8ebd-53c32ce4501a ]) Access to org.apache.cloudstack.storage.volume.VolumeObject@17178a01 granted to Acct[0bea1cc1-ac60-4fb2-990b-f2dd04a5a329-xxx-x-xxxxx] by DomainChecker_EnhancerByCloudStack_9b413459
> 2014-05-12 11:29:47,192 DEBUG [cloud.user.AccountManagerImpl] (Job-Executor-146:job-4916 = [ dd8fab57-96aa-446f-8ebd-53c32ce4501a ]) Access to VM[User|TEST-A2-VM01] granted to Acct[0bea1cc1-ac60-4fb2-990b-f2dd04a5a329-xxx-x-xxxxx] by DomainChecker_EnhancerByCloudStack_9b413459
> 2014-05-12 11:29:47,212 DEBUG [storage.allocator.LocalStoragePoolAllocator] (Job-Executor-146:job-4916 = [ dd8fab57-96aa-446f-8ebd-53c32ce4501a ]) LocalStoragePoolAllocator trying to find storage pool to fit the vm
> 2014-05-12 11:29:47,212 DEBUG [storage.allocator.ClusterScopeStoragePoolAllocator] (Job-Executor-146:job-4916 = [ dd8fab57-96aa-446f-8ebd-53c32ce4501a ]) ClusterScopeStoragePoolAllocator looking for storage pool
> 2014-05-12 11:29:47,212 DEBUG [storage.allocator.ClusterScopeStoragePoolAllocator] (Job-Executor-146:job-4916 = [ dd8fab57-96aa-446f-8ebd-53c32ce4501a ]) Looking for pools in dc: 1  pod:1  cluster:null having tags:[MPI]
> 2014-05-12 11:29:47,216 DEBUG [storage.allocator.ClusterScopeStoragePoolAllocator] (Job-Executor-146:job-4916 = [ dd8fab57-96aa-446f-8ebd-53c32ce4501a ]) No storage pools available for shared volume allocation, returning
> 2014-05-12 11:29:47,234 ERROR [cloud.async.AsyncJobManagerImpl] (Job-Executor-146:job-4916 = [ dd8fab57-96aa-446f-8ebd-53c32ce4501a ]) Unexpected exception while executing org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd
> com.cloud.utils.exception.CloudRuntimeException: Caught: SELECT pool.id, SUM(IF(vol.state='Ready' AND vol.account_id = ?, 1, 0)) FROM `cloud`.`storage_pool` pool LEFT JOIN `cloud`.`volumes` vol ON pool.id = vol.pool_id WHERE pool.data_center_id = ?  AND pool.pod_id = ? AND pool.cluster_id = ?  GROUP BY pool.id ORDER BY 2 ASC
>         at com.cloud.storage.dao.VolumeDaoImpl.listPoolIdsByVolumeCount(VolumeDaoImpl.java:480)
>         at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
>         at org.apache.cloudstack.storage.allocator.AbstractStoragePoolAllocator.reorderPoolsByNumberOfVolumes(AbstractStoragePoolAllocator.java:122)
>         at org.apache.cloudstack.storage.allocator.AbstractStoragePoolAllocator.reOrder(AbstractStoragePoolAllocator.java:161)
>         at org.apache.cloudstack.storage.allocator.AbstractStoragePoolAllocator.allocateToPool(AbstractStoragePoolAllocator.java:110)
>         at com.cloud.storage.StorageManagerImpl.findStoragePool(StorageManagerImpl.java:433)
>         at com.cloud.storage.VolumeManagerImpl.createVolume(VolumeManagerImpl.java:673)
>         at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
>         at com.cloud.storage.VolumeManagerImpl.createVolumeOnPrimaryStorage(VolumeManagerImpl.java:1548)
>         at com.cloud.storage.VolumeManagerImpl.attachVolumeToVM(VolumeManagerImpl.java:1882)
>         at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
>         at org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd.execute(AttachVolumeCmd.java:122)
>         at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:158)
>         at com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:531)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>         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:701)
> Caused by: java.lang.NullPointerException
>         at com.cloud.storage.dao.VolumeDaoImpl.listPoolIdsByVolumeCount(VolumeDaoImpl.java:470)
>         ... 31 more
> 2014-05-12 11:29:47,238 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-146:job-4916 = [ dd8fab57-96aa-446f-8ebd-53c32ce4501a ]) Complete async job-4916 = [ dd8fab57-96aa-446f-8ebd-53c32ce4501a ], jobStatus: 2, resultCode: 530, result: Error Code: 530 Error text: Caught: SELECT pool.id, SUM(IF(vol.state='Ready' AND vol.account_id = ?, 1, 0)) FROM `cloud`.`storage_pool` pool LEFT JOIN `cloud`.`volumes` vol ON pool.id = vol.pool_id WHERE pool.data_center_id = ?  AND pool.pod_id = ? AND pool.cluster_id = ?  GROUP BY pool.id ORDER BY 2 ASC



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)