Hi guys.
I have problems upgrading from oVirt 4.0 to 4.1
This is what I did:
# yum install
http://resources.ovirt.org/pub/yum-repo/ovirt-release-master.rpm
# yum -y update
# engine-setup
Then it fails with following error:
[ ERROR ] schema.sh: FATAL: Cannot execute sql command:
--file=/usr/share/ovirt-engine/dbscripts/upgrade/04_01_0010_add_mac_pool_id_to_vds_group.sql
[ ERROR ] Failed to execute stage 'Misc configuration': Engine schema
refresh failed
This is the 04_01_0010_add_mac_pool_id_to_vds_group.sql script:
SELECT fn_db_add_column('cluster',
'mac_pool_id',
'UUID REFERENCES mac_pools (id)');
UPDATE
cluster AS c
SET
mac_pool_id = (
SELECT
sp.mac_pool_id
FROM
storage_pool sp
WHERE
sp.id = c.storage_pool_id
);
ALTER TABLE cluster ALTER COLUMN mac_pool_id SET NOT NULL;
The relevant portion of the log file:
2016-09-14 21:56:19 DEBUG
otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema
plugin.execute:926 execute-output:
['/usr/share/ovirt-engine/dbscripts/schema.sh', '-s', 'localhost',
'-p',
'5432', '-u', 'engine', '-d', 'engine',
'-l',
'/var/log/ovirt-engine/setup/ovirt-engine-setup-20160914215252-64vhk6.log',
'-c', 'apply'] stderr:
psql:/usr/share/ovirt-engine/dbscripts/upgrade/04_01_0010_add_mac_pool_id_to_vds_group.sql:17:
ERROR: column "mac_pool_id" contains null values
FATAL: Cannot execute sql command:
--file=/usr/share/ovirt-engine/dbscripts/upgrade/04_01_0010_add_mac_pool_id_to_vds_group.sql
2016-09-14 21:56:19 ERROR
otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema schema._misc:315
schema.sh: FATAL: Cannot execute sql command:
--file=/usr/share/ovirt-engine/dbscripts/upgrade/04_01_0010_add_mac_pool_id_to_vds_group.sql
2016-09-14 21:56:19 DEBUG otopi.context context._executeMethod:142
method exception
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/otopi/context.py", line 132,
in _executeMethod
method['method']()
File
"/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/db/schema.py",
line 317, in _misc
raise RuntimeError(_('Engine schema refresh failed'))
RuntimeError: Engine schema refresh failed
2016-09-14 21:56:19 ERROR otopi.context context._executeMethod:151
Failed to execute stage 'Misc configuration': Engine schema refresh failed
2016-09-14 21:56:19 DEBUG otopi.transaction transaction.abort:119
aborting 'Yum Transaction'
2016-09-14 21:56:19 INFO otopi.plugins.otopi.packagers.yumpackager
yumpackager.info:80 Yum Performing yum transaction rollback
Any idea how to fix that?
--
Marcin M. Jessa