Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1073372 - Restore doesn't work after cleanup
Summary: Restore doesn't work after cleanup
Keywords:
Status: CLOSED DUPLICATE of bug 1066654
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-installer
Version: 3.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.4.0
Assignee: Yedidyah Bar David
QA Contact: Pavel Stehlik
URL:
Whiteboard: integration
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-06 10:15 UTC by Lior Vernia
Modified: 2015-05-05 01:44 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-09 10:04:10 UTC
oVirt Team: ---


Attachments (Terms of Use)

Description Lior Vernia 2014-03-06 10:15:33 UTC
Description of problem:

Running engine-backup (in restore mode), following an engine-cleanup, results in the following error: "FATAL: Database is not empty"


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

oVirt 3.4.0 RC.


How reproducible:

Always (well, one out of one for me).


Steps to Reproduce:
1. Run "engine-setup".
2. Configure all sorts of things on engine.
3. Run "engine-backup --mode=backup --file=ovirt.backup --log=ovirt.log"
4. Run "engine-cleanup".
5. Run "engine-backup --mode=restore --file=ovirt.backup --log=ovirt.log"

Actual results:

Get the aforementioned error.


Expected results:

The deployment is restored.


Additional info:

Log file looks like this:


2014-03-06 04:50:18 18401: Backing up...
2014-03-06 04:50:18 18401: Generating pgpass
2014-03-06 04:50:18 18401: Creating temp folder /tmp/engine-backup.X6m3IfbCkx/tar
2014-03-06 04:50:18 18401: Backing up files to /tmp/engine-backup.X6m3IfbCkx/tar/files
2014-03-06 04:50:18 18401: Backing up database to /tmp/engine-backup.X6m3IfbCkx/tar/db/engine_backup.db
2014-03-06 04:50:19 18401: Creating md5sum at /tmp/engine-backup.X6m3IfbCkx/tar/md5sum
2014-03-06 04:50:19 18401: Creating tarball ovirt.backup
2014-03-06 04:50:19 18401: Done.
2014-03-06 04:54:59 18685: FATAL: Engine service is active - can not restore backup
2014-03-06 04:55:29 18742: Restoring...
2014-03-06 04:55:29 18742: Opening tarball ovirt.backup to /tmp/engine-backup.uhgg5ewqOL
2014-03-06 04:55:29 18742: Verifying md5
2014-03-06 04:55:29 18742: Verifying version
2014-03-06 04:55:29 18742: Restoring files
2014-03-06 04:55:30 18742: Reloading configuration
2014-03-06 04:55:30 18742: Generating pgpass
2014-03-06 04:55:30 18742: Verifying connection
 ?column? 
----------
        1
(1 row)

2014-03-06 04:55:31 18742: FATAL: Database is not empty
2014-03-06 04:58:54 20173: Restoring...
2014-03-06 04:58:54 20173: Opening tarball ovirt.backup to /tmp/engine-backup.VhdaFg7Gpq
2014-03-06 04:58:54 20173: Verifying md5
2014-03-06 04:58:54 20173: Verifying version
2014-03-06 04:58:54 20173: Restoring files
2014-03-06 04:58:55 20173: Reloading configuration
2014-03-06 04:58:55 20173: Generating pgpass
2014-03-06 04:58:55 20173: Verifying connection
 ?column? 
----------
        1
(1 row)


Seemed like restore might have worked despite the worrying FATAL message, but when running the service nothing opens in the browser (which is a familiar result of not having a DB properly configured).

Comment 1 Lior Vernia 2014-03-06 10:31:39 UTC
Also, this was on CentOS 6.5.

Dropping and creating the database (on the same machine at least) does work.

Comment 2 Sandro Bonazzola 2014-03-07 07:29:59 UTC
Didi, can we fix this for 3.4.0?

Comment 3 Yedidyah Bar David 2014-03-09 10:04:10 UTC
(In reply to Lior Vernia from comment #0)
> Description of problem:
> 
> Running engine-backup (in restore mode), following an engine-cleanup,
> results in the following error: "FATAL: Database is not empty"

Closing as duplicate of bug #1066654 "engine-cleanup does not cleanup everything".

> 
> 
> Version-Release number of selected component (if applicable):
> 
> oVirt 3.4.0 RC.
> 
> 
> How reproducible:
> 
> Always (well, one out of one for me).
> 
> 
> Steps to Reproduce:
> 1. Run "engine-setup".
> 2. Configure all sorts of things on engine.
> 3. Run "engine-backup --mode=backup --file=ovirt.backup --log=ovirt.log"
> 4. Run "engine-cleanup".
> 5. Run "engine-backup --mode=restore --file=ovirt.backup --log=ovirt.log"
> 
> Actual results:
> 
> Get the aforementioned error.
> 
> 
> Expected results:
> 
> The deployment is restored.
> 
> 
> Additional info:
> 
> Log file looks like this:
> 
> 
> 2014-03-06 04:50:18 18401: Backing up...
> 2014-03-06 04:50:18 18401: Generating pgpass
> 2014-03-06 04:50:18 18401: Creating temp folder
> /tmp/engine-backup.X6m3IfbCkx/tar
> 2014-03-06 04:50:18 18401: Backing up files to
> /tmp/engine-backup.X6m3IfbCkx/tar/files
> 2014-03-06 04:50:18 18401: Backing up database to
> /tmp/engine-backup.X6m3IfbCkx/tar/db/engine_backup.db
> 2014-03-06 04:50:19 18401: Creating md5sum at
> /tmp/engine-backup.X6m3IfbCkx/tar/md5sum
> 2014-03-06 04:50:19 18401: Creating tarball ovirt.backup
> 2014-03-06 04:50:19 18401: Done.
> 2014-03-06 04:54:59 18685: FATAL: Engine service is active - can not restore
> backup
> 2014-03-06 04:55:29 18742: Restoring...
> 2014-03-06 04:55:29 18742: Opening tarball ovirt.backup to
> /tmp/engine-backup.uhgg5ewqOL
> 2014-03-06 04:55:29 18742: Verifying md5
> 2014-03-06 04:55:29 18742: Verifying version
> 2014-03-06 04:55:29 18742: Restoring files
> 2014-03-06 04:55:30 18742: Reloading configuration
> 2014-03-06 04:55:30 18742: Generating pgpass
> 2014-03-06 04:55:30 18742: Verifying connection
>  ?column? 
> ----------
>         1
> (1 row)
> 
> 2014-03-06 04:55:31 18742: FATAL: Database is not empty
> 2014-03-06 04:58:54 20173: Restoring...
> 2014-03-06 04:58:54 20173: Opening tarball ovirt.backup to
> /tmp/engine-backup.VhdaFg7Gpq
> 2014-03-06 04:58:54 20173: Verifying md5
> 2014-03-06 04:58:54 20173: Verifying version
> 2014-03-06 04:58:54 20173: Restoring files
> 2014-03-06 04:58:55 20173: Reloading configuration
> 2014-03-06 04:58:55 20173: Generating pgpass
> 2014-03-06 04:58:55 20173: Verifying connection
>  ?column? 
> ----------
>         1
> (1 row)
> 
> 
> Seemed like restore might have worked despite the worrying FATAL message,

Why does it seem so? The above seems like a concatenation of various different
logs (or you used the same log file for different runs), based on timestamps.
Seems like it always failed immediately after 'FATAL:'.

> but when running the service nothing opens in the browser (which is a
> familiar result of not having a DB properly configured).

*** This bug has been marked as a duplicate of bug 1066654 ***


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