Bug 1226944 - error upgrading db from 3.5 to 3.6 because of a null value in column "option_value"
Summary: error upgrading db from 3.5 to 3.6 because of a null value in column "option_...
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
urgent
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Eli Mesika
QA Contact: Gonza
URL:
Whiteboard:
: 1221309 1226942 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-01 13:41 UTC by Sharon Naftaly
Modified: 2016-09-20 03:14 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-20 01:29:45 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 41902 0 master MERGED db:set AutoRegistrationDefaultVdsGroupID correctly Never

Description Sharon Naftaly 2015-06-01 13:41:38 UTC
Description of problem:
When upgrading a customer's db from 3.5 to 3.6, using the schema.sh script found in ovirt-engine repo, it fails in the last post upgrade script. The error is:
0030_set_default_cluster_for_registration.sql:4: ERROR:  null value in column "option_value" violates not-null constraint

The reason is that the following query return null into option_value, since the value in the name column is not 'Default':
set option_value = (select vds_group_id from vds_groups where name ilike 'Default')

How reproducible:
run the schema.sh script on a db that returns null for the query:
select vds_group_id from vds_groups where name ilike 'Default'


Actual results:
failure in upgrading the database

Expected results:


Additional info:

Comment 1 Sharon Naftaly 2015-06-02 06:31:16 UTC
*** Bug 1226942 has been marked as a duplicate of this bug. ***

Comment 2 Eli Mesika 2015-06-16 14:02:08 UTC
*** Bug 1221309 has been marked as a duplicate of this bug. ***

Comment 3 Max Kovgan 2015-06-28 14:13:10 UTC
ovirt-3.6.0-3 release

Comment 4 Yedidyah Bar David 2015-07-01 13:31:35 UTC
Why does this bug depend on bug 1080542? 1080542 should not happen if you do not manually run one of the dbutils with user postgres.

Comment 5 Gonza 2015-08-12 12:02:51 UTC
Verified on:
ovirt-engine-3.6.0-0.0.master.20150804111407.git122a3a0.el6.noarch

Ran:
./schema.sh -v -s localhost -u engine -d engine -p 5432 -c apply

Script execution completed successfully.


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