Closed torstenfohrer closed 4 months ago
Querying puppetdb 8.5.0 with following
[ "from", "node", ['extract', ['latest_report_status'], ['and', ['=', 'certname', 'SOMECERTNAME'], ] ] ]
Results now in a exception in puppetdb:
:cause ERROR: missing FROM-clause entry for table "certnames" Position: 425 :via [{:type org.postgresql.util.PSQLException :message ERROR: missing FROM-clause entry for table "certnames" Position: 425 :at [org.postgresql.core.v3.QueryExecutorImpl receiveErrorResponse QueryExecutorImpl.java 2725]}] :trace [[org.postgresql.core.v3.QueryExecutorImpl receiveErrorResponse QueryExecutorImpl.java 2725] [org.postgresql.core.v3.QueryExecutorImpl processResults QueryExecutorImpl.java 2412] [org.postgresql.core.v3.QueryExecutorImpl execute QueryExecutorImpl.java 371] [org.postgresql.jdbc.PgStatement executeInternal PgStatement.java 502] [org.postgresql.jdbc.PgStatement execute PgStatement.java 419] [org.postgresql.jdbc.PgPreparedStatement executeWithFlags PgPreparedStatement.java 194] [org.postgresql.jdbc.PgPreparedStatement executeQuery PgPreparedStatement.java 137] [com.zaxxer.hikari.pool.ProxyPreparedStatement executeQuery ProxyPreparedStatement.java 52] [com.zaxxer.hikari.pool.HikariProxyPreparedStatement executeQuery HikariProxyPreparedStatement.java -1] [puppetlabs.puppetdb.jdbc$call_with_array_converted_query_rows$fn21985 invoke jdbc.clj 330] [clojure.java.jdbc$db_transactionSTAR invokeStatic jdbc.clj 860] [clojure.java.jdbc$db_transactionSTAR invoke jdbc.clj 776] [puppetlabs.puppetdb.jdbc$call_with_array_converted_query_rows invokeStatic jdbc.clj 322] [puppetlabs.puppetdb.jdbc$call_with_array_converted_query_rows invoke jdbc.clj 304] [puppetlabs.puppetdb.query_eng$body_stream$serialize_query_response29427$fn29477$fn29494$fn29495 invoke query_eng.clj 445] [clojure.java.jdbc$db_transactionSTAR invokeStatic jdbc.clj 807] [clojure.java.jdbc$db_transactionSTAR invoke jdbc.clj 776] [puppetlabs.puppetdb.query_eng$body_stream$serialize_query_response29427$fn29477$fn__29494 invoke query_eng.clj 434] [puppetlabs.puppetdb.query_eng$body_stream$serialize_query_response29427$fn29477 invoke query_eng.clj 433] [puppetlabs.puppetdb.query_eng$body_stream$serialize_query_response__29427 invoke query_eng.clj 427] [puppetlabs.puppetdb.query_eng$generated_stream$fn29384 invoke query_eng.clj 334] [ring.util.io$piped_input_stream$fn20730 invoke io.clj 28] [clojure.core$binding_conveyor_fn$fn5823 invoke core.clj 2047] [clojure.lang.AFn call AFn.java 18] [java.util.concurrent.FutureTask run FutureTask.java 264] [java.util.concurrent.ThreadPoolExecutor runWorker ThreadPoolExecutor.java 1136] [java.util.concurrent.ThreadPoolExecutor$Worker run ThreadPoolExecutor.java 635] [java.lang.Thread run Thread.java 840]]}
Returns last report status of certname
@torstenfohrer thanks for reporting this bug. We are able to reproduce it locally, and will work on a fix for it.
Migrated issue to PDB-5743
PuppetDB 8.5.1 has been released with the fix for this issue.
Describe the Bug
Querying puppetdb 8.5.0 with following
[ "from", "node", ['extract', ['latest_report_status'], ['and', ['=', 'certname', 'SOMECERTNAME'], ] ] ]
Results now in a exception in puppetdb:
:cause ERROR: missing FROM-clause entry for table "certnames" Position: 425 :via [{:type org.postgresql.util.PSQLException :message ERROR: missing FROM-clause entry for table "certnames" Position: 425 :at [org.postgresql.core.v3.QueryExecutorImpl receiveErrorResponse QueryExecutorImpl.java 2725]}] :trace [[org.postgresql.core.v3.QueryExecutorImpl receiveErrorResponse QueryExecutorImpl.java 2725] [org.postgresql.core.v3.QueryExecutorImpl processResults QueryExecutorImpl.java 2412] [org.postgresql.core.v3.QueryExecutorImpl execute QueryExecutorImpl.java 371] [org.postgresql.jdbc.PgStatement executeInternal PgStatement.java 502] [org.postgresql.jdbc.PgStatement execute PgStatement.java 419] [org.postgresql.jdbc.PgPreparedStatement executeWithFlags PgPreparedStatement.java 194] [org.postgresql.jdbc.PgPreparedStatement executeQuery PgPreparedStatement.java 137] [com.zaxxer.hikari.pool.ProxyPreparedStatement executeQuery ProxyPreparedStatement.java 52] [com.zaxxer.hikari.pool.HikariProxyPreparedStatement executeQuery HikariProxyPreparedStatement.java -1] [puppetlabs.puppetdb.jdbc$call_with_array_converted_query_rows$fn21985 invoke jdbc.clj 330] [clojure.java.jdbc$db_transactionSTAR invokeStatic jdbc.clj 860] [clojure.java.jdbc$db_transactionSTAR invoke jdbc.clj 776] [puppetlabs.puppetdb.jdbc$call_with_array_converted_query_rows invokeStatic jdbc.clj 322] [puppetlabs.puppetdb.jdbc$call_with_array_converted_query_rows invoke jdbc.clj 304] [puppetlabs.puppetdb.query_eng$body_stream$serialize_query_response29427$fn29477$fn29494$fn29495 invoke query_eng.clj 445] [clojure.java.jdbc$db_transactionSTAR invokeStatic jdbc.clj 807] [clojure.java.jdbc$db_transactionSTAR invoke jdbc.clj 776] [puppetlabs.puppetdb.query_eng$body_stream$serialize_query_response29427$fn29477$fn__29494 invoke query_eng.clj 434] [puppetlabs.puppetdb.query_eng$body_stream$serialize_query_response29427$fn29477 invoke query_eng.clj 433] [puppetlabs.puppetdb.query_eng$body_stream$serialize_query_response__29427 invoke query_eng.clj 427] [puppetlabs.puppetdb.query_eng$generated_stream$fn29384 invoke query_eng.clj 334] [ring.util.io$piped_input_stream$fn20730 invoke io.clj 28] [clojure.core$binding_conveyor_fn$fn5823 invoke core.clj 2047] [clojure.lang.AFn call AFn.java 18] [java.util.concurrent.FutureTask run FutureTask.java 264] [java.util.concurrent.ThreadPoolExecutor runWorker ThreadPoolExecutor.java 1136] [java.util.concurrent.ThreadPoolExecutor$Worker run ThreadPoolExecutor.java 635] [java.lang.Thread run Thread.java 840]]}
Expected Behavior
Returns last report status of certname
Environment