Bug 2076100

Summary: Two VMs with summary CPU more then host CPU are allowed to run on the same host.
Product: [oVirt] ovirt-engine Reporter: Polina <pagranat>
Component: BLL.VirtAssignee: Lucia Jelinkova <ljelinko>
Status: CLOSED CURRENTRELEASE QA Contact: Polina <pagranat>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.5.0CC: ahadas, bugs, dfodor
Target Milestone: ovirt-4.5.1Flags: pm-rhel: ovirt-4.5?
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-4.5.1.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-23 05:54:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine log dump xmls none

Description Polina 2022-04-17 19:35:48 UTC
Created attachment 1873121 [details]
engine log dump xmls

Description of problem:
HE VM with topology 1:4:1 and the dedicated VM 1:15:2 are not allowed to run on the same host 1:16:2 in general. In the described scenario they run together on such host.

Version-Release number of selected component (if applicable):
ovirt-engine-4.5.0.2-0.7.el8ev.noarch

How reproducible: 100%

Steps to Reproduce:
setup with three hosts of topology
CPU(s):              32
On-line CPU(s) list: 0-31
Thread(s) per core:  2
Core(s) per socket:  16
Socket(s):           1
NUMA node(s):        1


1. Run on host3 dedicated VM1 with 30 CPUs 1:15:2 while HE VM with topology 1:4:1 runs on host2 . If we would try to run such dedicated VM1 on the same host2 it is not allowed and this is right . 
2. Configure another dedicated VM1 with the same topology 1:15:2. 
3. Migrate the HE VM. for the migration  it chooses automatically host1 since VM1 runs on the host3 and they are not allowed together. 
4. while migration is processing , try to run this VM2 on host1 - runs successfully
5. wait until the end of migration process.

Actual results:
Migration is completed successfully . HE VM is migrated to the host1 and in this way HE VM with topology 1:4:1 and the dedicated VM with topology 1:15:2 are running on the same host 1:16:2 while it must not be allowed.
If we stop VM2 , it won't be allowed to start on host1.

Expected results:
I think maybe migration must be cancelled in such case to not allow running 34 CPUs on host with 32 CPUS


Additional info: xml after migration and engine log are attached

Comment 1 Arik 2022-04-19 14:57:20 UTC
Lucia, as you are looking at the handling of the pending resources - this one is related but a bit different
I believe that we only count on the reported value from the host when scheduling the dedicated VMs, without taking into consideration pending resources

Comment 2 Lucia Jelinkova 2022-04-22 12:37:13 UTC
Yes, the pending resources have not been taken into account during the filter phase of the scheduling.

Comment 3 Polina 2022-06-19 19:55:15 UTC
verified on ovirt-engine-4.5.1.2-0.11.el8ev.noarch according to the described scenario .
Running while migration process in Step4 is not allowed now: The host host_mixed_1 did not satisfy internal filter CPU because it has an insufficient amount of CPU cores to run the VM.

Comment 4 Sandro Bonazzola 2022-06-23 05:54:58 UTC
This bugzilla is included in oVirt 4.5.1 release, published on June 22nd 2022.
Since the problem described in this bug report should be resolved in oVirt 4.5.1 release, it has been closed with a resolution of CURRENT RELEASE.
If the solution does not work for you, please open a new bug report.