Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-24849

Upgrade to Satellite 6.15 fails with error "Error 1: Puppet Postgresql_conf resource 'log_min_duration_statement' failed"

XMLWordPrintable

    • Important
    • No

      Description of problem:

      By default, this is what the expected output looks like for postgresql.conf on a working satellite.

      $ cat /var/lib/pgsql/data/postgresql.conf | grep log_min_duration_statement
      #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
      log_min_duration_statement = 1000

      and the "log_min_duration_statement = -1" line is always commented out.

      But uncommenting this will fail the upgrade to Satellite 6.15, while the installer can handle it just fine on Satellite 6.14

      Version-Release number of selected component (if applicable):

      Satellite 6.14.3 upgraded to 6.15.0

      How reproducible:

      Always

      Steps to Reproduce:
      1. Install A satellite 6.14.3 normally

      2. Edit /var/lib/pgsql/data/postgresql.conf and uncomment the log_min_duration_statement = -1 line

      1. grep log_min_duration_statement /var/lib/pgsql/data/postgresql.conf
        log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
        log_min_duration_statement = 1000

      3. Run satellite-installer

      4. Now try to upgrade to Satellite 6.15

      Actual results:

      Step 3, Success

      Step 4, Fails

      2024-04-30 19:17:35 [NOTICE] [configure] 2500 configuration steps out of 2546 steps complete.
      2024-04-30 19:17:40 [NOTICE] [configure] System configuration has finished.

      Error 1: Puppet Postgresql_conf resource 'log_min_duration_statement' failed. Logs:
      /Stage[main]/Postgresql::Server/Postgresql::Server::Config_entry[log_min_duration_statement]/Postgresql_conf[log_min_duration_statement]/require
      require to Class[Postgresql::Server::Initdb]
      /Stage[main]/Postgresql::Server/Postgresql::Server::Config_entry[log_min_duration_statement]/Postgresql_conf[log_min_duration_statement]/notify
      notify to Class[Postgresql::Server::Reload]
      /Stage[main]/Postgresql::Server/Postgresql::Server::Config_entry[log_min_duration_statement]/Postgresql_conf[log_min_duration_statement]
      Starting to evaluate the resource (1542 of 2537)
      Could not evaluate: uninitialized constant ParserError
      Did you mean? ParseError
      Evaluated in 0.00 seconds

      1 error was detected during installation.
      Please address the errors and re-run the installer to ensure the system is properly configured.
      Failing to do so is likely to result in broken functionality.

      The full log is at /var/log/foreman-installer/satellite.log

      From log:

      2024-04-30 19:15:17 [DEBUG ] [configure] /Stage[main]/Postgresql::Server/Postgresql::Server::Config_entry[log_line_prefix]/Postgresql_conf[log_line_prefix]: Evaluated in 0.00 seconds
      2024-04-30 19:15:17 [DEBUG ] [configure] Postgresql::Server::Config_entry[log_line_prefix]: Starting to evaluate the resource (1541 of 2537)
      2024-04-30 19:15:17 [DEBUG ] [configure] Postgresql::Server::Config_entry[log_line_prefix]: Evaluated in 0.00 seconds
      2024-04-30 19:15:17 [DEBUG ] [configure] /Stage[main]/Postgresql::Server/Postgresql::Server::Config_entry[log_min_duration_statement]/Postgresql_conf[log_min_duration_statement]: Starting to evaluate the resource (1542 of 2537)
      2024-04-30 19:15:17 [DEBUG ] [configure] DEBUG: parse_config Active Settings found in Postgreql config file: [{:line_number=>68, :key=>"max_connections", :ensure=>"present", :value=>500, :comment=>"(change requires restart)"}, {:li
      ne_number=>125, :key=>"shared_buffers", :ensure=>"present", :value=>"512MB", :comment=>"min 128kB"}, {:line_number=>144, :key=>"dynamic_shared_memory_type", :ensure=>"present", :value=>"posix", :comment=>"the default is the first o
      ption"}, {:line_number=>228, :key=>"max_wal_size", :ensure=>"present", :value=>"1GB", :comment=>nil}, {:line_number=>229, :key=>"min_wal_size", :ensure=>"present", :value=>"80MB", :comment=>nil}, {:line_number=>429, :key=>"logging_
      collector", :ensure=>"present", :value=>"on", :comment=>"Enable capturing of stderr and csvlog"}, {:line_number=>437, :key=>"log_filename", :ensure=>"present", :value=>"postgresql-%a.log", :comment=>"log file name pattern,"}, {:lin
      e_number=>441, :key=>"log_truncate_on_rotation", :ensure=>"present", :value=>"on", :comment=>"If on, an existing log file with the"}, {:line_number=>449, :key=>"log_rotation_age", :ensure=>"present", :value=>"1d", :comment=>"Automa
      tic rotation of logfiles will"}, {:line_number=>451, :key=>"log_rotation_size", :ensure=>"present", :value=>200000, :comment=>"Automatic rotation of logfiles will"}, {:line_number=>495, :key=>"log_min_duration_statement", :ensure=>
      "present", :value=>-1, :comment=>"-1 is disabled, 0 logs all statements"}, {:line_number=>543, :key=>"log_timezone", :ensure=>"present", :value=>"Asia/Kolkata", :comment=>nil}, {:line_number=>653, :key=>"datestyle", :ensure=>"prese
      nt", :value=>"iso, mdy", :comment=>nil}, {:line_number=>655, :key=>"timezone", :ensure=>"present", :value=>"Asia/Kolkata", :comment=>nil}, {:line_number=>669, :key=>"lc_messages", :ensure=>"present", :value=>"en_IN.UTF-8", :comment
      =>"locale for system error message"}, {:line_number=>671, :key=>"lc_monetary", :ensure=>"present", :value=>"en_IN.UTF-8", :comment=>"locale for monetary formatting"}, {:line_number=>672, :key=>"lc_numeric", :ensure=>"present", :val
      ue=>"en_IN.UTF-8", :comment=>"locale for number formatting"}, {:line_number=>673, :key=>"lc_time", :ensure=>"present", :value=>"en_IN.UTF-8", :comment=>"locale for time formatting"}, {:line_number=>676, :key=>"default_text_search_c
      onfig", :ensure=>"present", :value=>"pg_catalog.english", :comment=>nil}, {:line_number=>755, :key=>"checkpoint_completion_target", :ensure=>"present", :value=>0.9, :comment=>nil}, {:line_number=>756, :key=>"work_mem", :ensure=>"pr
      esent", :value=>"4MB", :comment=>nil}, {:line_number=>757, :key=>"log_line_prefix", :ensure=>"present", :value=>"%t ", :comment=>nil}, {:line_number=>758, :key=>"log_min_duration_statement", :ensure=>"present", :value=>1000, :comme
      nt=>nil}, {:line_number=>759, :key=>"port", :ensure=>"present", :value=>5432, :comment=>nil}, {:line_number=>760, :key=>"data_directory", :ensure=>"present", :value=>"/var/lib/pgsql/data", :comment=>nil}]
      2024-04-30 19:15:17 [ERROR ] [configure] /Stage[main]/Postgresql::Server/Postgresql::Server::Config_entry[log_min_duration_statement]/Postgresql_conf[log_min_duration_statement]: Could not evaluate: uninitialized constant ParserError
      2024-04-30 19:15:17 [ERROR ] [configure] Did you mean? ParseError
      2024-04-30 19:15:17 [DEBUG ] [configure] /Stage[main]/Postgresql::Server/Postgresql::Server::Config_entry[log_min_duration_statement]/Postgresql_conf[log_min_duration_statement]: Evaluated in 0.00 seconds
      2024-04-30 19:15:17 [DEBUG ] [configure] Postgresql::Server::Config_entry[log_min_duration_statement]: Starting to evaluate the resource (1543 of 2537)
      2024-04-30 19:15:17 [DEBUG ] [configure] Postgresql::Server::Config_entry[log_min_duration_statement]: Resource is being skipped, unscheduling all events
      2024-04-30 19:15:17 [DEBUG ] [configure] Postgresql::Server::Config_entry[log_min_duration_statement]: Evaluated in 0.00 seconds

      Expected results:

      Installer to just keep one working entry of log_min_duration_statement option and complete the upgrade.

      Additional info:

      The workaround is to comment out the first log_min_duration_statement entry ( having the -1 value ) and then re-run the upgrade

            jira-bugzilla-migration RH Bugzilla Integration
            rhn-support-saydas Sayan Das
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: