pongasoft / glu

Deployment Automation Platform
Apache License 2.0
521 stars 99 forks source link

NPE when selecting "bounce" or "stop" plans with a tags filter #242

Closed yashvyas closed 11 years ago

yashvyas commented 11 years ago

Steps to reproduce:

  1. In a glu console, select a large tag (many mount points under the tag)
  2. Click on the plans tab
  3. Select either bounce or stop plans The console will just sit there with a blank screen and the following stack trace is found in the console log :
2013/08/22 09:51:48.353 ERROR [GrailsExceptionResolver] NullPointerException occurred when processing request: [POST] /console/plan/create
Cannot invoke method hasAllTags() on null object. Stacktrace follows:
java.lang.NullPointerException: Cannot invoke method hasAllTags() on null object
        at org.linkedin.glu.provisioner.core.model.TagsSystemFilter.filter(TagsSystemFilter.groovy:54)
        at org.linkedin.glu.provisioner.core.model.LogicAndSystemFilterChain$_filter_closure1.doCall(LogicAndSystemFilterChain.groovy:32)
        at org.linkedin.glu.provisioner.core.model.LogicAndSystemFilterChain.filter(LogicAndSystemFilterChain.groovy:30)
        at org.linkedin.glu.orchestration.engine.delta.impl.SystemFiltersDeltaSystemModelFilter.filter(SystemFiltersDeltaSystemModelFilter.java:46)
        at org.linkedin.glu.orchestration.engine.delta.impl.SingleDeltaBuilder.computeFilteredKeys(SingleDeltaBuilder.java:326)
        at org.linkedin.glu.orchestration.engine.delta.impl.SingleDeltaBuilder.getFilteredKeys(SingleDeltaBuilder.java:98)
        at org.linkedin.glu.orchestration.engine.delta.impl.SingleDeltaBuilder.computeDependencies(SingleDeltaBuilder.java:260)
        at org.linkedin.glu.orchestration.engine.delta.impl.SingleDeltaBuilder.<init>(SingleDeltaBuilder.java:72)
        at org.linkedin.glu.orchestration.engine.delta.impl.MultiDeltaBuilder.<init>(MultiDeltaBuilder.java:54)
        at org.linkedin.glu.orchestration.engine.delta.impl.DeltaMgrImpl.computeDeltas(DeltaMgrImpl.java:96)
        at org.linkedin.glu.orchestration.engine.planner.PlannerServiceImpl.doComputeDeploymentPlans(PlannerServiceImpl.groovy:155)
        at org.linkedin.glu.orchestration.engine.planner.PlannerServiceImpl.computeDeploymentPlans(PlannerServiceImpl.groovy:132)
        at org.linkedin.glu.orchestration.engine.planner.PlannerServiceImpl.computeBouncePlans(PlannerServiceImpl.groovy:247)
        at org.linkedin.glu.orchestration.engine.planner.PlannerServiceImpl$_computePlans_closure5.doCall(PlannerServiceImpl.groovy:301)
        at org.linkedin.glu.groovy.utils.plugins.PluginServiceImpl.executePrePostMethods(PluginServiceImpl.groovy:106)
        at org.linkedin.glu.orchestration.engine.planner.PlannerServiceImpl.computePlans(PlannerServiceImpl.groovy:292)
        at org.linkedin.glu.orchestration.engine.planner.PlannerServiceImpl.computePlan(PlannerServiceImpl.groovy:319)
        at org.linkedin.glu.console.controllers.PlanController$_closure6.doCall(PlanController.groovy:184)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1448)
        at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:195)
        at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:575)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
        at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:276)
        at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:103)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
        at org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
        at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
        at org.eclipse.jetty.server.Server.handle(Server.java:368)
        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
        at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953)
        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
        at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
        at java.lang.Thread.run(Thread.java:662)

Context : We have recently upgraded from 4.3.1 to 4.7.1 and this is one of the issues that we are seeing. It happens sporadically, not every time the mentioned plans are selected.

ypujante commented 11 years ago

It is a bit weird that it is sporadic. I will take a look at it. Are you under java 6 or java 7?

yashvyas commented 11 years ago

Yeah we're stumped too. We are under java 6 currently. Let me know if there is anything you need me to do. Thanks Yan!

ypujante commented 11 years ago

Fixed in 5.3.0