Description of problem:
In automation test i have a nagtive test that checks if the balloon is not working without Guset Agent.
in this test, i see that the ballooning is working fine without the Guest Agent on rhel VM.
msivak explained that it happens cause :
The configuration uses GuestMemoryOptional and the policy tests for (valid guest.balloon_cur (guest.StatAvg "mem_unused") properly.
Unfortunately the StatAvg method returns 0 which is considered a valid value.
Create a bug number and I will fix that. You can test a probable fix by changing the 02-balloon file to use: (valid guest.balloon_cur (guest.Stat "mem_unused") instead.
Version-Release number of selected component (if applicable):
vdsm-4.16.16-1.el7ev.x86_64
mom-0.4.1-5.el7ev.noarch
How reproducible:
100*
Steps to Reproduce:
0. make sure the overcommit is disabeld
- go to Clusters
- right click on the cluster -> edit
- go to Optimization tab
- make sure this radio button is chosen: None - Disable memory overcommit
1.enable ballooning on the cluster :
- go to Clusters
- right click on the cluster -> edit
- go to Optimization tab
- enable the checkbox : Enable Memory Balloon Optimization
2.Sync mom policy
- go to Clusters
- choose your cluster
- on the cluster sub tab choose your hosts and click on 'Sync MoM policy'
3.Create VM with OS installed (512MB guaranteed memory / 2GB full memory) without Guest Agent
4. on the host, change in the file "/etc/vdsm/mom.d/02-balloon.policy" from defvar pressure_threshold 0.20 to defvar pressure_threshold 0.40 - to make ballooning Run faster
5. Run memory load on host
6. chack the in vdsClient if the ballooning is working.
the spesific command: vdsClient -s <HOST_NAME> getVmStats <VM_ID> | grep balloon
if the current_balloon < max_balloon is True then the ballooning is working.
Actual results:
the balooning is working on the VM with no guest agent.
Expected results:
the balloning shouldn't work
Additional info:
mom log :
2015-06-09 16:58:52,185 - mom.Monitor - INFO - GuestMonitor-mom-1 is ready
2015-06-09 17:05:52,748 - mom.Monitor - INFO - GuestMonitor-mom-1 ending
2015-06-09 17:06:37,693 - mom.Monitor - INFO - GuestMonitor-mom-1 starting
2015-06-09 17:06:37,695 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active
2015-06-09 17:06:52,716 - mom.Monitor - INFO - GuestMonitor-mom-1 is ready
2015-06-09 17:08:17,839 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active
2015-06-09 17:09:01,015 - mom.Controllers.Balloon - INFO - Ballooning guest:mom-1 from 2097152 to 1992294
2015-06-09 17:10:08,001 - mom.Monitor - INFO - GuestMonitor-mom-1 ending
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2016-0362.html