Bug 1395306 - postgres upgrade script fails for 5.6 -5.7
Summary: postgres upgrade script fails for 5.6 -5.7
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.7.0
Assignee: Nick Carboni
QA Contact: luke couzens
URL:
Whiteboard: black:upgrade:migration:replication
Depends On: 1391693
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-15 16:20 UTC by Satoe Imaishi
Modified: 2017-01-12 04:48 UTC (History)
5 users (show)

Fixed In Version: 5.7.0.11
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1391693
Environment:
Last Closed: 2017-01-11 19:58:02 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 2 luke couzens 2016-11-16 10:40:34 UTC
It seems there is another issue with the upgrade script across all appliances (single or replicated) after running the upgrade script and making edits to postgres, postgres fails to start. 

systemctl enable rh-postgresql95-postgresql.service && systemctl start rh-postgresql95-postgresql.service
Job for rh-postgresql95-postgresql.service failed because the control process exited with error code. See "systemctl status rh-postgresql95-postgresql.service" and "journalctl -xe" for details.

Additional info:
● rh-postgresql95-postgresql.service - PostgreSQL database server
   Loaded: loaded (/usr/lib/systemd/system/rh-postgresql95-postgresql.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2016-11-16 05:09:59 EST; 1min 0s ago
  Process: 39832 ExecStart=/opt/rh/rh-postgresql95/root/usr/libexec/postgresql-ctl start -D ${PGDATA} -s -w -t ${PGSTARTTIMEOUT} (code=exited, status=1/FAILURE)
  Process: 39829 ExecStartPre=/opt/rh/rh-postgresql95/root/usr/libexec/postgresql-check-db-dir %N (code=exited, status=0/SUCCESS)

Nsystemd[1]: Starting PostgreSQL database server...
postgresql-ctl[39832]: LOG:  unrecognized configuration parameter "checkpoint_segments" in file "/var/opt/rh/rh-postgresql95/lib/pgsql/data/po...f" line 186
postgresql-ctl[39832]: FATAL:  configuration file "/var/opt/rh/rh-postgresql95/lib/pgsql/data/postgresql.conf" contains errors
postgresql-ctl[39832]: pg_ctl: could not start server
systemd[1]: rh-postgresql95-postgresql.service: control process exited, code=exited status=1
systemd[1]: Failed to start PostgreSQL database server.
systemd[1]: Unit rh-postgresql95-postgresql.service entered failed state.
systemd[1]: rh-postgresql95-postgresql.service failed.


line 186 would be checkpoint_segments = 15               # MIQ Value;

If I comment out this line then postgres starts and I can start evm.

Another note to point out is while running this I didnt actually add that line it was already in postgres.conf

Comment 3 Nick Carboni 2016-11-16 14:16:00 UTC
You still need to make the edits in the patch printed at the end of the script run for this to work.

This fix does not add automatic editing of the file after the old configuration is copied from the 9.4 cluster to the 9.5. That change is being tracked in https://bugzilla.redhat.com/show_bug.cgi?id=1391557

Comment 4 luke couzens 2016-11-16 15:53:45 UTC
Verified in 5.7.0.11


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