Bug 1323101

Summary: Postgre 8.x to Postgres 9.x migration (from 3.6/EL6/Pgres8 to 4.0/EL7/Pgres9)
Product: [oVirt] ovirt-engine Reporter: Jiri Belka <jbelka>
Component: Database.CoreAssignee: Eli Mesika <emesika>
Status: CLOSED WONTFIX QA Contact: Pavel Stehlik <pstehlik>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.6.5CC: bugs, mperina, sbonazzo
Target Milestone: ---Keywords: FutureFeature
Target Release: ---Flags: rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-11 12:22:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jiri Belka 2016-04-01 09:45:59 UTC
Description of problem:

If an user would decide to migrate his engine 3.6 on EL6 to 3.6 on EL7, he would face an issue with "incompatibility" of original engine DB with new postgresql 9.x updated in EL7.

After migration and update all updateable packages (as some are locked via versionlock), the user won't be able to start DB as prerequisite for engine-setup update for rest of engine rpms.

postgresql complains about old version of database and recommends to run 'postgresql-setup upgrade'. Running DB conversion process finishes in changed DB configuration files which engine depends on:

- max connections are set (back) to '100' thus engine-setup would end with error

  solution:
    sed -i 's/^\(max_connections\).*/\1 = 150/;' /var/lib/pgsql/data/postgresql.conf

- DB access control is changed thus engine-setup won't connect to the DB:

  solution:
    cp /var/lib/pgsql/data-old/pg_hba.conf /var/lib/pgsql/data/pg_hba.conf

All this would maybe be worth of document that or to have a ovirt script to prepare DB and its configuration for next engine-setup run.

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

How reproducible:
100%

Steps to Reproduce:
1. engine on el6
2. migrate to el6 via redhat-upgrade-tool (or fedora equivalent)
3. update all rpms, remove obsolete el6 packages
4. try to start DB (fyi some daemons were disabled during migration)
5. engine-setup

Actual results:
undocumented flow, unable to run engine-setup after migration from el6 to el7

Expected results:
either document manual steps or have a ovirt script which would help to "reconfigure" env for next successful engine-setup run

Additional info:
discovered during POC testing of 3.6 el6 - > 4.0 el7

Comment 1 Martin Perina 2016-04-11 12:22:43 UTC
So after discussions with Integration team, we won't be supporting in-place upgrades on EL. The only way how to upgrade from 3.6 running on EL6 to 4.0 running on EL7 is using engine-backup tool with following steps:

1. On existing EL6 engine host run engine-backup to do full backup
2. Install new EL7 host with engine packages
3. Execute engine-backup on new EL7 host to restore data
4. Execute engine-setup