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

Array match queries stopped working in version 7

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Template:
    • Team:
      HA
    • Story Points:
      3
    • Sprint:
      HA 2020-02-24, HA 2020-03-10, HA 2020-04-07
    • QA Risk Assessment:
      Needs Assessment

      Description

      In puppetdb-6.11.2-1.el7.noarch queries such as here will match within the fact facts.mcollective.server.collectives the value "mcollective":

      nodes[certname, deactivated] {  (certname in inventory[certname] {    facts.mcollective.server.collectives.match("\d+") = "mcollective"  })}

      In puppetdb 7 this match is not supported anymore and now cause exceptions like:

       

      Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near ")"
      Position: 1205
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2532)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2267)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:312)
      at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:448)
      at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:369)
      at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:153)
      at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:103)
      at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
      at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
      at puppetlabs.puppetdb.jdbc$call_with_array_converted_query_rows$fn__24748.invoke(jdbc.clj:320)
      at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:814)
      at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:741)
      at puppetlabs.puppetdb.jdbc$call_with_array_converted_query_rows.invokeStatic(jdbc.clj:312)
      at puppetlabs.puppetdb.jdbc$call_with_array_converted_query_rows.invoke(jdbc.clj:295)
      at puppetlabs.puppetdb.jdbc$call_with_array_converted_query_rows.invokeStatic(jdbc.clj:308)
      at puppetlabs.puppetdb.jdbc$call_with_array_converted_query_rows.invoke(jdbc.clj:295)
      at puppetlabs.puppetdb.query_eng$body_stream$fn_31251$fn31254$fn_31255.invoke(query_eng.clj:339)
      at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:771)
      at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:741)
      at puppetlabs.puppetdb.query_eng$body_stream$fn_31251$fn_31254.invoke(query_eng.clj:321)
      at puppetlabs.puppetdb.query_eng$body_stream$fn__31251.invoke(query_eng.clj:318)
      at puppetlabs.puppetdb.query_eng$generated_stream$fn__31225.invoke(query_eng.clj:275)
      at ring.util.io$piped_input_stream$fn__190.invoke(io.clj:28)
      at clojure.core$binding_conveyor_fn$fn__5754.invoke(core.clj:2030)
      at clojure.lang.AFn.call(AFn.java:18)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

       

        Attachments

          Activity

            People

            Assignee:
            rob.browning Rob Browning
            Reporter:
            ripienaar R.I.Pienaar
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support