Bug 1418677 - [RFE] adjust adj_oom for HostedEngine VM
Summary: [RFE] adjust adj_oom for HostedEngine VM
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: ovirt-hosted-engine-ha
Classification: oVirt
Component: General
Version: 2.1.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: bugs@ovirt.org
QA Contact: Nikolai Sednev
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-02 13:54 UTC by Jiri Belka
Modified: 2018-09-13 14:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-13 14:30:47 UTC
oVirt Team: Integration
Embargoed:
dfediuck: ovirt-future?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?


Attachments (Terms of Use)

Description Jiri Belka 2017-02-02 13:54:31 UTC
Description of problem:

My HE VM got killed by OOM killer, surprisingly I already had a vdsm hook but it was not effective. It seems qemu-kvm command args changed - I don't have evidence. I used to believe there was '-name HostedEngine' but there's something else now.

# pgrep -af 'qemu-kvm.*HostedEngine' | awk '{ print $4 }'
guest=HostedEngine,debug-threads=on

Anyway, it would be find if something could adjust adj_oom automatically for me instead of depending on my vdsm hook which would again be possibly non-effective because various changes.


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

How reproducible:
100%

Steps to Reproduce:
1. start HE
2. check if its adj_oom
3.

Actual results:
adj_oom is default, '0'

Expected results:
lower value to be killed as last one (ie. kill user's VM but not HE VM)

Additional info:
my current setup

[root@slot-5b ~]# cat /usr/libexec/vdsm/hooks/after_vm_start/99_oom_adj_hook 
#!/bin/sh

# we adjust oom_adj for below specific vm
# we get vmId from env passed by vdsm
# this file exploits /etc/sudoers.d/51_vdsm !!

ourvm="HostedEngine"

ourpid=$(pgrep -f "qemu-kvm.*HostedEngine")

if [[ -n ${ourpid} ]]; then
        echo -15 | sudo /usr/bin/tee /proc/${ourpid}/oom_adj >/dev/null
fi

exit 0
[root@slot-5b ~]# cat /etc/sudoers.d/51_vdsm 
Cmnd_Alias VDSM_OOM_ADJ_HOOK = /usr/bin/tee /proc/*/oom_adj

vdsm  ALL=(ALL) NOPASSWD: VDSM_OOM_ADJ_HOOK
Defaults:vdsm !requiretty
Defaults:vdsm !syslog

Comment 1 Martin Sivák 2017-03-22 15:58:37 UTC
Just to clarify the RFE. The request is to provide a supported hook for configuring OOM killer. The hook example is a custom hook not provided by us currently.

Comment 2 Sandro Bonazzola 2018-09-13 14:30:47 UTC
Closing this for now, we may reopen if we have capacity.


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