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

PuppetDB ERROR: cannot set transaction read-write mode during recovery After Upgrade to 7.10

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • PDB 6.21.0, PDB 7.10.0
    • PDB 7.11.0, PDB 6.22.0
    • PuppetDB
    • None
    • CentOS 7
    • 7.10.0-1.el7
    • Dumpling
    • 1
    • Dumpling 6-7-22
    • Needs Assessment
    • Bug Fix
    • Hide
      The approach taken in the previous changes (cf. PDB-5483) to disable the jit was incompatible with PostgreSQL hot standbys: https://www.postgresql.org/docs/current/hot-standby.html#HOT-STANDBY-USERS

      The method of disabling the jit has been changed to avoid the problem.
      Show
      The approach taken in the previous changes (cf. PDB-5483 ) to disable the jit was incompatible with PostgreSQL hot standbys: https://www.postgresql.org/docs/current/hot-standby.html#HOT-STANDBY-USERS The method of disabling the jit has been changed to avoid the problem.
    • Needs Assessment

    Description

      Who found the bug?

      jplindquist 

      Where was the bug found?

      • System: Open Source Puppet Server with PuppetDB
      • Version: CentOS 7, PostgreSQL 14
      • Operating system(s):  CentOS 7
      • Puppet version: 7.15

      What is malfunctioning?

      Unable to upgrade PuppetDB from 7.9.2-1.el7 to 7.10.0-1.el7 due to error on the read database

       

      2022-04-13 13:20:29.295 MST [25657] ERROR:  cannot set transaction read-write mode during recovery
      2022-04-13 13:20:29.295 MST [25657] STATEMENT:  set transaction read write

       

      It seems to be coming from here (https://github.com/puppetlabs/puppetdb/blob/1423988e4a6e097f4eb1b1a95b43b62dc3d39dd4/src/puppetlabs/puppetdb/jdbc.clj#L651).  I'm no Clojure expert, but I'm wondering if that when read-only? is correct when it should not be setting read write on a read only replica.  I've downgraded back to 7.9 in the meantime to restore service, but we're unable to update past this for the time being.

      What does success look like?

      Successfully upgrading to the latest PuppetDB 7.10+

      How will success be validated?

      yum upgrade puppetdb && systemctl restart puppetdb

      without failure or logged errors on the database server

      Should anyone be contacted after this is fixed?

      jplindquist 

      Attachments

        Activity

          People

            rob.browning Rob Browning
            jplindquist Jon-Paul Lindquist
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support