Description of problem:
Upgrade from the first release of oVirt engine fails.
Version-Release number of selected component (if applicable):
Run upgrade.sh (under dbscripts) after upgrading the first release to the latest git tip.
Steps to Reproduce:
1. Install 3.0.0_0001-1.6
2. Upgrade to rpms from nightly/lastest git tip
3. Run /usr/share/ovirt-engine/dbscripts/upgrade.sh -s 127.0.0.1 -d engine -u postgres
This happens since the upgrade script tries to run only new dbscripts based on the number of the last dbscript applied.
Since we cherry-picked few patches into engine_3.0 branch (build branch), the last two dbscripts in the first release are:
so the upgrade script will run only scripts that are > 03_01_0250, but in the master branch, there are multiple scripts between 0130 and 0250 that didn't run in the first release.
2012-02-13 21:21:59:EBUG::engine-upgrade::435::root:: DB Update started
2012-02-13 21:21:59:EBUG::common_utils::220::root:: Executing command --> '/usr/share/ovirt-engine/dbscripts/upgrade.sh -s 127.0.0.1 -d engine -u postgres'
2012-02-13 21:22:06:EBUG::common_utils::246::root:: output = upgrade script detected a change in a View or Stored Procedure...
Running upgrade script upgrade/03_01_0260_add_job_table.sql
Running upgrade script upgrade/03_01_0270_add_job_subject_entity_table.sql
Running upgrade script upgrade/03_01_0280_add_step_table.sql
Running upgrade script upgrade/03_01_0290_add_plugged_config_options.sql
Running upgrade script upgrade/03_01_0300_vds_static_unique_fields.sql
Running upgrade script upgrade/03_01_0310_add_config_values_allow_dup_macs.sql
Running upgrade script upgrade/03_01_0320_rename_audit_log_keys_from_merge_to_remove.sql
Running upgrade script upgrade/03_01_0330_add_step_id_column_to_async_task.sql
Running upgrade script upgrade/03_01_0400_add_config_values_setupnetworks.sql
2012-02-13 21:22:06:EBUG::common_utils::247::root:: stderr = psql:create_views.sql:382: ERROR: column vm_dynamic.hash does not exist
LINE 26: ...m_static.min_allocated_mem as min_allocated_mem, vm_dynamic...
2012-02-13 21:22:06:EBUG::common_utils::248::root:: retcode = 3
2012-02-13 21:22:06::ERROR::engine-upgrade::637::root:: Traceback (most recent call last):
File "/usr/bin/engine-upgrade", line 628, in main
runFunc([restartPostgresql, db.update], MSG_INFO_DB_UPDATE)
File "/usr/bin/engine-upgrade", line 485, in runFunc
File "/usr/bin/engine-upgrade", line 440, in update
output, rc = utils.execCmd(cmd, None, True, MSG_ERROR_UPDATE_DB)
File "/usr/share/ovirt-engine/scripts/common_utils.py", line 251, in execCmd
Exception: Error: Database update failed
http://gerrit.ovirt.org/#change,3689 to 3695
closing ON_QA bugs as oVirt 3.1 was released: