Created attachment 799484 [details] engine setup log Description of problem: When installed the RHEV 3.3 beta (IS 15), the installer fails out while modifying the database with the error: relation "tags_vm_pool_map" already exists Version-Release number of selected component (if applicable): rhevm-3.3.0-0.22.master.el6ev.noarch How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Install fails. Expected results: Install succeeds in modifying database Additional info: This was done in a VM that previously had 3.2.2 installed on it. I used 'yum remove rhevm', and then used 'yum install rhevm'. The newest package came from http://bob.eng.lab.tlv.redhat.com/builds/latest_is/. Problem was hit while running rhevm-setup From the install log: 2013-09-18 12:33:11 DEBUG otopi.plugins.ovirt_engine_setup.db.schema plugin.execute:446 execute-output: ['/usr/ share/ovirt-engine/dbscripts/create_schema.sh', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-201309181 22852.log', '-s', 'localhost', '-p', '5432', '-d', 'engine', '-u', 'engine', '-g'] stderr: psql:create_tables.sql:26: ERROR: relation "tags_vm_pool_map" already exists 2013-09-18 12:33:11 DEBUG otopi.context context._executeMethod:137 method exception Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/otopi/context.py", line 127, in _executeMethod method['method']() File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/db/schema.py", line 189, in _miscInstall osetupcons.DBEnv.PGPASS_FILE File "/usr/lib/python2.6/site-packages/otopi/plugin.py", line 451, in execute command=args[0], RuntimeError: Command '/usr/share/ovirt-engine/dbscripts/create_schema.sh' failed to execute 2013-09-18 12:33:11 ERROR otopi.context context._executeMethod:146 Failed to execute stage 'Misc configuration': Command '/usr/share/ovirt-engine/dbscripts/create_schema.sh' failed to execute
Tried to run this again after dropping the database 'engine': [ ERROR ] Failed to execute stage 'Misc configuration': Command '/usr/share/ovirt-engine/dbscripts/create_schema.sh' failed to execute [ INFO ] Yum Performing yum transaction rollback [ INFO ] Rolling back database schema [ INFO ] Clearing database engine_20130918125612 [ ERROR ] Database rollback failed: language "plpgsql" does not exist HINT: Use CREATE LANGUAGE to load the language into the database. [ INFO ] Stage: Clean up Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20130918125326.log From the log file: 2013-09-18 12:56:20 DEBUG otopi.plugins.ovirt_engine_setup.db.schema plugin.execute:446 exe cute-output: ['/usr/share/ovirt-engine/dbscripts/create_schema.sh', '-l', '/var/log/ovirt-e ngine/setup/ovirt-engine-setup-20130918125326.log', '-s', 'localhost', '-p', '5432', '-d', 'engine_20130918125612', '-u', 'engine_20130918125612', '-g'] stderr: psql: fe_sendauth: no password supplied 2013-09-18 12:56:20 DEBUG otopi.context context._executeMethod:137 method exception Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/otopi/context.py", line 127, in _executeMethod method['method']() File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/db/schema.py", line 189, in _miscInstall osetupcons.DBEnv.PGPASS_FILE File "/usr/lib/python2.6/site-packages/otopi/plugin.py", line 451, in execute command=args[0], RuntimeError: Command '/usr/share/ovirt-engine/dbscripts/create_schema.sh' failed to execute Followed by the following on rollback: 2013-09-18 12:56:20 DEBUG otopi.plugins.ovirt_engine_setup.db.schema schema.abort:78 Exception during database restore Traceback (most recent call last): File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/db/schema.py", line 65, in abort dbovirtutils.clearOvirtEngineDatabase() File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/database.py", line 369, in clearOvirtEngineDatabase transaction=False, File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/database.py", line 155, in execute args, ProgrammingError: language "plpgsql" does not exist HINT: Use CREATE LANGUAGE to load the language into the database. 2013-09-18 12:56:20 ERROR otopi.plugins.ovirt_engine_setup.db.schema schema.abort:82 Database rollback failed: language "plpgsql" does not exist
Correct. Had to fix some of the logic. Thanks!
Alon, You input a non-existant gerrit changeid, please fix. Did you refer to [1] ? [1] http://gerrit.ovirt.org/19378
(In reply to Yedidyah Bar David from comment #3) > Alon, > > You input a non-existant gerrit changeid, please fix. Did you refer to [1] ? > > [1] http://gerrit.ovirt.org/19378 Yes. I put this bug number instead :)
QA note: Following should work: 1. upgrade from 3.2->3.3(latest) result: database kept 2. upgrade from 3.3(n-1)->3.3(n) result: database kept 3. installation with empty engine database a. execute engine-cleanup b. drop engine user and database directly from psql. c. create engine user and database manually: --- create user engine password 'engine'; create database engine owner engine template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8'; --- d. install rhevm expected: the engine user and database will be used. 4. installation with existing engine database a. install rhevm have working instance. b. remove brutally: yum remove -y 'rhevm*' rm -fr /etc/ovirt-engine* /usr/share/ovirt-engine* /var/*/ovirt-engine c. install rhevm result: user and database that are used are with date suffix, original database (engine) is intact and not used.
(In reply to Alon Bar-Lev from comment #5) > QA note: VERIFIED: > Following should work: > > 1. upgrade from 3.2->3.3(latest) > result: database kept - Verified > > 2. upgrade from 3.3(n-1)->3.3(n) > result: database kept verified update from is16 to is17 > 3. installation with empty engine database > a. execute engine-cleanup > b. drop engine user and database directly from psql. > c. create engine user and database manually: > --- > create user engine password 'engine'; > create database engine owner engine template template0 > encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8'; > --- > d. install rhevm > expected: the engine user and database will be used. verified > 4. installation with existing engine database - verified > a. install rhevm have working instance. > b. remove brutally: > yum remove -y 'rhevm*' > rm -fr /etc/ovirt-engine* /usr/share/ovirt-engine* /var/*/ovirt-engine > c. install rhevm > result: user and database that are used are with date suffix, original > database (engine) is intact and not used. Verified
Closing - RHEV 3.3 Released