This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2277989 - Upgrade to Satellite 6.15 fails with error "Error 1: Puppet Postgresql_conf resource 'log_min_duration_statement' failed"
Summary: Upgrade to Satellite 6.15 fails with error "Error 1: Puppet Postgresql_conf r...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Upgrades
Version: 6.15.0
Hardware: All
OS: All
high
high
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-04-30 14:00 UTC by Sayan Das
Modified: 2024-10-05 04:27 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-06-06 17:36:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   SAT-24849 0 None Migrated None 2024-06-06 17:36:06 UTC
Red Hat Knowledge Base (Solution) 7067868 0 None None None 2024-04-30 15:10:22 UTC

Description Sayan Das 2024-04-30 14:00:02 UTC
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

# 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

Comment 2 Eric Helms 2024-05-22 15:29:59 UTC
From what we have seen, this problem arises from having the same configuration option in postgresql.conf and the installer fails to handle that. This is most likely due to manually adding a configuration option to postgresql.conf (discouraged due to the installer owning this file) and the installer fails. To resolve, remove postgresql.conf and re-run the installer to allow it to put back the configuration file with the options as configured through the installer.

Adding ekohlvan in case he has additional details. I do not believe there is a fix for us to deliver to address this situation.

Comment 3 Eric Helms 2024-06-06 17:36:08 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.

Comment 4 Red Hat Bugzilla 2024-10-05 04:27:42 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


Note You need to log in before you can comment on or make changes to this bug.