Bug 1255434 - Failed checking Engine database during engine setup after restore engine from backup
Summary: Failed checking Engine database during engine setup after restore engine from...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Sandro Bonazzola
QA Contact: Petr Kubica
URL:
Whiteboard:
Depends On: 1254639
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-20 14:51 UTC by Petr Kubica
Modified: 2016-03-11 07:34 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-11 07:34:54 UTC
oVirt Team: Integration
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
engine-logs (1.10 MB, application/x-gzip)
2015-08-20 14:51 UTC, Petr Kubica
no flags Details
engine-backup logs and file (9.36 MB, application/x-gzip)
2015-08-20 14:52 UTC, Petr Kubica
no flags Details

Description Petr Kubica 2015-08-20 14:51:28 UTC
Created attachment 1065290 [details]
engine-logs

Description of problem:
Failed checking Engine database during engine setup after restore engine from backup

2015-08-20 16:31:21 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.upgrade.dbvalidations plugin.execute:940 execute-output: ['/usr/share/ovirt-engine/setup/dbutils/validatedb.sh', '--user=engine', '--host=l
ocalhost', '--port=5432', '--database=engine', '--log=/var/log/ovirt-engine/setup/ovirt-engine-setup-20150820163046-m4qvgg.log'] stderr:
ERROR:  relation "user_groups" does not exist
LINE 1: select  (in_group_id)  from user_groups where  (in_group_id)...
                                    ^
QUERY:  select  (in_group_id)  from user_groups where  (in_group_id) IS NOT NULL and  (in_group_id)  not in (select in_group_id from groups);
CONTEXT:  PL/pgSQL function "fn_db_validate_fks" line 40 at EXECUTE statement

2015-08-20 16:31:21 DEBUG otopi.context context._executeMethod:155 method exception
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/otopi/context.py", line 145, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/upgrade/dbvalidations.py", line 128, in _validation
    violations, issues_found = self._checkDb()
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/upgrade/dbvalidations.py", line 91, in _checkDb
    output=stdout,
RuntimeError: Failed checking Engine database:
[u'']

2015-08-20 16:31:21 ERROR otopi.context context._executeMethod:164 Failed to execute stage 'Setup validation': Failed checking Engine database:
[u'']

In my setup, I had an engine with dwh and reports. I wanted backup all and after engine-cleanup I wanted restore all from created backup. 

Version-Release number of selected component (if applicable):
rhevm-3.6.0-0.11.master.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. Have an used engine (I have dwh and reports too) (used - some created VMs)
2. Make a backup: engine-backup --mode=backup --scope=all --file=backup.tar --log=backup.log
3. clean the engine: engine-cleanup
4. restore: engine-backup --mode=restore --scope=all --file=backup.tar --log=restore.log
5. engine-setup

Actual results:
[ INFO  ] Unlocking existing entities
[ INFO  ] Checking the Engine database consistency
[ ERROR ] Failed to execute stage 'Setup validation': Failed checking Engine database: [u''] 
[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20150820163046-m4qvgg.log
[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20150820163121-setup.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Execution of setup failed

Expected results:
Should work.

Additional info:
Attached logs from engine, backup logs and backup file (backup.tar)

Comment 1 Petr Kubica 2015-08-20 14:52:39 UTC
Created attachment 1065292 [details]
engine-backup logs and file

Comment 2 Petr Kubica 2015-09-11 15:31:44 UTC
Verified in 3.6.0-0.15.master.el6


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