Bug 1254639 - engine-setup fails at second run
Summary: engine-setup fails at second run
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
high
high
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Sandro Bonazzola
QA Contact: Petr Kubica
URL:
Whiteboard:
: 1254218 1256214 (view as bug list)
Depends On: 1255393
Blocks: 1119603 1229398 1255434
TreeView+ depends on / blocked
 
Reported: 2015-08-18 14:38 UTC by Andrei Stepanov
Modified: 2016-03-11 07:33 UTC (History)
18 users (show)

Fixed In Version: 3.6.0-11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-11 07:33:17 UTC
oVirt Team: Integration


Attachments (Terms of Use)
log (394.99 KB, text/plain)
2015-08-18 14:38 UTC, Andrei Stepanov
no flags Details


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 45148 master MERGED packaging: dbutils: add schema names to tables in fkvalidator Never
oVirt gerrit 45168 ovirt-engine-3.6 MERGED packaging: dbutils: add schema names to tables in fkvalidator Never

Description Andrei Stepanov 2015-08-18 14:38:36 UTC
Created attachment 1064341 [details]
log

engine-setup executed second time cannot proceed

# engine-setup --log=xxx
[ INFO  ] Stage: Initializing
[ INFO  ] Stage: Environment setup
          Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging-wsp.conf', '/etc/ovirt-engine-setup.conf.d/10-packaging.conf', '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf']
          Log file: /etc/ovirt-engine/aaa/xxx
          Version: otopi-1.4.0_master (otopi-1.4.0-0.0.1.master.el6ev)
[ INFO  ] Stage: Environment packages setup
[ INFO  ] Stage: Programs detection
[ INFO  ] Stage: Environment setup
[ INFO  ] Stage: Environment customization
         
          Welcome to the RHEV 3.6 setup/upgrade.
          Please read the RHEV 3.6 install guide
          https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6/html/Installation_Guide/index.html.
          Please refer to the RHEV Upgrade Helper application
          https://access.redhat.com/labs/rhevupgradehelper/ which will guide you in the upgrading process.
          Would you like to proceed? (Yes, No) [Yes]: 
         
          --== PRODUCT OPTIONS ==--
         
[WARNING] User ovirt-vmconsole does not exist.
[WARNING] VM Console Proxy seems not installed on this host. Disabled configuration.
         
          --== PACKAGES ==--
         
[ INFO  ] Checking for product updates...
[ INFO  ] No product updates found
         
          --== ALL IN ONE CONFIGURATION ==--
         
         
          --== NETWORK CONFIGURATION ==--
         
          Setup can automatically configure the firewall on this system.
          Note: automatic configuration of the firewall may overwrite current settings.
          Do you want Setup to configure the firewall? (Yes, No) [Yes]: 
[ INFO  ] iptables will be configured as firewall manager.
         
          --== DATABASE CONFIGURATION ==--
         
         
          --== OVIRT ENGINE CONFIGURATION ==--
         
         
          --== STORAGE CONFIGURATION ==--
         
         
          --== PKI CONFIGURATION ==--
         
         
          --== APACHE CONFIGURATION ==--
         
         
          --== SYSTEM CONFIGURATION ==--
         
         
          --== MISC CONFIGURATION ==--
         
         
          --== END OF CONFIGURATION ==--
         
[ INFO  ] Stage: Setup validation
[WARNING] Less than 16384MB of memory is available
[ INFO  ] Cleaning stale zombie tasks and commands
         
          --== CONFIGURATION PREVIEW ==--
         
          Default SAN wipe after delete           : False
          Firewall manager                        : iptables
          Update Firewall                         : True
          Host FQDN                               : oe1.spice.brq.redhat.com
          Engine database secured connection      : False
          Engine database host                    : localhost
          Engine database user name               : engine
          Engine database name                    : engine
          Engine database port                    : 5432
          Engine database host name validation    : False
          Engine installation                     : True
          PKI organization                        : spice.brq.redhat.com
          Configure WebSocket Proxy               : True
          Engine Host FQDN                        : oe1.spice.brq.redhat.com
         
          Please confirm installation settings (OK, Cancel) [OK]: 
[ INFO  ] Cleaning async tasks and compensations
[ 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 /etc/ovirt-engine/aaa/xxx
[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20150818102315-setup.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Execution of setup failed



Next command does not help:
yum remove rhevm && yum install rhevm

Comment 1 Sandro Bonazzola 2015-08-19 13:02:04 UTC
can you detail the procedure you used?
Is the following correct?
 - yum install rhevm
 - engine-setup
 - engine-setup

Comment 2 Sandro Bonazzola 2015-08-19 13:10:43 UTC
2015-08-18 10:23:15 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=localhost', '--port=5432', '--database=engine', '--log=/etc/ovirt-engine/aaa/xxx'] stderr:
ERROR:  relation "group_attributes" does not exist
LINE 1: select  (group_id)  from group_attributes where  (group_id) ...
                                 ^
QUERY:  select  (group_id)  from group_attributes where  (group_id) IS NOT NULL and  (group_id)  not in (select group_id from groups);
CONTEXT:  PL/pgSQL function "fn_db_validate_fks" line 40 at EXECUTE statement

2015-08-18 10:23:15 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-18 10:23:15 ERROR otopi.context context._executeMethod:164 Failed to execute stage 'Setup validation': Failed checking Engine database:
[u'']

Comment 3 Sandro Bonazzola 2015-08-19 13:13:05 UTC
Eli, can you check?

Comment 4 Andrei Stepanov 2015-08-19 13:14:33 UTC
You can call engine-setup without options or You can provide answers-file at second invocation.
 It fails with the same message:




    # engine-setup --config-append=/var/lib/ovirt-engine/setup/answers/20150818103946-setup.conf
    [ INFO  ] Stage: Initializing
    [ INFO  ] Stage: Environment setup
              Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging-wsp.conf', '/etc/ovirt-engine-setup.conf.d/10-packaging.conf', '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf', '/var/lib/ovirt-engine/setup/answers/20150818103946-setup.conf']
              Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20150819053357-s87bpr.log
              Version: otopi-1.4.0_master (otopi-1.4.0-0.0.1.master.el6ev)
    [ INFO  ] Stage: Environment packages setup
    [ INFO  ] Stage: Programs detection
    [ INFO  ] Stage: Environment setup
    [ INFO  ] Stage: Environment customization
             
              Welcome to the RHEV 3.6 setup/upgrade.
              Please read the RHEV 3.6 install guide
              https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6/html/Installation_Guide/index.html.
              Please refer to the RHEV Upgrade Helper application
              https://access.redhat.com/labs/rhevupgradehelper/ which will guide you in the upgrading process.
              Would you like to proceed? (Yes, No) [Yes]: 
             
              --== PRODUCT OPTIONS ==--
             
    [WARNING] User ovirt-vmconsole does not exist.
    [WARNING] VM Console Proxy seems not installed on this host. Disabled configuration.
             
              --== PACKAGES ==--
             
    [ INFO  ] Checking for product updates...
    [ INFO  ] No product updates found
             
              --== ALL IN ONE CONFIGURATION ==--
             
             
              --== NETWORK CONFIGURATION ==--
             
    [ INFO  ] iptables will be configured as firewall manager.
             
              --== DATABASE CONFIGURATION ==--
             
             
              --== OVIRT ENGINE CONFIGURATION ==--
             
             
              --== STORAGE CONFIGURATION ==--
             
             
              --== PKI CONFIGURATION ==--
             
             
              --== APACHE CONFIGURATION ==--
             
             
              --== SYSTEM CONFIGURATION ==--
             
             
              --== MISC CONFIGURATION ==--
             
             
              --== END OF CONFIGURATION ==--
             
    [ INFO  ] Stage: Setup validation
              During execution engine service will be stopped (OK, Cancel) [OK]: 
    [WARNING] Less than 16384MB of memory is available
    [ INFO  ] Cleaning stale zombie tasks and commands
             
              --== CONFIGURATION PREVIEW ==--
             
              Application mode                        : virt
              Default SAN wipe after delete           : False
              Firewall manager                        : iptables
              Update Firewall                         : True
              Host FQDN                               : oe1.spice.brq.redhat.com
              Engine database secured connection      : False
              Engine database host                    : localhost
              Engine database user name               : engine
              Engine database name                    : engine
              Engine database port                    : 5432
              Engine database host name validation    : False
              Engine installation                     : True
              PKI organization                        : spice.brq.redhat.com
              Configure local Engine database         : True
              Set application as default page         : True
              Configure Apache SSL                    : True
              Configure WebSocket Proxy               : True
              Engine Host FQDN                        : oe1.spice.brq.redhat.com
    [ INFO  ] Cleaning async tasks and compensations
    [ 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-20150819053357-s87bpr.log
    [ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20150819053427-setup.conf'
    [ INFO  ] Stage: Pre-termination
    [ INFO  ] Stage: Termination
    [ ERROR ] Execution of setup failed

Comment 6 Sandro Bonazzola 2015-08-19 15:19:26 UTC
*** Bug 1254218 has been marked as a duplicate of this bug. ***

Comment 7 Ondra Machacek 2015-08-20 11:28:14 UTC
The problem is that tables which are created by aaa-jdbc, has different schema,
you have to change fkvalidator_sp.sql to use schema.table_name , when running
commands.

Comment 8 Sandro Bonazzola 2015-08-20 14:25:01 UTC
(In reply to Ondra Machacek from comment #7)
> The problem is that tables which are created by aaa-jdbc, has different
> schema,
> you have to change fkvalidator_sp.sql to use schema.table_name , when running
> commands.

Ondra, can you push the change to fkvalidator_sp.sql?

Comment 9 Ondra Machacek 2015-08-20 14:54:34 UTC
btw, if you workaround this issue, you will hit another one [1]

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1255393

Comment 10 Sandro Bonazzola 2015-08-20 15:00:57 UTC
Thanks Ondra, will wait for bug #1255393 for verifying the patch you sent.

Comment 11 Yaniv Lavi 2015-08-23 09:43:40 UTC
Should this be MODIFIED?

Comment 12 Eli Mesika 2015-08-25 08:13:14 UTC
*** Bug 1256214 has been marked as a duplicate of this bug. ***

Comment 13 Petr Kubica 2015-09-07 14:44:25 UTC
Verified in rhevm-setup-3.6.0-0.13.master.el6.noarch (3.6.0-11)

Comment 14 Nikolai Sednev 2015-09-10 14:50:14 UTC
Hi Sandro,
Is this patch merged also to PPC?

Comment 15 Nikolai Sednev 2015-09-10 14:50:55 UTC
Can you please verify this on PPC setup as well?

Comment 16 Petr Kubica 2015-09-11 10:00:54 UTC
Unfortunately I don't have PPC host yet. I have to wait until any ppc host is available for borrow.

Comment 17 Sandro Bonazzola 2015-09-11 11:25:10 UTC
(In reply to Nikolai Sednev from comment #14)
> Hi Sandro,
> Is this patch merged also to PPC?

There's no rhevm planned for PPC as far as I know.


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