Bug 1353059

Summary: Slightly misleading log when using OptimalForPowerSaving Balancer.
Product: Red Hat Enterprise Virtualization Manager Reporter: Germano Veit Michel <gveitmic>
Component: ovirt-engineAssignee: Yanir Quinn <yquinn>
Status: CLOSED CURRENTRELEASE QA Contact: Shira Maximov <mshira>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.6.7CC: amarchuk, dfediuck, gklein, lsurette, mavital, mgoldboi, rbalakri, rgolan, Rhev-m-bugs, sbonazzo, srevivo, ykaul, yquinn
Target Milestone: ovirt-4.0.4   
Target Release: 4.0.4   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-17 13:08:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Germano Veit Michel 2016-07-06 00:24:17 UTC
Description of problem:

Message logged in engine.log is a bit misleading, making it more difficult to create/modify effective policies.

[org.ovirt.engine.core.bll.scheduling.policyunits.CpuAndMemoryBalancingPolicyUnit] (DefaultQuartzScheduler_Worker-15) [187ca1cf] All hosts are over-utilized, can't balance the cluster 'Default' using the secondary method

It implies it won't run the secondary method because all hosts are over-utilized. 

That's not true when using OptimalForPowerSaving balacer (and perhaps some other cases too).

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

How reproducible:
100%

Steps to Reproduce:
- OptimalForPowerSaving Balancer
- MinFreeMemoryForUnderUtilized of X GB
- MaxFreeMemoryForOverUtilized of Y GB
1. Concentrate all VMs in one host, let it go under Y of free scheduling memory
2. Let the other host have more free memory than X

Actual results:
"All hosts are over-utilized, can't balance the cluster 'Default' using the secondary method"

Expected results:
"All hosts are over-utilized or under-utilized, can't balance the cluster 'Default' using the secondary method"

OR

"All hosts have been filtered, can't balance the cluster 'Default' using the secondary method"

Additional info:

'underUtilizedHosts' ends up empty in backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/CpuAndMemoryBalancingPolicyUnit.java:101 when using 'getSecondaryDestinations' from OptimalForPowerSaving defined in backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/PowerSavingBalancePolicyUnit.java:340. This happens because this implementation of 'getSecondaryDestinations' filters BOTH OverUtilized and UnderUtilized hosts, but the message we log says only OverUtilized.

No big deal and just making the log string more generic would be satisfactory. Or use some return codes to give a more detailed log.

Comment 1 Yaniv Kaul 2016-07-18 07:05:24 UTC
Is this going to 4.0?
1. It cannot be set to 4.0.4 - this is our RC cycle, or even post RHV 4.0 GA - we don't want that.
2. Patches are still in draft.

What is the status of this bug?

Comment 2 Yanir Quinn 2016-07-18 08:04:40 UTC
(In reply to Yaniv Kaul from comment #1)
> Is this going to 4.0?
> 1. It cannot be set to 4.0.4 - this is our RC cycle, or even post RHV 4.0 GA
> - we don't want that.
> 2. Patches are still in draft.
> 
> What is the status of this bug?

1.need to verify with Doron / Roy
2.The patch is pending on code review (both on master and 4.0)

Comment 3 Roy Golan 2016-07-19 08:59:37 UTC
Also the wording "Secondary method" is not helping.

Comment 5 Shira Maximov 2016-09-05 12:04:46 UTC
verified on :
Red Hat Virtualization Manager Version: 4.0.4-0.1.el7ev

verification steps: 

1. create new cluster policy with OptimalForPowerSaving LOAD Balancer
and the following parameters:
- MinFreeMemoryForUnderUtilized of X GB
- MaxFreeMemoryForOverUtilized of Y GB
2. set this new cluster policy on the cluster
3. Concentrate all VMs in one host, let it go under Y of free scheduling memory
4. Let the other host have more free memory than X


can see the right Warning log :
2016-09-05 14:55:40,422 WARN  [org.ovirt.engine.core.bll.scheduling.policyunits.CpuAndMemoryBalancingPolicyUnit] (DefaultQuartzScheduler9) [422a7cba] All candidate hosts have been filtered, can't balance the cluster 'golden_env_mixed_1' using memory based approach