Change in vdsm[master]: Instruct MOM to ignore ballooning when guest agent is not ru...

msivak at redhat.com msivak at redhat.com
Thu Nov 20 16:23:02 UTC 2014


Martin Sivák has uploaded a new change for review.

Change subject: Instruct MOM to ignore ballooning when guest agent is not running
......................................................................

Instruct MOM to ignore ballooning when guest agent is not running

This makes use of the new MOM feature (valid function) and
associated guest memory collector (GuestMemoryOptional).

The ballooning part of the policy will be ignored when guest agent
is not running while the rest of the policy is still evaluated.

The most notable change is that MOM used to ignore the whole
policy when guest agent was not available.

Change-Id: I20f636cd9290340022d42210cbb5ba6c3b009dd9
Signed-off-by: Martin Sivak <mars at montik.net>
---
M vdsm.spec.in
M vdsm/mom.conf.in
M vdsm/mom.d/02-balloon.policy
3 files changed, 11 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/35407/1

diff --git a/vdsm.spec.in b/vdsm.spec.in
index 8438df7..565164f 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -131,7 +131,7 @@
 Requires: libnl
 Requires: %{name}-xmlrpc = %{version}-%{release}
 Requires: %{name}-jsonrpc = %{version}-%{release}
-Requires: mom >= 0.4.2
+Requires: mom >= 0.4.3
 Requires: numactl
 
 %ifarch x86_64
diff --git a/vdsm/mom.conf.in b/vdsm/mom.conf.in
index c850fff..35d90a8 100644
--- a/vdsm/mom.conf.in
+++ b/vdsm/mom.conf.in
@@ -71,4 +71,4 @@
 
 [guest]
 # A comma-separated list of Collector plugins to use for Guest data collection.
-collectors: GuestQemuProc, GuestMemory, GuestBalloon, GuestCpuTune
+collectors: GuestQemuProc, GuestMemoryOptional, GuestBalloon, GuestCpuTune
diff --git a/vdsm/mom.d/02-balloon.policy b/vdsm/mom.d/02-balloon.policy
index c98a231..d372478 100644
--- a/vdsm/mom.d/02-balloon.policy
+++ b/vdsm/mom.d/02-balloon.policy
@@ -107,10 +107,15 @@
 
 # If the balloon is disabled, only deflate the balloon when possible
 
-(defvar host_free_percent (/ (Host.StatAvg "mem_free") Host.mem_available))
-(if (and (< host_free_percent pressure_threshold) balloonEnabled)
-    (with Guests guest (shrink_guest guest))
-    (with Guests guest (grow_guest guest)))
+(def balloon_logic () {
+    (defvar host_free_percent (/ (Host.StatAvg "mem_free") Host.mem_available))
+    (if (and (< host_free_percent pressure_threshold) balloonEnabled)
+        (with Guests guest (shrink_guest guest))
+        (with Guests guest (grow_guest guest)))
+})
+
+(if (valid guest.balloon_cur (Host.StatAvg "mem_free") (guest.StatAvg "mem_unused"))
+    (balloon_logic) 0)
 
 #
 # Balloon minimum guaranteed memory ruleset


-- 
To view, visit http://gerrit.ovirt.org/35407
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I20f636cd9290340022d42210cbb5ba6c3b009dd9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msivak at redhat.com>


More information about the vdsm-patches mailing list