cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre-Yves Ritschard" <...@spootnik.org>
Subject Re: Review Request 20557: CLOUDSTACK-6472 listUsageRecords generates NPEs for expunging instances
Date Wed, 23 Apr 2014 12:48:25 GMT


> On April 23, 2014, 8:10 a.m., Rajesh Battala wrote:
> > server/src/com/cloud/api/ApiResponseHelper.java, line 3350
> > <https://reviews.apache.org/r/20557/diff/1/?file=564547#file564547line3350>
> >
> >     There are tabs/whitespace characters introduced
> >     Please add what are the tests you have executed/verified.

Hi Rajesh,

Sorry about the whitespace. As for the reproduction steps, they are documented in https://issues.apache.org/jira/browse/CLOUDSTACK-6472,
I'll reproduce here:

1. Wait for cloud-usage to generate records for a running vm.
2. Delete the VM and wait for it to be in 'Expunged' state, it will have a non-null 'removed'
field in the vm_instance table
3. Issue the listUsageRecords API command, it will fail and log a stack trace to the management-server
log

The stack-trace that appears is as follows:

2014-04-22 00:18:07,417 ERROR [cloud.api.ApiServer] (catalina-exec-2:ctx-60c87510 ctx-22de212f
ctx-a88a3dd7) unhandled exception executing api command: listUsageRecords
java.lang.NullPointerException
at com.cloud.api.ApiResponseHelper.createUsageResponse(ApiResponseHelper.java:3308)
at org.apache.cloudstack.api.command.admin.usage.GetUsageRecordsCmd.execute(GetUsageRecordsCmd.java:119)
at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:161)
at com.cloud.api.ApiServer.queueCommand(ApiServer.java:531)
at com.cloud.api.ApiServer.handleRequest(ApiServer.java:374)
at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:323)
at com.cloud.api.ApiServlet.access$000(ApiServlet.java:53)
at com.cloud.api.ApiServlet$1.run(ApiServlet.java:115)
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:112)
at com.cloud.api.ApiServlet.doGet(ApiServlet.java:74)
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:615)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:647)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:744)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2282)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

To fix, apply the above patch, listUsageRecords will now correctly honor the request

 


- Pierre-Yves


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20557/#review41128
-----------------------------------------------------------


On April 23, 2014, 12:47 p.m., Pierre-Yves Ritschard wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20557/
> -----------------------------------------------------------
> 
> (Updated April 23, 2014, 12:47 p.m.)
> 
> 
> Review request for cloudstack.
> 
> 
> Bugs: CLOUDSTACK-6472
>     https://issues.apache.org/jira/browse/CLOUDSTACK-6472
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> This is a review request for CLOUDSTACK-6472 "listUsageRecords generates NPEs for expunging
instances"
> 
> The patch is against the 4.3 branch
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/api/ApiResponseHelper.java e543d1c 
> 
> Diff: https://reviews.apache.org/r/20557/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Pierre-Yves Ritschard
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message