Bug 1020277 - problems in engine-backup.sh
Summary: problems in engine-backup.sh
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-setup
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.3.0
Assignee: Yedidyah Bar David
QA Contact: sefi litmanovich
URL:
Whiteboard: integration
Depends On:
Blocks: 3.3snap1
TreeView+ depends on / blocked
 
Reported: 2013-10-17 11:19 UTC by Yedidyah Bar David
Modified: 2014-01-21 22:32 UTC (History)
8 users (show)

Fixed In Version: is20.2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 20264 0 None None None Never
oVirt gerrit 20349 0 None None None Never
oVirt gerrit 20372 0 None None None Never
oVirt gerrit 20484 0 None None None Never

Description Yedidyah Bar David 2013-10-17 11:19:04 UTC
Description of problem:

There are various issues/problems with the current implementation of engine-backup.sh:
1. Not all the files/folders that need to be backed up, are.
2. There is a conflict in SCOPE's db vs dbonly option.
3. It fails if some of the files to be backed up do not exist (which might happen e.g. when setup did not create them, based on used options)
4. It does not keep selinux contexts - this breaks a future setup after cleanup

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Yedidyah Bar David 2013-10-17 22:14:55 UTC
Should this script also start ovirt-engine/httpd so that the system is immediately usable? Similarly to after running engine-setup?

Current implementation (in gerrit) does so, calling the command 'service'.

Alon claims (there) that:
1. It's incorrect in principle
2. It's breaking compatibility with other OSes (gentoo, freebsd)
3. We should simply tell the user to start the engine and restart httpd

Comment 3 Doron Fediuck 2013-10-18 06:57:26 UTC
(In reply to Yedidyah Bar David from comment #2)
> Should this script also start ovirt-engine/httpd so that the system is
> immediately usable? Similarly to after running engine-setup?
> 
> Current implementation (in gerrit) does so, calling the command 'service'.
> 
> Alon claims (there) that:
> 1. It's incorrect in principle
> 2. It's breaking compatibility with other OSes (gentoo, freebsd)
> 3. We should simply tell the user to start the engine and restart httpd

I agree with Alon.
A wrapper script may orchestrate additional actions, including service stop/start
but he backup script should be as atomic as possible.

Comment 4 Yedidyah Bar David 2013-10-31 12:36:47 UTC
Just an explanation for http://gerrit.ovirt.org/20484 :

Without it, restore happily restores to an existing full db, which is almost never what the user wanted.

Comment 5 sefi litmanovich 2013-11-11 14:22:40 UTC
Verified on RHEVM 3.3 IS22.

reproduced with following flow:

engine-setup
engine-backup --mode=backup --file=somefile --log=somelog
engine-cleanup
droped database and user and created new ones manually
engine-backup --mode=restore --file=somefile --log-somelog --change-db-credentials [all relevant new DB credentials]
started ovirt-engine, restarted httpd - checked engine works fine, webadmin and DB.
engine-cleanup
engine-setup
check that setup works fine, webadmin, DB all intact.

Comment 6 Itamar Heim 2014-01-21 22:32:47 UTC
Closing - RHEV 3.3 Released

Comment 7 Itamar Heim 2014-01-21 22:32:50 UTC
Closing - RHEV 3.3 Released


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