Bug 1254639 - engine-setup fails at second run
engine-setup fails at second run
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.6.0
Unspecified Unspecified
high Severity high
: ovirt-3.6.0-rc
: 3.6.0
Assigned To: Sandro Bonazzola
Petr Kubica
: Regression
: 1254218 1256214 (view as bug list)
Depends On: 1255393
Blocks: 1119603 1229398 1255434
  Show dependency treegraph
 
Reported: 2015-08-18 10:38 EDT by Andrei Stepanov
Modified: 2016-03-11 02:33 EST (History)
18 users (show)

See Also:
Fixed In Version: 3.6.0-11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-11 02:33:17 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Integration
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker 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

  None (edit)
Description Andrei Stepanov 2015-08-18 10:38:36 EDT
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 09:02:04 EDT
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 09:10:43 EDT
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 09:13:05 EDT
Eli, can you check?
Comment 4 Andrei Stepanov 2015-08-19 09:14:33 EDT
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 11:19:26 EDT
*** Bug 1254218 has been marked as a duplicate of this bug. ***
Comment 7 Ondra Machacek 2015-08-20 07:28:14 EDT
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 10:25:01 EDT
(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 10:54:34 EDT
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 11:00:57 EDT
Thanks Ondra, will wait for bug #1255393 for verifying the patch you sent.
Comment 11 Yaniv Lavi 2015-08-23 05:43:40 EDT
Should this be MODIFIED?
Comment 12 Eli Mesika 2015-08-25 04:13:14 EDT
*** Bug 1256214 has been marked as a duplicate of this bug. ***
Comment 13 Petr Kubica 2015-09-07 10:44:25 EDT
Verified in rhevm-setup-3.6.0-0.13.master.el6.noarch (3.6.0-11)
Comment 14 Nikolai Sednev 2015-09-10 10:50:14 EDT
Hi Sandro,
Is this patch merged also to PPC?
Comment 15 Nikolai Sednev 2015-09-10 10:50:55 EDT
Can you please verify this on PPC setup as well?
Comment 16 Petr Kubica 2015-09-11 06:00:54 EDT
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 07:25:10 EDT
(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.