Bug 1867753 - Add check for checkpoint_segments postgres parameter
Summary: Add check for checkpoint_segments postgres parameter
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Maintain
Version: 6.8.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: 6.8.0
Assignee: Suraj Patil
QA Contact: Jameer Pathan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-10 16:40 UTC by Chris Roberts
Modified: 2023-09-14 06:05 UTC (History)
5 users (show)

Fixed In Version: rubygem-foreman_maintain-0.6.10
Doc Type: Known Issue
Doc Text:
Add check for checkpoint_segments postgres parameter
Clone Of:
Environment:
Last Closed: 2020-10-27 12:38:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 30729 0 Normal Closed Add check for checkpoint_segments postgres parameter 2021-02-15 14:16:15 UTC
Red Hat Bugzilla 1867311 0 high CLOSED Upgrade fails when checkpoint_segments postgres parameter configured 2024-03-25 16:16:28 UTC
Red Hat Product Errata RHBA-2020:4365 0 None None None 2020-10-27 12:38:59 UTC

Internal Links: 1867311

Description Chris Roberts 2020-08-10 16:40:05 UTC
Description of problem:
Add a check for checkpoint_segments postgres parameter, so the installer does not fail on upgrade. 

Version-Release number of selected component (if applicable):
satellite-6.8.0-0.7.beta.el7sat.noarch
satellite-installer-6.8.0.8-1.el7sat.noarch

Steps to Reproduce:
1. Have Sat 6.7 with /etc/foreman-installer/custom-hiera.yaml :
postgresql::server::config_entries:
  checkpoint_segments: 32

2. Run upgrade to 6.8

Actual results:
Aug  8 16:18:34 pmoravec-sat-test sh: 2020-08-08 14:18:34.450 GMT [17329] LOG:  unrecognized configuration parameter "checkpoint_segments" in file "/var/opt/rh/rh-postgresql12/lib/pgsql/data/postgresql.conf" line 760
Aug  8 16:18:34 pmoravec-sat-test sh: 2020-08-08 14:18:34.450 GMT [17329] FATAL:  configuration file "/var/opt/rh/rh-postgresql12/lib/pgsql/data/postgresql.conf" contains errors
Aug  8 16:18:34 pmoravec-sat-test systemd: postgresql.service: main process exited, code=exited, status=1/FAILURE

Expected results:
a check saying either turn this off or to add to custom hiera. 

Additional info:

This is based on BZ 1867311 reported by the installer. Ewoud says they should have to update their custom hiera to allow the upgrade to work:

https://bugzilla.redhat.com/show_bug.cgi?id=1867311#c2

Comment 1 Suraj Patil 2020-08-28 11:15:37 UTC
Created redmine issue https://projects.theforeman.org/issues/30729 from this bug

Comment 2 Bryan Kearney 2020-09-04 16:04:55 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30729 has been resolved.

Comment 3 Patrick Creech 2020-09-09 15:26:02 UTC
Hello,

Can we get a 0.6.z upstream release of foreman_maintain with this fix in it?

Thanks,
Patrick

Comment 4 Jameer Pathan 2020-09-16 04:36:11 UTC
Verified

Verified with:
- rubygem-foreman_maintain-0.6.10

Test steps:
- Install rubygem-foreman_maintain-0.6.10
- On Satellite 6.7 edit /etc/foreman-installer/custom-hiera.yaml :
postgresql::server::config_entries:
  checkpoint_segments: 32
- Try upgrading to satellite 6.8
OR
- foreman-maintain health check --label check-postgresql-checkpoint-segments

Observations:
- New check check-postgresql-checkpoint-segments is now added to detect checkpoint_segments postgres parameter,
if set the foreman-maintain check fails.


[root@dhcp-2-39 ~]# foreman-maintain health check --label check-postgresql-checkpoint-segments
Running ForemanMaintain::Scenario::FilteredScenario
================================================================================
Check if checkpoint_segments configuration exists on the system:      [OK]
--------------------------------------------------------------------------------

[root@dhcp-2-39 ~]# vim /etc/foreman-installer/custom-hiera.yaml
[root@dhcp-2-39 ~]# foreman-maintain health check --label check-postgresql-checkpoint-segments
Running ForemanMaintain::Scenario::FilteredScenario
================================================================================
Check if checkpoint_segments configuration exists on the system:      [FAIL]
ERROR: Tuning option 'checkpoint_segments' found.
This option is no longer valid for PostgreSQL 9.5 or newer.
Please remove it from following file and re-run the command.
- /etc/foreman-installer/custom-hiera.yaml
The presence of checkpoint_segments in /etc/foreman-installer/custom-hiera.yaml indicates manual tuning.
Manual tuning can override values provided by the --tuning parameter.
Review /etc/foreman-installer/custom-hiera.yaml for values that are already provided by the built in tuning profiles.
Built in tuning profiles also provide a supported upgrade path.

--------------------------------------------------------------------------------
Scenario [ForemanMaintain::Scenario::FilteredScenario] failed.

The following steps ended up in failing state:

  [check-postgresql-checkpoint-segments]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="check-postgresql-checkpoint-segments"


[root@dhcp-2-39 ~]# vim /etc/foreman-installer/custom-hiera.yaml
[root@dhcp-2-39 ~]# foreman-maintain health check --label check-postgresql-checkpoint-segments
Running ForemanMaintain::Scenario::FilteredScenario
================================================================================
Check if checkpoint_segments configuration exists on the system:      [FAIL]
ERROR: 'postgresql::server::config_entries' cannot be null.
Please remove it from following file and re-run the command.
- /etc/foreman-installer/custom-hiera.yaml

--------------------------------------------------------------------------------
Scenario [ForemanMaintain::Scenario::FilteredScenario] failed.

The following steps ended up in failing state:

  [check-postgresql-checkpoint-segments]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="check-postgresql-checkpoint-segments"

Comment 7 errata-xmlrpc 2020-10-27 12:38:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Satellite 6.8 Satellite Maintenance Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4365

Comment 9 Red Hat Bugzilla 2023-09-14 06:05:34 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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