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

replace facts failing for some nodes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: PDB 5.2.1
    • Fix Version/s: PDB 5.1.5, PDB 5.2.2
    • Component/s: None
    • Environment:

      Puppet Server Version: 2018.1.0-rc11
      Puppet Version: 5.5.0

    • Template:
    • Team:
      Data Platform
    • Sprint:
      Data Platform 2018-04-11
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      When the PE package inspector is configured, duplicate package data can sometimes be submitted from the 'gem' and similar package providers. PuppetDB now removes these duplicates, instead of rejecting the data.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Some nodes are not able to update facts when they run Puppet. The facts are correctly processed by facter, but they are never updated in PuppetDB.

      The exception below shows up in the PuppetDB log:

      2018-03-06 20:30:23,236 ERROR [p.p.command] [8,101,330] [replace facts] Retrying after attempt 0 for dagr.delivery.puppetlabs.net, due to: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "package_hash_key"
        Detail: Key (hash)=(\xee8fe1767d1d1fc141ed94bb13479d4183b2cce8) already exists.
      org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "package_hash_key"
        Detail: Key (hash)=(\xee8fe1767d1d1fc141ed94bb13479d4183b2cce8) already exists.
      	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284)
      	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003)
      	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:200)
      	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424)
      	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:161)
      	at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:133)
      	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
      	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
      	at clojure.java.jdbc$db_do_execute_prepared_return_keys$exec_and_return_keys__21867.invoke(jdbc.clj:760)
      	at clojure.java.jdbc$db_do_execute_prepared_return_keys.invokeStatic(jdbc.clj:774)
      	at clojure.java.jdbc$db_do_execute_prepared_return_keys.invoke(jdbc.clj:753)
      	at clojure.java.jdbc$db_do_prepared_return_keys.invokeStatic(jdbc.clj:802)
      	at clojure.java.jdbc$db_do_prepared_return_keys.invoke(jdbc.clj:782)
      	at clojure.java.jdbc$multi_insert_helper$fn__21932.invoke(jdbc.clj:1044)
      	at clojure.core$map$fn__4785.invoke(core.clj:2644)
      	at clojure.lang.LazySeq.sval(LazySeq.java:40)
      	at clojure.lang.LazySeq.seq(LazySeq.java:49)
      	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$dorun.invokeStatic(core.clj:3033)
      	at clojure.core$doall.invokeStatic(core.clj:3039)
      	at clojure.core$doall.invoke(core.clj:3039)
      	at clojure.java.jdbc$multi_insert_helper.invokeStatic(jdbc.clj:1044)
      	at clojure.java.jdbc$multi_insert_helper.invoke(jdbc.clj:1039)
      	at clojure.java.jdbc$insert_helper$fn__21935.invoke(jdbc.clj:1051)
      	at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:662)
      	at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:598)
      	at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:611)
      	at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:598)
      	at clojure.java.jdbc$insert_helper.invokeStatic(jdbc.clj:1051)
      	at clojure.java.jdbc$insert_helper.invoke(jdbc.clj:1046)
      	at clojure.java.jdbc$insert_rows_BANG_.invokeStatic(jdbc.clj:1108)
      	at clojure.java.jdbc$insert_rows_BANG_.invoke(jdbc.clj:1095)
      	at clojure.java.jdbc$insert_multi_BANG_.invokeStatic(jdbc.clj:1160)
      	at clojure.java.jdbc$insert_multi_BANG_.invoke(jdbc.clj:1147)
      	at puppetlabs.puppetdb.jdbc$insert_multi_BANG_.invokeStatic(jdbc.clj:173)
      	at puppetlabs.puppetdb.jdbc$insert_multi_BANG_.invoke(jdbc.clj:166)
      	at puppetlabs.puppetdb.scf.storage$insert_missing_packages.invokeStatic(storage.clj:881)
      	at puppetlabs.puppetdb.scf.storage$insert_missing_packages.invoke(storage.clj:877)
      	at puppetlabs.puppetdb.scf.storage$eval28296$update_packages__28301$fn__28302.invoke(storage.clj:904)
      	at puppetlabs.puppetdb.scf.storage$eval28296$update_packages__28301.invoke(storage.clj:892)
      	at puppetlabs.puppetdb.scf.storage$eval28414$update_facts_BANG___28419$fn__28423$fn__28425.invoke(storage.clj:1092)
      	at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:662)
      	at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:598)
      	at puppetlabs.puppetdb.scf.storage$eval28414$update_facts_BANG___28419$fn__28423.invoke(storage.clj:1058)
      	at puppetlabs.puppetdb.scf.storage$eval28414$update_facts_BANG___28419.invoke(storage.clj:1052)
      	at puppetlabs.puppetdb.scf.storage$eval28678$replace_facts_BANG___28683$fn__28687$fn__28689.invoke(storage.clj:1419)
      	at puppetlabs.puppetdb.scf.storage.proxy$java.lang.Object$Callable$7da976d4.call(Unknown Source)
      	at com.codahale.metrics.Timer.time(Timer.java:101)
      	at puppetlabs.puppetdb.scf.storage$eval28678$replace_facts_BANG___28683$fn__28687.invoke(storage.clj:1416)
      	at puppetlabs.puppetdb.scf.storage$eval28678$replace_facts_BANG___28683.invoke(storage.clj:1409)
      	at puppetlabs.puppetdb.command$replace_facts_STAR_$fn__32899.invoke(command.clj:308)
      	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.command$replace_facts_STAR_.invokeStatic(command.clj:306)
      	at puppetlabs.puppetdb.command$replace_facts_STAR_.invoke(command.clj:299)
      	at puppetlabs.puppetdb.command$replace_facts.invokeStatic(command.clj:313)
      	at puppetlabs.puppetdb.command$replace_facts.invoke(command.clj:311)
      	at puppetlabs.puppetdb.command$process_command_BANG_.invokeStatic(command.clj:395)
      	at puppetlabs.puppetdb.command$process_command_BANG_.invoke(command.clj:387)
      	at puppetlabs.puppetdb.command$process_command_and_respond_BANG_$fn__33035.invoke(command.clj:450)
      	at puppetlabs.puppetdb.command$call_with_quick_retry$fn__33028.invoke(command.clj:431)
      	at puppetlabs.puppetdb.command$call_with_quick_retry.invokeStatic(command.clj:430)
      	at puppetlabs.puppetdb.command$call_with_quick_retry.invoke(command.clj:428)
      	at puppetlabs.puppetdb.command$process_command_and_respond_BANG_.invokeStatic(command.clj:448)
      	at puppetlabs.puppetdb.command$process_command_and_respond_BANG_.invoke(command.clj:445)
      	at puppetlabs.puppetdb.command$process_cmdref$fn__33045.invoke(command.clj:513)
      	at puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_$fn__30827$fn__30828$fn__30829.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__30827$fn__30828.invoke(metrics.clj:14)
      	at puppetlabs.puppetdb.utils.metrics$multitime_BANG__STAR_$fn__30827$fn__30828$fn__30829.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__30827$fn__30828.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.command$process_cmdref.invokeStatic(command.clj:509)
      	at puppetlabs.puppetdb.command$process_cmdref.invoke(command.clj:488)
      	at puppetlabs.puppetdb.command$message_handler$fn__33053.invoke(command.clj:559)
      	at puppetlabs.puppetdb.threadpool$dochan$fn__32810$fn__32811.invoke(threadpool.clj:117)
      	at puppetlabs.puppetdb.threadpool$call_on_threadpool$fn__32805.invoke(threadpool.clj:95)
      	at clojure.lang.AFn.run(AFn.java:22)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                andrew.roetker AJ Roetker
                Reporter:
                daniel.parks Daniel Parks
              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: