Bug 1529927 - [downstream clone - 4.1.9] On upgrade from RHEV-3.6 to RHV-4, max_memory_size_mb seems hardly set to 1TB
Summary: [downstream clone - 4.1.9] On upgrade from RHEV-3.6 to RHV-4, max_memory_size...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.1.6
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ovirt-4.1.9
: ---
Assignee: Shmuel Melamud
QA Contact: Israel Pinto
URL:
Whiteboard:
Depends On: 1519811
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-31 08:34 UTC by rhev-integ
Modified: 2021-03-11 19:31 UTC (History)
15 users (show)

Fixed In Version: ovirt-engine-4.1.9
Doc Type: Bug Fix
Doc Text:
Previously, when upgrading from RHV-4.0 to RHV-4.1, maximum memory size for existing VMs was limited by 1 TB, which caused maximum memory size for some VMs to be less than their memory size. This bug was fixed and now for all VMs maximum memory size is larger or equals their memory size.
Clone Of: 1519811
Environment:
Last Closed: 2018-01-24 14:43:33 UTC
oVirt Team: Virt
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3260021 0 None None None 2017-12-31 08:35:14 UTC
Red Hat Product Errata RHBA-2018:0135 0 normal SHIPPED_LIVE org.ovirt.engine-root bug fix and enhancement update 2018-01-24 19:39:03 UTC
oVirt gerrit 85787 0 master MERGED core: Ensure that max_memory_size is not less than mem_size 2017-12-31 08:35:14 UTC
oVirt gerrit 85814 0 ovirt-engine-4.1 MERGED core: Ensure that max_memory_size is not less than mem_size 2017-12-31 09:12:27 UTC

Description rhev-integ 2017-12-31 08:34:55 UTC
+++ This bug is a downstream clone. The original bug is: +++
+++   bug 1519811 +++
======================================================================

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:

(Originally by Steffen Froemer)

Comment 1 rhev-integ 2017-12-31 08:34:57 UTC
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.

(Originally by Germano Veit Michel)

Comment 3 rhev-integ 2017-12-31 08:35:02 UTC
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;

(Originally by Tomas Jelinek)

Comment 4 Steffen Froemer 2018-01-04 11:43:18 UTC
is there any timeframe, when this patch will be available?
I have another customer, who will be affected by this issue when performing the RHV upgrade in near future.

Comment 5 Michal Skrivanek 2018-01-05 12:54:53 UTC
as you can see in the target milestone it is planned for 4.1.9

Comment 6 Steffen Froemer 2018-01-05 13:04:48 UTC
Thanks Michael. It should be the week, that I've missed that.

Comment 7 Israel Pinto 2018-01-16 12:40:07 UTC
Verify with: ovirt-engine-4.1.9-0.2

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.1
3. check memory configuration in database
Output:
#  /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 
------------+-------------+-------------------+--------------------
 bz_upgrade |     1572864 |           1572864 |            1572864
(1 row)

Comment 11 errata-xmlrpc 2018-01-24 14:43:33 UTC
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/RHBA-2018:0135

Comment 12 Franta Kust 2019-05-16 12:54:38 UTC
BZ<2>Jira re-sync


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