Error 1: Puppet Postgresql_conf resource 'log_min_duration_statement' failed while upgrading to Red Hat Satellite 6.15

Solution Verified - Updated

Environment

  • Red Hat Satellite 6.15

Issue

  • While upgrading to the Red Hat Satellite 6.15, the upgrade fails with the following error:

        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
    

Resolution

  • This issue has been reported to the Red Hat Engineering team via This content is not included.Bugzilla 2277989 and is being actively investigated.

  • Until the official bugfix is released, Follow the steps mentioned below to resolve the issue and complete the upgrade:

    • Edit the /var/lib/pgsql/data/postgresql.conf file and ensure that there is just one active entry of log_min_duration_statement with the value set to 1000.

             $ 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
      
    • Re-run the upgrade process.

             For connected satellite server:
      
             # satellite-maintain upgrade run --target-version 6.15
      
             For disconnected satellite servers:
      
              # satellite-maintain upgrade run --target-version 6.15 --whitelist="repositories-validate,repositories-setup"
      

 

Reach out to the This content is not included.Red Hat Technical Support in case any further assistance would be required.

For more KB articles/solutions related to Red Hat Satellite 6.x Installation/Upgrade/Update Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Installation/Upgrade/Update Issues.

Root Cause

  • Manual editing of /var/lib/pgsql/data/postgresql.conf and uncommenting unexpected configuration options caused the failure. Refer to the Diagnostic steps for more information.

Diagnostic Steps

  • The following errors were logged in the /var/log/foreman-installer/satellite.log file, once the upgrade had failed:

       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
    
  • The /var/lib/pgsql/data/postgresql.conf file has two active log_min_duration_statement option declared with two different values i.e.

    $ 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
    

    whereas the expected is:

    $ 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
    
SBR
Product(s)
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.