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: