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

ASF subversion and git services commented on CLOUDSTACK-3488:
-------------------------------------------------------------

Commit 13fc4690fc39ebded2cf80895d8fd3a622c5b957 in branch refs/heads/master 
from [~sanjay.tripathi]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=13fc469 ]

CLOUDSTACK-3488: listStoragePools throws NPE if any of the storage pools are 
not in the right state.

This issue is reporducible if user adds a primary storage and quickly fires
listStoragePool API command without waiting for the responce of previous
createStoragePool API command. So during this period
(before receiving createStoragePool API resonce), the primary srorage is in
initialized status and the "scope" of storage is not set.

                
> listStoragePools throws NPE if any of the storage pools are not in the right 
> state
> ----------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-3488
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3488
>             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
>         Environment: 4.2
>            Reporter: Sowmya Krishnan
>            Assignee: Sanjay Tripathi
>             Fix For: 4.2.0
>
>
> listStoragePools throws NPE if any of the storage pools was erroneously 
> added. Will not be able to see any of the storage pool listing from UI as 
> well.
> Steps:
> =====
> Create a storage pool with incorrect parameters that causes it to remain in 
> "Initialized" state. For example, add storage pool before adding host in the 
> cluster
> Perform listStoragePools
> Exception:
> 2013-07-11 17:26:10,820 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===START===  10.151.138.80 -- GET  
> command=listStoragePools&page=1&pagesize=20&z
> oneid=2e15553c-0639-4304-823c-363354987b46&response=json&sessionkey=XcsJytPG7p62G7AKK1WBQerdmgM%3D&_=1373543589506
> 2013-07-11 17:26:10,835 ERROR [cloud.api.ApiServer] (catalina-exec-19:null) 
> unhandled exception executing api command: listStoragePools
> java.lang.NullPointerException
>         at 
> com.cloud.api.query.dao.StoragePoolJoinDaoImpl.newStoragePoolResponse(StoragePoolJoinDaoImpl.java:87)
>         at 
> com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
>         at 
> com.cloud.api.ApiDBUtils.newStoragePoolResponse(ApiDBUtils.java:1578)
>         at 
> com.cloud.api.query.ViewResponseHelper.createStoragePoolResponse(ViewResponseHelper.java:275)
>         at 
> com.cloud.api.query.QueryManagerImpl.searchForStoragePools(QueryManagerImpl.java:1829)
>         at 
> org.apache.cloudstack.api.command.admin.storage.ListStoragePoolsCmd.execute(ListStoragePoolsCmd.java:118)
>         at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:155)
>         at com.cloud.api.ApiServer.queueCommand(ApiServer.java:528)
>         at com.cloud.api.ApiServer.handleRequest(ApiServer.java:371)
>         at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:304)
>         at com.cloud.api.ApiServlet.doGet(ApiServlet.java:66)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>         at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>         at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>         at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>         at 
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
>         at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
>         at 
> org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
>         at 
> org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721)
>         at 
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2268)
>         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-11 17:26:10,841 DEBUG [cloud.api.ApiServlet] (catalina-exec-19:null) 
> ===END===  10.151.138.80 -- GET  
> command=listStoragePools&page=1&pagesize=20&zoneid=2e15553c-0639-4304-823c-363354987b46&response=json&sessionkey=XcsJytPG7p62G7AKK1WBQerdmgM%3D&_=1373543589506
>  

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