Bug 1226942

Summary: error upgrading db from 3.5 to 3.6 because null value in column "option_value"
Product: Red Hat Enterprise Virtualization Manager Reporter: Sharon Naftaly <snaftaly>
Component: ovirt-engineAssignee: Nobody <nobody>
Status: CLOSED DUPLICATE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.6.0CC: ecohen, eedri, gklein, lpeer, lsurette, rbalakri, Rhev-m-bugs, yeylon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-02 06:31:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sharon Naftaly 2015-06-01 13:38:41 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

*** This bug has been marked as a duplicate of bug 1226944 ***