[PDB-463] Assertion failure for v1 resource queries after upgrading to 1.6.x Created: 2014/02/18  Updated: 2016/04/27  Resolved: 2014/02/18

Status: Closed
Project: PuppetDB
Component/s: None
Affects Version/s: PDB 1.6.2
Fix Version/s: PDB 1.6.3

Type: Bug Priority: Normal
Reporter: Imri Zvik Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Story Points: 1
Sprint: 20140212 to 20140219

 Description   

We just upgraded to 1.6.2 from 1.5.0.
Our v1 resource queries stopped working with the following exception:

java.lang.AssertionError: Assert failed: (and (integer? limit) (>= limit 0))
at com.puppetlabs.puppetdb.http.v1.resources$produce_body.invoke(resources.clj:86)
at com.puppetlabs.puppetdb.http.v1.resources$routes$fn_6411$fn_6416.invoke(resources.clj:119)
at com.puppetlabs.puppetdb.http.v1.resources$routes$fn__6411.invoke(resources.clj:113)
at com.puppetlabs.puppetdb.http.v1.resources$routes.invoke(resources.clj:113)
at com.puppetlabs.middleware$verify_accepts_content_type$fn__5903.invoke(middleware.clj:104)
at com.puppetlabs.middleware$validate_query_params$fn__5908.invoke(middleware.clj:131)
at com.puppetlabs.puppetdb.http.v1$v1_app$fn__6801.invoke(v1.clj:12)
at net.cgrand.moustache$alter_request$fn__6156.invoke(moustache.clj:54)
at com.puppetlabs.puppetdb.http.v1$v1_app.invoke(v1.clj:12)
at com.puppetlabs.puppetdb.http.server$deprecated_app.invoke(server.clj:22)
at com.puppetlabs.puppetdb.http.server$deprecated_v1_app.invoke(server.clj:35)
at com.puppetlabs.puppetdb.http.server$routes$fn__9418.invoke(server.clj:41)
at net.cgrand.moustache$alter_request$fn__6156.invoke(moustache.clj:54)
at com.puppetlabs.puppetdb.http.server$routes.invoke(server.clj:41)
at ring.middleware.resource$wrap_resource$fn__9397.invoke(resource.clj:17)
at ring.middleware.params$wrap_params$fn__6098.invoke(params.clj:55)
at com.puppetlabs.middleware$wrap_with_authorization$fn__5882.invoke(middleware.clj:37)
at com.puppetlabs.middleware$wrap_with_certificate_cn$fn__5886.invoke(middleware.clj:52)
at com.puppetlabs.middleware$wrap_with_default_body$fn__5890.invoke(middleware.clj:59)
at com.puppetlabs.middleware$wrap_with_metrics_STAR_$fn_5924$fn_5933.invoke(middleware.clj:183)
at com.puppetlabs.utils.metrics$multitime_BANG_STAR$fn_5861$fn5862$fn_5863.invoke(metrics.clj:14)
at com.puppetlabs.utils.metrics.proxy$java.lang.Object$Callable$f8c5758f.call(Unknown Source)
at com.yammer.metrics.core.Timer.time(Timer.java:91)
at com.puppetlabs.utils.metrics$multitime_BANG_STAR$fn_5861$fn_5862.invoke(metrics.clj:14)
at com.puppetlabs.utils.metrics$multitime_BANG_STAR$fn_5861$fn5862$fn_5863.invoke(metrics.clj:14)
at com.puppetlabs.utils.metrics.proxy$java.lang.Object$Callable$f8c5758f.call(Unknown Source)
at com.yammer.metrics.core.Timer.time(Timer.java:91)
at com.puppetlabs.utils.metrics$multitime_BANG_STAR$fn_5861$fn_5862.invoke(metrics.clj:14)
at com.puppetlabs.utils.metrics$multitime_BANG_STAR.invoke(metrics.clj:17)
at com.puppetlabs.middleware$wrap_with_metrics_STAR_$fn__5924.invoke(middleware.clj:182)
at com.puppetlabs.middleware$wrap_with_globals$fn__5894.invoke(middleware.clj:70)
at com.puppetlabs.middleware$wrap_with_debug_logging$fn__5878.invoke(middleware.clj:24)
at ring.adapter.jetty$proxy_handler$fn__5781.invoke(jetty.clj:18)
at ring.adapter.jetty.proxy$org.eclipse.jetty.server.handler.AbstractHandler$0.handle(Unknown Source)
at org.eclipse.jetty.server.handler.GzipHandler.handle(GzipHandler.java:267)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:349)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:884)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:938)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76)
at org.eclipse.jetty.io.nio.SslConnection.handle(SslConnection.java:191)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
at java.lang.Thread.run(Thread.java:744)

To reproduce, you can try the example query from the docs (http://docs.puppetlabs.com/puppetdb/1.6/api/query/v3/resources.html), as it produces the same results.



 Comments   
Comment by Ken Barber [ 2014/02/18 ]

PR is here: https://github.com/puppetlabs/puppetdb/pull/860

Comment by Imri Zvik [ 2014/02/18 ]

The fix does make the exception go away, but it returns empty results on all queries.

Comment by Ken Barber [ 2014/02/18 ]

Imri Zvik this is fixed now with my latest commit.

Comment by Ken Barber [ 2014/03/27 ]

1.6.3 has now been released with this fix.

Generated at Wed Apr 25 07:43:38 PDT 2018 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.