[ https://issues.apache.org/jira/browse/CLOUDSTACK-3557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Min Chen reopened CLOUDSTACK-3557: ---------------------------------- > [Object_Store_Refactor] Failed to attach a data volume to guest VM using > local storage as primary storage and S3 as secondary storage. > -------------------------------------------------------------------------------------------------------------------------------------- > > Key: CLOUDSTACK-3557 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3557 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server > Affects Versions: 4.2.0 > Environment: Latest build from ACS 4.2 branch > Reporter: Sanjeev N > Assignee: Min Chen > Priority: Blocker > Fix For: 4.2.0 > > Attachments: management-server.rar > > > Failed to attach a data volume to guest VM > Steps to Reproduce: > ================ > 1.Bringup CS in advanced zone with S3 as the secondary storage provider > 2.Add kvm cluster with Local storage as the primary storage > 3.Deploy guest vm with default centos template > 4.Create a small data volume > 5.Try to attache the data volume to the guest vm created at step3 > Expected Result: > ============== > Attaching data volume to guest vm will succeed > Actual Result: > =========== > Attaching data volume to guest vm failed > Observations: > =========== > Following is the snippet from management server log file: > 2013-07-16 08:37:41,335 DEBUG [cloud.api.ApiServlet] (catalina-exec-9:null) > ===START=== 10.146.0.20 -- GET > command=attachVolume&id=f07e07af-4822-4b1a-8176-83b5358a05f6&virtualMachineId=d2c6ba48-5729-4bf8-b7f3-26103b39ce3d&response=json&sessionkey=kt6%2B7hq85%2FU9HFfssTmfwxtFBfM%3D&_=1373978262627 > 2013-07-16 08:37:41,503 DEBUG [cloud.async.AsyncJobManagerImpl] > (catalina-exec-9:null) submit async job-26 = [ > 83a4e3e5-c357-4cef-b146-6a8bf254a88f ], details: AsyncJobVO {id:26, userId: > 2, accountId: 2, sessionKey: null, instanceType: Volume, instanceId: 20, cmd: > org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd, cmdOriginator: > null, cmdInfo: > {"response":"json","id":"f07e07af-4822-4b1a-8176-83b5358a05f6","sessionkey":"kt6+7hq85/U9HFfssTmfwxtFBfM\u003d","cmdEventType":"VOLUME.ATTACH","ctxUserId":"2","virtualMachineId":"d2c6ba48-5729-4bf8-b7f3-26103b39ce3d","httpmethod":"GET","_":"1373978262627","ctxAccountId":"2","ctxStartEventId":"92"}, > cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, > processStatus: 0, resultCode: 0, result: null, initMsid: 6615759585382, > completeMsid: null, lastUpdated: null, lastPolled: null, created: null} > 2013-07-16 08:37:41,506 DEBUG [cloud.api.ApiServlet] (catalina-exec-9:null) > ===END=== 10.146.0.20 -- GET > command=attachVolume&id=f07e07af-4822-4b1a-8176-83b5358a05f6&virtualMachineId=d2c6ba48-5729-4bf8-b7f3-26103b39ce3d&response=json&sessionkey=kt6%2B7hq85%2FU9HFfssTmfwxtFBfM%3D&_=1373978262627 > 2013-07-16 08:37:41,510 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-26:job-26 = [ 83a4e3e5-c357-4cef-b146-6a8bf254a88f ]) Executing > org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd for job-26 = [ > 83a4e3e5-c357-4cef-b146-6a8bf254a88f ] > 2013-07-16 08:37:41,567 DEBUG [storage.allocator.LocalStoragePoolAllocator] > (Job-Executor-26:job-26 = [ 83a4e3e5-c357-4cef-b146-6a8bf254a88f ]) > LocalStoragePoolAllocator trying to find storage pool to fit the vm > 2013-07-16 08:37:41,569 DEBUG > [storage.allocator.ClusterScopeStoragePoolAllocator] (Job-Executor-26:job-26 > = [ 83a4e3e5-c357-4cef-b146-6a8bf254a88f ]) ClusterScopeStoragePoolAllocator > looking for storage pool > 2013-07-16 08:37:41,569 DEBUG > [storage.allocator.ClusterScopeStoragePoolAllocator] (Job-Executor-26:job-26 > = [ 83a4e3e5-c357-4cef-b146-6a8bf254a88f ]) Looking for pools in dc: 1 pod:1 > cluster:1 > 2013-07-16 08:37:41,573 DEBUG > [storage.allocator.ClusterScopeStoragePoolAllocator] (Job-Executor-26:job-26 > = [ 83a4e3e5-c357-4cef-b146-6a8bf254a88f ]) No storage pools available for > shared volume allocation, returning > 2013-07-16 08:37:41,573 DEBUG > [storage.allocator.ZoneWideStoragePoolAllocator] (Job-Executor-26:job-26 = [ > 83a4e3e5-c357-4cef-b146-6a8bf254a88f ]) ZoneWideStoragePoolAllocator to find > storage pool > 2013-07-16 08:37:41,579 DEBUG > [storage.allocator.GarbageCollectingStoragePoolAllocator] > (Job-Executor-26:job-26 = [ 83a4e3e5-c357-4cef-b146-6a8bf254a88f ]) > GarbageCollectingStoragePoolAllocator looking for storage pool > 2013-07-16 08:37:41,604 DEBUG > [storage.allocator.ClusterScopeStoragePoolAllocator] (Job-Executor-26:job-26 > = [ 83a4e3e5-c357-4cef-b146-6a8bf254a88f ]) ClusterScopeStoragePoolAllocator > looking for storage pool > 2013-07-16 08:37:41,604 DEBUG > [storage.allocator.ClusterScopeStoragePoolAllocator] (Job-Executor-26:job-26 > = [ 83a4e3e5-c357-4cef-b146-6a8bf254a88f ]) Looking for pools in dc: 1 pod:1 > cluster:1 > 2013-07-16 08:37:41,608 DEBUG > [storage.allocator.ClusterScopeStoragePoolAllocator] (Job-Executor-26:job-26 > = [ 83a4e3e5-c357-4cef-b146-6a8bf254a88f ]) No storage pools available for > shared volume allocation, returning > 2013-07-16 08:37:41,608 WARN [cloud.storage.VolumeManagerImpl] > (Job-Executor-26:job-26 = [ 83a4e3e5-c357-4cef-b146-6a8bf254a88f ]) Unable to > find storage pool when create volume test > 2013-07-16 08:37:41,623 ERROR [cloud.async.AsyncJobManagerImpl] > (Job-Executor-26:job-26 = [ 83a4e3e5-c357-4cef-b146-6a8bf254a88f ]) > Unexpected exception while executing > org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd > com.cloud.utils.exception.CloudRuntimeException: Unable to find storage pool > when create volumetest > at > com.cloud.storage.VolumeManagerImpl.createVolume(VolumeManagerImpl.java:693) > at > com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125) > at > com.cloud.storage.VolumeManagerImpl.createVolumeOnPrimaryStorage(VolumeManagerImpl.java:1542) > at > com.cloud.storage.VolumeManagerImpl.attachVolumeToVM(VolumeManagerImpl.java:1828) > 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:1110) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > at java.lang.Thread.run(Thread.java:679) > 2013-07-16 08:37:41,626 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-26:job-26 = [ 83a4e3e5-c357-4cef-b146-6a8bf254a88f ]) Complete > async job-26 = [ 83a4e3e5-c357-4cef-b146-6a8bf254a88f ], jobStatus: 2, > resultCode: 530, result: Error Code: 530 Error text: Unable to find storage > pool when create volumetest > Following is the storage pool details from cloud DB: > ======================================= > mysql> select * from storage_pool\G; > *************************** 1. row *************************** > id: 1 > name: Rack1Pod1Host14 Local Storage > uuid: 03497158-90a8-426c-a02f-8345e4ba9ff8 > pool_type: Filesystem > port: 0 > data_center_id: 1 > pod_id: 1 > cluster_id: 1 > used_bytes: 5815529472 > capacity_bytes: 52844687360 > host_address: 10.147.40.14 > user_info: NULL > path: /var/lib/libvirt/images > created: 2013-07-16 09:54:10 > removed: NULL > update_time: NULL > status: Up > storage_provider_name: DefaultPrimary > scope: HOST > hypervisor: NULL > managed: 0 > capacity_iops: NULL > 1 row in set (0.00 sec) > ERROR: > No query specified > mysql> select * from image_store where removed is null\G; > *************************** 1. row *************************** > id: 7 > name: nfs://10.147.28.7/export/home/sanjeev/sec_kvm_os > image_provider_name: NFS > protocol: nfs > url: nfs://10.147.28.7/export/home/sanjeev/sec_kvm_os > data_center_id: 1 > scope: ZONE > role: ImageCache > uuid: aa07c444-910a-43ff-bfb7-621c0ddc6223 > parent: NULL > created: 2013-07-16 12:07:09 > removed: NULL > total_size: NULL > used_bytes: NULL > *************************** 2. row *************************** > id: 8 > name: obj_store > image_provider_name: S3 > protocol: http > url: NULL > data_center_id: NULL > scope: REGION > role: Image > uuid: ada9e8f2-2bf1-46b7-b19d-a9bd46a0a29d > parent: NULL > created: 2013-07-16 12:07:09 > removed: NULL > total_size: NULL > used_bytes: NULL > 2 rows in set (0.00 sec) > ERROR: > No query specified -- 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