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

Prasanna Santhanam commented on CLOUDSTACK-3937:
------------------------------------------------

Almost every AttachVolumeCmd fails for me:
2013-07-30 15:28:55,460 ERROR [cloud.async.AsyncJobManagerImpl] 
(Job-Executor-14:job-180 = [ e14c51f3-1cdd-4b0d-b352-5c7e8c4a125b ]) Unexpected 
exception while executing 
org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd
java.lang.NullPointerException
        at 
com.cloud.storage.VolumeManagerImpl.needMoveVolume(VolumeManagerImpl.java:1564)
        at 
com.cloud.storage.VolumeManagerImpl.attachVolumeToVM(VolumeManagerImpl.java:1847)
        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:439)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        at java.lang.Thread.run(Thread.java:680)

                
> Attaching uploaded volume is failing
> ------------------------------------
>
>                 Key: CLOUDSTACK-3937
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3937
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Storage Controller
>    Affects Versions: 4.2.0
>            Reporter: Koushik Das
>            Assignee: Koushik Das
>            Priority: Blocker
>             Fix For: 4.2.0
>
>
> This got introduced as part of bfe30cd2e31906365a306d87fe331ccdcec5c33c.
> The uploaded volume is first copied from secondary to primary and then 
> attached to a VM. Due to the above commit the copy logic is broken in all HVs 
> except Vmware.
> There is a method
>     public Pair<Boolean, Long> getCommandHostDelegation(long hostId, Command 
> cmd)
> that is overidden in VmwareGuru.java and not in any other specific HV guru.
> Earlier this method was not overridden in any HV guru and so the below method 
> used to fall back on the default behavior and used to return the passed 
> hostId but now with the Vmware guru implementation request for any HV gets 
> processed by Vmware guru and results in NPE.
>     public long getGuruProcessedCommandTargetHost(long hostId, Command cmd) {
>         for(HypervisorGuru guru : _hvGuruList) {
>             Pair<Boolean, Long> result = 
> guru.getCommandHostDelegation(hostId, cmd);
>             if (result.first()) {
>                 return result.second();
>             }
>         }
>         return hostId;
>     }

--
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

Reply via email to