I follow this thread
http://users.ovirt.narkive.com/HR6UmRcn/ovirt-users-ovirt-4-2-alpha-upgra...
select vm_name from vm_static where mem_size_mb > max_memory_size_mb;
begin;
update vm_static set max_memory_size_mb = mem_size_mb where mem_size_mb
max_memory_size_mb
In my case it was only HostedEngine. After that I rereun the setup again.
See the log file from failed upgrade, look for
```
Running upgrade sql script
'/usr/share/ovirt-engine/dbscripts/upgrade/04_02_0140_add_max_memory_constraint.sql'...
2018-01-09 08:07:02,091+0100 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-20180109080109-ftui7e.log',
'-c', 'apply'] stderr:
psql:/usr/share/ovirt-engine/dbscripts/upgrade/04_02_0140_add_max_memory_constraint.sql:2:
ERROR: check constraint "vm_static_max_memory_size_lower_bound" is
violated by some row
FATAL: Cannot execute sql command:
--file=/usr/share/ovirt-engine/dbscripts/upgrade/04_02_0140_add_max_memory_constraint.sql
2018-01-09 08:07:02,092+0100 ERROR
otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema schema._misc:374
schema.sh: FATAL: Cannot execute sql command:
--file=/usr/share/ovirt-engine/dbscripts/upgrade/04_02_0140_add_max_memory_constraint.sql
```
On 09/01/2018 09:35, Yedidyah Bar David wrote:
Hi,
maybe it was already here, but I haven't found it quickly in archive ;(
I upgrade the hosted engine and one hots, my notes and questions.
The upgrade goes well, I only needed to manually fix the memy value in
database for hosted engine
[ ERROR ] schema.sh: FATAL: Cannot execute sql command:
--file=/usr/share/ovirt-engine/dbscripts/upgrade/04_02_0140_add_max_memory_constraint.sql
[ ERROR ] Failed to execute stage 'Misc configuration': Engine schema
refresh failed
You mean you changed something in the db and then ran engine-setup again
and it worked?
--
*Peter Hudec*
Infraštruktúrny architekt
phudec(a)cnc.sk <mailto:phudec@cnc.sk>
*CNC, a.s.*
Borská 6, 841 04 Bratislava
Recepcia: +421 2 35 000 100
Mobil:+421 905 997 203
*www.cnc.sk* <http:///www.cnc.sk>