Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1519811 - On upgrade from RHEV-3.6 to RHV-4, max_memory_size_mb seems hardly set to 1TB
On upgrade from RHEV-3.6 to RHV-4, max_memory_size_mb seems hardly set to 1TB
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
4.1.6
x86_64 Linux
high Severity high
: ovirt-4.2.1
: ---
Assigned To: Shmuel Melamud
Israel Pinto
: ZStream
Depends On:
Blocks: 1529927
  Show dependency treegraph
 
Reported: 2017-12-01 08:37 EST by Steffen Froemer
Modified: 2018-05-15 13:47 EDT (History)
14 users (show)

See Also:
Fixed In Version: ovirt-engine-4.2.1.1
Doc Type: Bug Fix
Doc Text:
Previously, when upgrading from Red Hat Virtualization 4.0 to 4.1, the maximum memory size allocated for virtual machines was 1TB, which sometimes resulted in a virtual machine's actual memory size exceeding the allocated maximum memory size. In the current release, the allocated maximum memory size adjusts to the actual memory size.
Story Points: ---
Clone Of:
: 1529927 (view as bug list)
Environment:
Last Closed: 2018-05-15 13:46:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Virt
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3260021 None None None 2017-12-04 19:01 EST
oVirt gerrit 85787 master MERGED core: Ensure that max_memory_size is not less than mem_size 2017-12-28 11:19 EST
oVirt gerrit 85814 ovirt-engine-4.1 MERGED core: Ensure that max_memory_size is not less than mem_size 2017-12-31 04:12 EST
Red Hat Product Errata RHEA-2018:1488 None None None 2018-05-15 13:47 EDT

  None (edit)
Description Steffen Froemer 2017-12-01 08:37:46 EST
Description of problem:
During upgrade from RHEV-3 to RHV-4, the cluster compatibility level can't be increased, as some VMs show inconsistency in definition of

  max_memory_size_mb
  mem_size_mb

Version-Release number of selected component (if applicable):
latest ovirt-engine

How reproducible:
always

Steps to Reproduce:
1. Setup a VM with mem_size_mb and min_allocated_mem to '1572864' in RHEV 3.6
2. upgrade RHEV database to RHV 4.1
3. check memory configuration in database

Actual results:
[root@dbview ~]# /usr/share/ovirt-engine/dbscripts/engine-psql.sh -c "select vm_name,mem_size_mb,min_allocated_mem,max_memory_size_mb from vm_static  where mem_size_mb >= '1048576' order by vm_name"
  vm_name   | mem_size_mb | min_allocated_mem | max_memory_size_mb
------------+-------------+-------------------+--------------------
 testvm-111 |     1572864 |           1572864 |            1048576
                                                           ^^^^^^^

Expected results:
[root@dbview ~]# /usr/share/ovirt-engine/dbscripts/engine-psql.sh -c "select vm_name,mem_size_mb,min_allocated_mem,max_memory_size_mb from vm_static  where mem_size_mb >= '1048576' order by vm_name"
  vm_name   | mem_size_mb | min_allocated_mem | max_memory_size_mb
------------+-------------+-------------------+--------------------
 testvm-111 |     1572864 |           1572864 |            1572864
                                                           ^^^^^^^

Additional info:
Comment 1 Germano Veit Michel 2017-12-03 18:27:51 EST
Looks like some hardcoded value here:

04_01_0640_add_max_memory_size_column.sql

-- 1048576 is an old default from *MaxMemorySizeInMB config values
   SET max_memory_size_mb = LEAST(4 * mem_size_mb, 1048576);

Should it actually read the current *MaxMemorySizeInMB? Seems to be set to 4TB in CL 3.6.
Comment 2 Tomas Jelinek 2017-12-04 08:51:18 EST
I'm sure you have already figured it out, but for completeness, the workaround is to issue this sql which will fix it:

update vm_static set max_memory_size_mb = mem_size_mb where mem_size_mb > max_memory_size_mb;
Comment 5 Israel Pinto 2018-01-18 06:57:45 EST
Verify with: 4.2.1.1-0.1.el7

Steps:
1. Setup a VM with mem_size_mb and min_allocated_mem to '1572864' in RHEV 3.6
2. upgrade RHEV database to RHV 4.2 (4.0 -> 4.1 -> 4.2)
3. check memory configuration in database
Output:

engine=# select vm_name,mem_size_mb,min_allocated_mem,max_memory_size_mb from vm_static  where mem_size_mb >= '1048576' order by vm_name;
  vm_name   | mem_size_mb | min_allocated_mem | max_memory_size_mb 
------------+-------------+-------------------+--------------------
 bz_upgrade |     1572864 |           1572864 |            1572864
(1 row)
Comment 9 errata-xmlrpc 2018-05-15 13:46:12 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:1488

Note You need to log in before you can comment on or make changes to this bug.