Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-3907

PQL's "in" operator throws errors on facts

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Environment:

      2018.1.0-rc15

    • Template:
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      It appears that any query with an in condition against a fact causes a HTTP 500 response.

      ✔ pe-mom1-prod ~ ❯ puppet query 'inventory { facts.osfamily in ["Debian", "RedHat"] }'
      Error response 500 Internal Server Error from server: <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
      <title>Error 500 Server Error</title>
      </head>
      <body><h2>HTTP ERROR 500</h2>
      <p>Problem accessing /pdb/query/v4. Reason:
      <pre>    Server Error</pre></p><h3>Caused by:</h3><pre>clojure.lang.ExceptionInfo: Value does not match schema: (not (map? nil)) {:type :schema.core/error, :schema {:type Keyword, :field (cond-pre Keyword honeysql.types.SqlCall honeysql.types.SqlRaw {:select Any, Any Any}), Any Any}, :value nil, :error (not (map? nil))}
      	at schema.core$validator$fn__2900.invoke(core.clj:155)
      	at schema.core$validate.invokeStatic(core.clj:164)
      	at schema.core$validate.invoke(core.clj:159)
      	at puppetlabs.puppetdb.query_eng.engine$eval29621$fn__29623.invoke(engine.clj:1207)
      	at puppetlabs.puppetdb.query_eng.engine$eval29579$fn__29580$G__29570__29585.invoke(engine.clj:1130)
      	at clojure.core$map$fn__4785.invoke(core.clj:2646)
      	at clojure.lang.LazySeq.sval(LazySeq.java:40)
      	at clojure.lang.LazySeq.seq(LazySeq.java:56)
      	at clojure.lang.ChunkedCons.chunkedNext(ChunkedCons.java:59)
      	at clojure.lang.ChunkedCons.next(ChunkedCons.java:43)
      	at clojure.lang.RT.next(RT.java:688)
      	at clojure.core$next__4341.invokeStatic(core.clj:64)
      	at clojure.core$nthnext.invokeStatic(core.clj:3062)
      	at clojure.core$nthnext.invoke(core.clj:3055)
      	at honeysql.format$format_predicate_STAR_.invokeStatic(format.clj:359)
      	at honeysql.format$format_predicate_STAR_.invoke(format.clj:356)
      	at honeysql.format$eval24199$fn__24201.invoke(format.clj:414)
      	at clojure.lang.MultiFn.invoke(MultiFn.java:233)
      	at honeysql.format$_format_clause.invokeStatic(format.clj:394)
      	at honeysql.format$_format_clause.invoke(format.clj:391)
      	at honeysql.format$eval24131$fn__24132$fn__24133$fn__24134.invoke(format.clj:326)
      	at clojure.core$comp$fn__4727.invoke(core.clj:2460)
      	at clojure.core$map$fn__4785.invoke(core.clj:2646)
      	at clojure.lang.LazySeq.sval(LazySeq.java:40)
      	at clojure.lang.LazySeq.seq(LazySeq.java:49)
      	at clojure.lang.Cons.next(Cons.java:39)
      	at clojure.lang.RT.next(RT.java:688)
      	at clojure.core$next__4341.invokeStatic(core.clj:64)
      	at clojure.string$join.invokeStatic(string.clj:191)
      	at clojure.string$join.invoke(string.clj:180)
      	at honeysql.format$space_join.invokeStatic(format.clj:15)
      	at honeysql.format$space_join.invoke(format.clj:14)
      	at honeysql.format$eval24131$fn__24132$fn__24133.invoke(format.clj:325)
      	at honeysql.format$eval24131$fn__24132.invoke(format.clj:323)
      	at honeysql.format$eval23921$fn__23922$G__23912__23927.invoke(format.clj:90)
      	at honeysql.format$format.invokeStatic(format.clj:236)
      	at honeysql.format$format.doInvoke(format.clj:208)
      	at clojure.lang.RestFn.invoke(RestFn.java:410)
      	at puppetlabs.puppetdb.query_eng.engine$eval29544$sql_from_query__29549$fn__29550.invoke(engine.clj:1124)
      	at puppetlabs.puppetdb.query_eng.engine$eval29544$sql_from_query__29549.invoke(engine.clj:1121)
      	at puppetlabs.puppetdb.query_eng.engine$eval29677$fn__29679.invoke(engine.clj:1139)
      	at puppetlabs.puppetdb.query_eng.engine$eval29579$fn__29580$G__29570__29585.invoke(engine.clj:1130)
      	at puppetlabs.puppetdb.query_eng.engine$plan__GT_sql.invokeStatic(engine.clj:1257)
      	at puppetlabs.puppetdb.query_eng.engine$plan__GT_sql.invoke(engine.clj:1254)
      	at puppetlabs.puppetdb.query_eng.engine$compile_user_query__GT_sql.invokeStatic(engine.clj:2304)
      	at puppetlabs.puppetdb.query_eng.engine$compile_user_query__GT_sql.doInvoke(engine.clj:2286)
      	at clojure.lang.RestFn.invoke(RestFn.java:442)
      	at puppetlabs.puppetdb.query_eng$query__GT_sql.invokeStatic(query_eng.clj:109)
      	at puppetlabs.puppetdb.query_eng$query__GT_sql.invoke(query_eng.clj:85)
      	at puppetlabs.puppetdb.query_eng$eval30769$produce_streaming_body__30774$fn__30775$fn__30778.invoke(query_eng.clj:193)
      	at puppetlabs.puppetdb.jdbc$with_transacted_connection_fn$fn__22458$fn__22459.invoke(jdbc.clj:483)
      	at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:628)
      	at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:598)
      	at puppetlabs.puppetdb.jdbc$with_transacted_connection_fn$fn__22458.invoke(jdbc.clj:482)
      	at puppetlabs.puppetdb.jdbc$eval22432$retry_sql_STAR___22437$fn__22438$fn__22439.invoke(jdbc.clj:454)
      	at puppetlabs.puppetdb.jdbc$eval22432$retry_sql_STAR___22437$fn__22438.invoke(jdbc.clj:453)
      	at puppetlabs.puppetdb.jdbc$eval22432$retry_sql_STAR___22437.invoke(jdbc.clj:444)
      	at puppetlabs.puppetdb.jdbc$with_transacted_connection_fn.invokeStatic(jdbc.clj:480)
      	at puppetlabs.puppetdb.jdbc$with_transacted_connection_fn.invoke(jdbc.clj:469)
      	at puppetlabs.puppetdb.query_eng$eval30769$produce_streaming_body__30774$fn__30775.invoke(query_eng.clj:189)
      	at puppetlabs.puppetdb.query_eng$eval30769$produce_streaming_body__30774.invoke(query_eng.clj:175)
      	at puppetlabs.puppetdb.http.query$query_handler$fn__34104.invoke(query.clj:377)
      	at clojure.core$comp$fn__4727.invoke(core.clj:2460)
      	at puppetlabs.puppetdb.http.query$extract_query$fn__34090.invoke(query.clj:311)
      	at compojure.response$eval7081$fn__7082.invoke(response.clj:33)
      	at compojure.response$eval7036$fn__7037$G__7027__7044.invoke(response.clj:6)
      	at puppetlabs.puppetdb.http.handlers$eval34244$root_routes__34249$fn__34250$fn__34254.invoke(handlers.clj:60)
      	at bidi.ring$eval32015$fn__32016.invoke(ring.clj:20)
      	at bidi.ring$eval31994$fn__31995$G__31985__32004.invoke(ring.clj:12)
      	at puppetlabs.puppetdb.middleware$eval33276$make_pdb_handler__33285$fn__33288$fn__33290.invoke(middleware.clj:336)
      	at puppetlabs.puppetdb.middleware$wrap_with_illegal_argument_catch$fn__33171.invoke(middleware.clj:99)
      	at puppetlabs.puppetdb.middleware$verify_accepts_content_type$fn__33175.invoke(middleware.clj:114)
      	at puppetlabs.puppetdb.middleware$verify_content_type$fn__33187.invoke(middleware.clj:144)
      	at puppetlabs.puppetdb.middleware$wrap_with_metrics$fn__33203$fn__33212.invoke(middleware.clj:239)
      	at puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_$fn__30846$fn__30847$fn__30848.invoke(metrics.clj:14)
      	at puppetlabs.puppetdb.utils.metrics.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source)
      	at com.codahale.metrics.Timer.time(Timer.java:101)
      	at puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_$fn__30846$fn__30847.invoke(metrics.clj:14)
      	at puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_$fn__30846$fn__30847$fn__30848.invoke(metrics.clj:14)
      	at puppetlabs.puppetdb.utils.metrics.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source)
      	at com.codahale.metrics.Timer.time(Timer.java:101)
      	at puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_$fn__30846$fn__30847.invoke(metrics.clj:14)
      	at puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_$fn__30846$fn__30847$fn__30848.invoke(metrics.clj:14)
      	at puppetlabs.puppetdb.utils.metrics.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source)
      	at com.codahale.metrics.Timer.time(Timer.java:101)
      	at puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_$fn__30846$fn__30847.invoke(metrics.clj:14)
      	at puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_.invokeStatic(metrics.clj:17)
      	at puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_.invoke(metrics.clj:6)
      	at puppetlabs.puppetdb.middleware$wrap_with_metrics$fn__33203.invoke(middleware.clj:238)
      	at puppetlabs.puppetdb.middleware$wrap_with_globals$fn__33166.invoke(middleware.clj:93)
      	at puppetlabs.puppetdb.http.server$build_app$fn__34819.invoke(server.clj:74)
      	at compojure.core$routing$fn__8751.invoke(core.clj:151)
      	at clojure.core$some.invokeStatic(core.clj:2592)
      	at clojure.core$some.invoke(core.clj:2583)
      	at compojure.core$routing.invokeStatic(core.clj:151)
      	at compojure.core$routing.doInvoke(core.clj:148)
      	at clojure.lang.RestFn.invoke(RestFn.java:423)
      	at puppetlabs.puppetdb.pdb_routing$wrap_with_context$fn__43892.invoke(pdb_routing.clj:35)
      	at compojure.core$if_context$fn__8813.invoke(core.clj:218)
      	at compojure.core$routing$fn__8751.invoke(core.clj:151)
      	at clojure.core$some.invokeStatic(core.clj:2592)
      	at clojure.core$some.invoke(core.clj:2583)
      	at compojure.core$routing.invokeStatic(core.clj:151)
      	at compojure.core$routing.doInvoke(core.clj:148)
      	at clojure.lang.RestFn.applyTo(RestFn.java:139)
      	at clojure.core$apply.invokeStatic(core.clj:648)
      	at clojure.core$apply.invoke(core.clj:641)
      	at compojure.core$routes$fn__8755.invoke(core.clj:156)
      	at compojure.core$routing$fn__8751.invoke(core.clj:151)
      	at clojure.core$some.invokeStatic(core.clj:2592)
      	at clojure.core$some.invoke(core.clj:2583)
      	at compojure.core$routing.invokeStatic(core.clj:151)
      	at compojure.core$routing.doInvoke(core.clj:148)
      	at clojure.lang.RestFn.invoke(RestFn.java:460)
      	at puppetlabs.puppetdb.pdb_routing$pdb_app$fn__43903.invoke(pdb_routing.clj:62)
      	at compojure.core$if_context$fn__8813.invoke(core.clj:218)
      	at puppetlabs.pe_puppetdb_extensions.sync.pe_routing$wrap_cert_and_token_authn$fn__46471.invoke(pe_routing.clj:57)
      	at puppetlabs.rbac_client.middleware.authentication$wrap_token_access_STAR_$fn__46341.invoke(authentication.clj:69)
      	at ring.middleware.params$wrap_params$fn__30946.invoke(params.clj:64)
      	at puppetlabs.puppetdb.middleware$wrap_with_certificate_cn$fn__33156.invoke(middleware.clj:75)
      	at puppetlabs.puppetdb.middleware$wrap_with_default_body$fn__33161.invoke(middleware.clj:82)
      	at puppetlabs.puppetdb.middleware$wrap_with_debug_logging$fn__33139.invoke(middleware.clj:39)
      	at puppetlabs.i18n.core$locale_negotiator$fn__124.invoke(core.clj:357)
      	at puppetlabs.trapperkeeper.services.webserver.jetty9_core$ring_handler$fn__38254.invoke(jetty9_core.clj:422)
      	at puppetlabs.trapperkeeper.services.webserver.jetty9_core.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a.handle(Unknown Source)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:170)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:219)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
      	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:454)
      	at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:56)
      	at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:169)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      	at org.eclipse.jetty.server.Server.handle(Server.java:564)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
      	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
      	at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:278)
      	at org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:148)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
      	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
      	at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)
      	at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
      	at java.lang.Thread.run(Thread.java:748)
      </pre>
      <hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/>
       
      </body>
      </html>
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              daniel.parks Daniel Parks
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Zendesk Support