Bug 1323145

Summary: [RFE] host.current_memory_headroom and host.current_memory_usage values are not populating for RHEV Hosts
Product: Red Hat CloudForms Management Engine Reporter: Prasad Mukhedkar <pmukhedk>
Component: ProvidersAssignee: Boriso <bodnopoz>
Status: CLOSED CURRENTRELEASE QA Contact: Ilanit Stein <istein>
Severity: high Docs Contact:
Priority: high    
Version: 5.5.0CC: cpelland, gblomqui, gmccullo, jfrey, jhardy, mkanoor, nachandr, obarenbo, oourfali, pmukhedk, simaishi, tfitzger
Target Milestone: GAKeywords: FutureFeature, TestOnly
Target Release: 5.8.0Flags: oourfali: needinfo? (pmukhedk)
Hardware: x86_64   
OS: Linux   
Whiteboard: automate:rhev:host
Fixed In Version: 5.8.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1392572 (view as bug list) Environment:
Last Closed: 2017-06-12 16:20:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: RHEVM Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1392572    

Description Prasad Mukhedkar 2016-04-01 11:41:32 UTC
Description of problem:

We are using Red Hat best fir placement, /RedHat/Infrastructure/VM/Provisioning/Placement/redhat_best_placement_with_scope 

The current_memory_headroom and :current_memory_usage values seem to be static - i.e. does not reflect the host's current values. AFAICS,  current_memory_headroom defaults to host's physical memory, and current_memory_usage is always zero. I expect to get actual current values to determine which host is more suitable for placement. 

Please review the following code and log excepts - we have two RHEV hosts (bard and bifur) with 15GB RAM each, one is running 4 and the other one is 9 VMs at the moment. Also please see the attached screenshots for the actual RAM usage of the hosts.

** redhat_best_placement_with_scope
~~~~~~
HOST_SORT_ORDER = [:number_of_vms, :active_provisioning_memory, :current_memory_headroom, :current_memory_usage, :random]



** automation.log:
~~~~~
INFO -- : Q-task_id([miq_provision_44000000000094]) <AEMethod redhat_best_placement_with_scope> Sorted host Order:<[:number_of_vms, :active_provisioning_memory, :current_memory_headroom, :current_memory_usage, :random]> Results:<[[[4, 0, -15679, 0, 522], "bifur"], [[9, 0, -15679, 0, 417], "bard"]]>
~~~~~

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

CFME 5.5.0.13.20151201120956_653c0d4 
RHEV 3.5.6


How reproducible:
Always 

Steps to Reproduce:
1. Verify that your are seeing rhev hosts utilization, If not configure the C&U 
2. Provision a virtual machine o rhev provider with auto placement

Actual results:
host.current_memory_headroom and host.current_memory_usage values are not taken 
into the consideration in placement because the values are not populated with 
actual usage metrics. 

Expected results:
host.current_memory_headroom and host.current_memory_usage values should match with the actual current utilization of the host

Additional info:

Comment 3 Greg McCullough 2016-04-25 13:10:40 UTC
Reassigning to providers as automate is only accessing the current_memory_headroom and current_memory_usage properties exposed at the provider level.  They are implemented for VMware only so backend support would be required.

The other option is to remove the references from the redhat_best_placement_with_scope method.  (It was originally combined with VMware which is why they references exist today.)

Comment 13 Ilanit Stein 2017-05-04 11:20:54 UTC
Moving bug to verified based on sanity tests, as those values are not used at the moment.