Bug 1268892

Summary: Wrong HA agent low free memory message
Product: [oVirt] ovirt-hosted-engine-ha Reporter: Richard Neuboeck <hawk>
Component: AgentAssignee: Martin Sivák <msivak>
Status: CLOSED CURRENTRELEASE QA Contact: Artyom <alukiano>
Severity: unspecified Docs Contact:
Priority: high    
Version: 1.3.0CC: alukiano, bugs, dfediuck, mavital, mgoldboi, rgolan, sbonazzo, ylavi
Target Milestone: ovirt-3.6.0-rc3Keywords: Triaged
Target Release: 1.3.2.1Flags: sbonazzo: ovirt-3.6.0?
sbonazzo: exception?
ylavi: planning_ack?
rule-engine: devel_ack+
rule-engine: testing_ack+
Hardware: x86_64   
OS: Linux   
Whiteboard: sla
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-27 07:53:41 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:
Bug Depends On:    
Bug Blocks: 1234906    

Description Richard Neuboeck 2015-10-05 14:45:50 UTC
Description of problem:
During the determination process of finding a qualified host for the engine VM the amount of currently free memory is not identified correctly due to the comparison of an integer to a tuple in /usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/agent/states.py. This results in a wrongfully applied penalty, even though enough free memory is available.


Version-Release number of selected component (if applicable):
Name        : ovirt-hosted-engine-ha
Version     : 1.3.0
Release     : 1.20150930093955.git7116b5b.el7


How reproducible:
Always.


Steps to Reproduce:
1. Shut down the engine VM. Wait for the HA agent to restart the engine.
2. Monitor /var/log/ovirt-hosted-engine-ha/agent.log
3. Watch for lines like: HostedEngine::(_penalize_memory) Penalizing score by 400 due to free memory 512359 being lower than required (4096,)


Actual results:
Low memory penalty for the host though more than enough free memory is available.


Expected results:
No penalty.


Additional info:
agent.log excerpt:
MainThread::INFO::2015-10-05
12:53:28,460::states::71::ovirt_hosted_engine_ha.agent.hosted_engine.HostedEngine::(_penalize_memory)
Penalizing score by 400 due to free memory 512359 being lower than
required (4096,)

Comment 1 Richard Neuboeck 2015-10-05 15:12:44 UTC
I can confirm that the proposed bug fix on ovirt gerrit 46974 is working correctly. ovirt-hosted-engine-ha 1.3.0, CentOS 7.1

Comment 2 Roy Golan 2015-10-06 09:07:18 UTC
The worst case here is that all hosts will have lower scores than they should.

msivak also stresses out that the only host that this won't happen is the on with the engine VM, so it will increase hysteresis before moving the enigne.

Marking as Z.

Comment 3 Martin Sivák 2015-11-02 10:13:08 UTC
*** Bug 1277069 has been marked as a duplicate of this bug. ***

Comment 4 Red Hat Bugzilla Rules Engine 2015-11-02 15:56:00 UTC
This bug is marked for z-stream, yet the milestone is for a major version, therefore the milestone has been reset.
Please set the correct milestone or drop the z stream flag.

Comment 5 Red Hat Bugzilla Rules Engine 2015-11-02 15:56:00 UTC
Fixed bug tickets must have target milestone set prior to fixing them. Please set the correct milestone and move the bugs back to the previous status after this is corrected.

Comment 6 Artyom 2015-11-05 14:37:39 UTC
Verified on ovirt-hosted-engine-ha-1.3.2.1-1.el7ev.noarch
Now both hosts have score 3400

Comment 7 Sandro Bonazzola 2015-11-27 07:53:41 UTC
Since oVirt 3.6.0 has been released, moving from verified to closed current release.