You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Sanjeev N (JIRA)" <ji...@apache.org> on 2013/08/28 08:14:51 UTC
[jira] [Reopened] (CLOUDSTACK-4492) [object_store_ref] Attaching
volume to a vm is failing after upgrade if the volume was uploaded before
upgrade
[ https://issues.apache.org/jira/browse/CLOUDSTACK-4492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sanjeev N reopened CLOUDSTACK-4492:
-----------------------------------
Reopening the issue because with the fix uploaded volume state is changed to "Uploaded" however attaching the volume is failing with NPE:
2013-08-28 02:03:50,170 DEBUG [cloud.api.ApiServlet] (catalina-exec-1:null) ===START=== 10.146.0.131 -- GET command=attachVolume&id=d58d7d97-0719-4629-b43b-78a8579dde3b&virtualMachineId=765aef0d-07d9-4b35-8661-c779c74b649c&response=json&sessionkey=vNQ7kc2GdEuxzKje8MQ2xSAqbAQ%3D&_=1377669830276
2013-08-28 02:03:50,299 DEBUG [cloud.async.AsyncJobManagerImpl] (catalina-exec-1:null) submit async job-54 = [ c2f2bcc1-4a85-4a84-9467-47729c1687a5 ], details: AsyncJobVO {id:54, userId: 2, accountId: 2, sessionKey: null, instanceType: Volume, instanceId: 13, cmd: org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd, cmdOriginator: null, cmdInfo: {"id":"d58d7d97-0719-4629-b43b-78a8579dde3b","response":"json","sessionkey":"vNQ7kc2GdEuxzKje8MQ2xSAqbAQ\u003d","cmdEventType":"VOLUME.ATTACH","ctxUserId":"2","virtualMachineId":"765aef0d-07d9-4b35-8661-c779c74b649c","httpmethod":"GET","_":"1377669830276","ctxAccountId":"2","ctxStartEventId":"198"}, 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-08-28 02:03:50,302 DEBUG [cloud.api.ApiServlet] (catalina-exec-1:null) ===END=== 10.146.0.131 -- GET command=attachVolume&id=d58d7d97-0719-4629-b43b-78a8579dde3b&virtualMachineId=765aef0d-07d9-4b35-8661-c779c74b649c&response=json&sessionkey=vNQ7kc2GdEuxzKje8MQ2xSAqbAQ%3D&_=1377669830276
2013-08-28 02:03:50,305 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-32:job-54 = [ c2f2bcc1-4a85-4a84-9467-47729c1687a5 ]) Executing org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd for job-54 = [ c2f2bcc1-4a85-4a84-9467-47729c1687a5 ]
2013-08-28 02:03:50,381 ERROR [cloud.async.AsyncJobManagerImpl] (Job-Executor-32:job-54 = [ c2f2bcc1-4a85-4a84-9467-47729c1687a5 ]) Unexpected exception while executing org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd
java.lang.NullPointerException
at com.cloud.storage.VolumeManagerImpl.copyVolume(VolumeManagerImpl.java:1501)
at com.cloud.storage.VolumeManagerImpl.createVolumeOnPrimaryStorage(VolumeManagerImpl.java:1543)
at com.cloud.storage.VolumeManagerImpl.attachVolumeToVM(VolumeManagerImpl.java:1862)
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-08-28 02:03:50,385 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-32:job-54 = [ c2f2bcc1-4a85-4a84-9467-47729c1687a5 ]) Complete async job-54 = [ c2f2bcc1-4a85-4a84-9467-47729c1687a5 ], jobStatus: 2, resultCode: 530, result: Error Code: 530 Error text: null
Attaching latest management server log file and cloud db.
> [object_store_ref] Attaching volume to a vm is failing after upgrade if the volume was uploaded before upgrade
> ---------------------------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-4492
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4492
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the default.)
> Components: Storage Controller, Volumes
> Affects Versions: 4.2.1
> Environment: Build is from commit :a6bf80216466ada185de7e04d3e64be4e25c11a7
> Upgrade from 3.0.6 to 4.2
> Reporter: Sanjeev N
> Assignee: edison su
> Priority: Critical
> Fix For: 4.2.1
>
> Attachments: cloud.dmp, management-server.rar
>
>
> Failing to attach a volume to a vm after upgrade if it was uploaded before upgrade.
> Steps to Reproduce:
> ================
> 1.Bring up CS with VMWare cluster using 3.0.6 GA build
> 2.upload volume using API:
> http://10.147.59.126:8096/client/api?command=uploadVolume&format=OVA&name=cent53-upload-BU&url=http://10.147.28.7/templates/vmware/CentOS5.3-x86_64.ova&zoneid=9076c21d-d0c4-4cee-9820-2a551b65616e&account=admin&domainid=1
> 3.Upgrade to 4.2
> 4.Deploy one vm with root disk
> 5.Try to attach the volume uploaded at step2 to vm created above
> Result:
> =====
> Attaching volume failed with InvalidParameterValueException
> Observations:
> ===========
> Uploaded volume has state set to "UploadOp" in volumes table. However AttachVolumeCmd is checking for volume state to be either in Allocated, Ready or in Uploaded state. So attaching is failing.
> Following is the log snippet:
> 2013-08-26 01:36:30,254 DEBUG [cloud.api.ApiServlet] (catalina-exec-4:null) ===START=== 10.146.0.131 -- GET command=attachVolume&id=55cd0b1d-cf01-4fff-b6a1-d2d3f6d90d7e&virtualMachineId=ce3c8eb5-05f9-445b-ab74-68751e8a982a&response=json&sessionkey=u8uFWRNIgqqVZ%2B%2FBLCQbaSfZMCw%3D&_=1377495389690
> 2013-08-26 01:36:30,405 DEBUG [cloud.async.AsyncJobManagerImpl] (catalina-exec-4:null) submit async job-189 = [ 0a33a5ee-9c58-4791-a0e5-cf6a070d9fc1 ], details: AsyncJobVO {id:189, 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":"55cd0b1d-cf01-4fff-b6a1-d2d3f6d90d7e","sessionkey":"u8uFWRNIgqqVZ+/BLCQbaSfZMCw\u003d","cmdEventType":"VOLUME.ATTACH","ctxUserId":"2","virtualMachineId":"ce3c8eb5-05f9-445b-ab74-68751e8a982a","httpmethod":"GET","_":"1377495389690","ctxAccountId":"2","ctxStartEventId":"2015"}, 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-08-26 01:36:30,408 DEBUG [cloud.api.ApiServlet] (catalina-exec-4:null) ===END=== 10.146.0.131 -- GET command=attachVolume&id=55cd0b1d-cf01-4fff-b6a1-d2d3f6d90d7e&virtualMachineId=ce3c8eb5-05f9-445b-ab74-68751e8a982a&response=json&sessionkey=u8uFWRNIgqqVZ%2B%2FBLCQbaSfZMCw%3D&_=1377495389690
> 2013-08-26 01:36:30,410 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-157:job-189 = [ 0a33a5ee-9c58-4791-a0e5-cf6a070d9fc1 ]) Executing org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd for job-189 = [ 0a33a5ee-9c58-4791-a0e5-cf6a070d9fc1 ]
> 2013-08-26 01:36:30,468 ERROR [cloud.async.AsyncJobManagerImpl] (Job-Executor-157:job-189 = [ 0a33a5ee-9c58-4791-a0e5-cf6a070d9fc1 ]) Unexpected exception while executing org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd
> com.cloud.exception.InvalidParameterValueException: Volume state must be in Allocated, Ready or in Uploaded state
> at com.cloud.storage.VolumeManagerImpl.attachVolumeToVM(VolumeManagerImpl.java:1807)
> 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-08-26 01:36:30,477 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-157:job-189 = [ 0a33a5ee-9c58-4791-a0e5-cf6a070d9fc1 ]) Complete async job-189 = [ 0a33a5ee-9c58-4791-a0e5-cf6a070d9fc1 ], jobStatus: 2, resultCode: 530, result: Error Code: 530 Error text: Volume state must be in Allocated, Ready or in Uploaded state
> Volume uploaded before upgrade:
> mysql> select * from volumes where id=20\G;
> *************************** 1. row ***************************
> id: 20
> account_id: 2
> domain_id: 1
> pool_id: NULL
> last_pool_id: NULL
> instance_id: NULL
> device_id: NULL
> name: cent53-upload-BU
> uuid: 55cd0b1d-cf01-4fff-b6a1-d2d3f6d90d7e
> size: 2147483648
> folder: NULL
> path: NULL
> pod_id: NULL
> data_center_id: 1
> iscsi_name: NULL
> host_ip: NULL
> volume_type: DATADISK
> pool_type: NULL
> disk_offering_id: 6
> template_id: NULL
> iso_id: NULL
> first_snapshot_backup_uuid: NULL
> recreatable: 0
> created: 2013-08-23 10:21:32
> attached: NULL
> updated: 2013-08-23 10:21:32
> removed: NULL
> state: UploadOp
> chain_info: NULL
> update_count: 1
> disk_type: NULL
> vm_snapshot_chain_size: NULL
> display_volume: 1
> format: NULL
> min_iops: NULL
> max_iops: NULL
> 1 row in set (0.00 sec)
> mysql> select * from volume_store_ref\G;
> *************************** 1. row ***************************
> id: 1
> store_id: 2
> volume_id: 20
> zone_id: 1
> created: 2013-08-23 10:21:32
> last_updated: 2013-08-23 11:33:27
> job_id: c37f188f-b064-4e9e-9067-5c90467a8bf4
> download_pct: 100
> size: 2147483648
> physical_size: 459320832
> download_state: DOWNLOADED
> checksum: NULL
> error_str: Install completed successfully at 8/23/13 10:27 AM
> local_path: /mnt/SecStorage/bc9187bb-901f-3370-97cf-1821ac45b564/volumes/20/dnld3787038292255267623tmp_
> install_path: volumes/20/dbcd8a50-0621-32b1-9bd3-25da28da6791.ova
> url: http://10.147.28.7/templates/vmware/CentOS5.3-x86_64.ova
> download_url: NULL
> download_url_created: NULL
> state: Ready
> destroyed: 0
> update_count: 0
> ref_cnt: 0
> updated: NULL
> 1 row in set (0.00 sec)
> ERROR:
> No query specified
> Attaching management server log file and cloud DB.
--
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