Bug 1333746 - engine-setup does always backup of the DB
Summary: engine-setup does always backup of the DB
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Setup.Engine
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Sandro Bonazzola
QA Contact: Karolína Hajná
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-06 09:57 UTC by Pavel Stehlik
Modified: 2022-02-25 08:14 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-05-08 10:21:50 UTC
oVirt Team: Integration
Embargoed:


Attachments (Terms of Use)
ovirt-engine-setup-20160506104110-z0vhr4.log.tgz (47.49 KB, application/x-gzip)
2016-05-06 09:57 UTC, Pavel Stehlik
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHV-44897 0 None None None 2022-02-25 08:14:55 UTC

Description Pavel Stehlik 2016-05-06 09:57:08 UTC
Created attachment 1154543 [details]
ovirt-engine-setup-20160506104110-z0vhr4.log.tgz

Description of problem:
 When asking during upgrade for backuping DB => NO & confirmation => YES, those are only valid for DWH. EngineDB will be always backuped. Answerfile doesn't contain any variable for telling NO, for backuping engineDB. The problem escalates when using remote DB (see bug#1331168). This could simply happen when using 'yum/dnf update postgres' on remote/local machine and afterwards run engine-setup and get different version.

 My situation is:
...
2016-05-06 08:12:20 DEBUG otopi.ovirt_**FILTERED**_setup.**FILTERED**_common.database database.backup:654 db backup res {'result': [{'stderr': 'pg_dump: server version: 9.5.2; pg_dump version: 9.2.15\npg_dump: aborting because of server version mismatch\n', 'rc': 1}], 'stdout': ''}
...


Version-Release number of selected component (if applicable):
ovirt-engine-setup-4.0.0-0.0.master.20160505171839.git3a10586.el7.centos.noarch

How reproducible:
100%

Steps to Reproduce:
1. have different version of Postgres as remoteDB. 
2.
3.

Actual results:
[ ERROR ] Failed to execute stage 'Misc configuration': Failed to backup database, please check the log file for details

Expected results:
Either to check version of remoteDB as prerequisite of setup or allow to disable backup engineDB.

Additional info:

Comment 1 Yedidyah Bar David 2016-05-08 07:28:51 UTC
I'd rather keep enforcing backing up engine db.

I'd also prefer to backup dwh db, but since it might be huge, we decided this should be optional, see bug 1059286 and bug 910070.

If engine-setup fails because pg_dump fails due to incompatible pg client/server, then IMO this is a feature :-) I'd rather fail setup than fail the engine later on.

I agree a nicer error message and better checks would be nice.

Not sure what exactly we should check. IIUC normally client version should be <= server version, iow server should be backwards-compatible. But with pg_dump is the opposite, as if the client is too old it risks not being able to backup newer features it does not know about. But I know for sure we did have setups where version was not identical. And while 9.5 is new, in principle we can have a similar situation with el6/pg8.4 client (engine machine) and el7/pg9.2 server (pg machine). Our downstream docs require el6 pg server, but upstream I can't find anything (and we can have more c/s pairs). Adding Eli.

Comment 2 Yedidyah Bar David 2016-05-08 07:33:41 UTC
Can probably be closed as duplicate of bug 1331168, unless it's decided that engine db backup should be optional. Eli - please reply on that bug, and let's keep current bug only for this point (whether backup should be optional). Thanks.

Comment 3 Eli Mesika 2016-05-08 08:57:08 UTC
(In reply to Yedidyah Bar David from comment #2)

> If engine-setup fails because pg_dump fails due to incompatible pg 
> client/server, then IMO this is a feature :-) I'd rather fail setup than fail 
> the engine later on.

Agree 

> Can probably be closed as duplicate of bug 1331168, unless it's decided that
> engine db backup should be optional. Eli - please reply on that bug, and
> let's keep current bug only for this point (whether backup should be
> optional). Thanks.

I prefer to have backup as a must, the risk to have it optional is to fail upgrading a system with no way back, IMO this one should be closed as WONTFIX

Comment 4 Yedidyah Bar David 2016-05-08 09:16:25 UTC
Yaniv - Close WONTFIX?

Comment 5 Yaniv Lavi 2016-05-08 10:21:50 UTC
+1 this is by design, since the db is small and not having backup is very bad for the operational DB.


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