
Just tried to upgrade my engine from 4.4.10.6 -> 4.5.0 on CentOS Stream 8. I relized I missed the step of updating to the very latest version of 4.4.10 around the same time it failed and left things in somewhat of a bad state, so I just built a new Rocky 8.6 host and restored my backup there. Update from 4.4.10.6 to 4.4.10.7 there went fine. 4.4.10.7 -> 4.5.0 fails with the same error, however: [ ERROR ] schema.sh: FATAL: Cannot execute sql command: --file=/usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0000_config.sql [ ERROR ] Failed to execute stage 'Misc configuration': Engine schema refresh failed This appears to be the relevant section of the log: psql:/usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0000_config.sql:22: NOTICE: column "default_value" of relation "vdc_options" already exists, skipping psql:/usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0000_config.sql:1454: ERROR: column "default_value" contains null values CONTEXT: SQL statement "ALTER TABLE vdc_options ALTER COLUMN default_value SET NOT NULL" PL/pgSQL function fn_db_change_column_null(character varying,character varying,boolean) line 10 at EXECUTE FATAL: Cannot execute sql command: --file=/usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0000_config.sql 2022-06-01 01:10:03,015-0700 ERROR otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema schema._misc:530 schema.sh: FATAL: Cannot execute sql command: --file=/usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0000_config.sql 2022-06-01 01:10:03,016-0700 DEBUG otopi.context context._executeMethod:145 method exception Traceback (most recent call last): File "/usr/lib/python3.6/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 532, in _misc raise RuntimeError(_('Engine schema refresh failed')) RuntimeError: Engine schema refresh failed 2022-06-01 01:10:03,017-0700 ERROR otopi.context context._executeMethod:154 Failed to execute stage 'Misc configuration': Engine schema refresh failed Any ideas?

On Wed, Jun 1, 2022 at 12:33 PM Sketch <ovirt@rednsx.org> wrote:
Just tried to upgrade my engine from 4.4.10.6 -> 4.5.0 on CentOS Stream 8. I relized I missed the step of updating to the very latest version of 4.4.10 around the same time it failed and left things in somewhat of a bad state, so I just built a new Rocky 8.6 host and restored my backup there.
Update from 4.4.10.6 to 4.4.10.7 there went fine. 4.4.10.7 -> 4.5.0 fails with the same error, however:
[ ERROR ] schema.sh: FATAL: Cannot execute sql command: --file=/usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0000_config.sql [ ERROR ] Failed to execute stage 'Misc configuration': Engine schema refresh failed
This appears to be the relevant section of the log:
psql:/usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0000_config.sql:22: NOTICE: column "default_value" of relation "vdc_options" already exists, skipping psql:/usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0000_config.sql:1454: ERROR: column "default_value" contains null values CONTEXT: SQL statement "ALTER TABLE vdc_options ALTER COLUMN default_value SET NOT NULL" PL/pgSQL function fn_db_change_column_null(character varying,character varying,boolean) line 10 at EXECUTE FATAL: Cannot execute sql command: --file=/usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0000_config.sql
2022-06-01 01:10:03,015-0700 ERROR otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema schema._misc:530 schema.sh: FATAL: Cannot execute sql command: --file=/usr/share/ovirt-engine/dbscripts/upgrade/pre_upgrade/0000_config.sql 2022-06-01 01:10:03,016-0700 DEBUG otopi.context context._executeMethod:145 method exception Traceback (most recent call last): File "/usr/lib/python3.6/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 532, in _misc raise RuntimeError(_('Engine schema refresh failed')) RuntimeError: Engine schema refresh failed 2022-06-01 01:10:03,017-0700 ERROR otopi.context context._executeMethod:154 Failed to execute stage 'Misc configuration': Engine schema refresh failed
Any ideas?
Might be a case of: https://bugzilla.redhat.com/2077387 Adding Eli. Best regards, -- Didi

On Wed, 1 Jun 2022, Yedidyah Bar David wrote:
Might be a case of:
That was it. The SQL query affected 2 rows, so I guess my install wasn't quite as ancient as the bug filer's. I think this system was built in either late 4.2 or early 4.3 timeframe. Thanks! Sketch
participants (2)
-
Sketch
-
Yedidyah Bar David