Bug 1386298

Summary: Postgres won't start after upgrade from 5.5 - 5.7
Product: Red Hat CloudForms Management Engine Reporter: luke couzens <lcouzens>
Component: ApplianceAssignee: Nick Carboni <ncarboni>
Status: CLOSED CURRENTRELEASE QA Contact: luke couzens <lcouzens>
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.7.0CC: abellott, cpelland, jhardy, ncarboni, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: black:upgrade:migration
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1387710 (view as bug list) Environment:
Last Closed: 2017-06-12 16:19:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1387710    

Description luke couzens 2016-10-18 15:20:12 UTC
Description of problem:After a 5.5 - 5.7 migration and upgrading postgres from 94 - 95, postgres fails to start up.


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


How reproducible:100%


Steps to Reproduce:
1.provision 5.5 appliance
2.add 5.7 repos
3.run yum update
4.log out and in to reload ruby
5.run rake db:migrate
6.run rake evm:automate:reset
7.run /usr/bin/miq_postgres_upgrade.sh
8.make edits to postgres.conf following output from script ^
9.make other edits following [0]
10 start postgres95

Actual results:postgres fails to start exit code error 1


Expected results:postgres starts correctly


Additional info:
http://pastebin.test.redhat.com/422064

[0]/var/opt/rh/rh-postgresql95/lib/pgsql/data/


pg_ident.conf

+usermap    postgres    root


pg_hba.conf

+host  replication  all  all  md5

 
postgresql.conf

+wal_level = 'logical' # MIQ Value (pglogical) [line 162]

+max_wal_senders = 10        # MIQ Value (pglogical) max number of walsender processes [line 208]

+max_worker_processes = 10  # MIQ Value (pglogical)     [line 588]

+max_replication_slots = 10 # MIQ Value (pglogical)      [line 589]

Comment 3 CFME Bot 2016-10-20 18:17:52 UTC
New commit detected on ManageIQ/manageiq-appliance/master:
https://github.com/ManageIQ/manageiq-appliance/commit/9863c3a3d7cf5cda45e150efe76228b3abf4d71a

commit 9863c3a3d7cf5cda45e150efe76228b3abf4d71a
Author:     Nick Carboni <ncarboni>
AuthorDate: Thu Oct 20 12:06:01 2016 -0400
Commit:     Nick Carboni <ncarboni>
CommitDate: Thu Oct 20 13:58:26 2016 -0400

    Restore selinux context for new postgresql directories
    
    In some cases the executable files for postgres can end up with
    the incorrect selinux context causing the service to not be able to
    read postgresql.conf and fail to start.
    
    These lines will make sure the context is properly set for any newly
    installed files.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1386298

 LINK/usr/bin/miq_postgres_upgrade.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comment 5 luke couzens 2017-02-28 20:58:00 UTC
Verified migrating from 5.6 to 5.8.0.2