Bug 1020277

Summary: problems in engine-backup.sh
Product: Red Hat Enterprise Virtualization Manager Reporter: Yedidyah Bar David <didi>
Component: ovirt-engine-setupAssignee: Yedidyah Bar David <didi>
Status: CLOSED CURRENTRELEASE QA Contact: sefi litmanovich <slitmano>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, alonbl, bazulay, dfediuck, iheim, oschreib, Rhev-m-bugs, yeylon
Target Milestone: ---Keywords: Triaged
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: is20.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1026487    

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