Royce Lv has uploaded a new change for review.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
[WIP]add simple balloon functional testcase
Change-Id: Ie8140fe1c754d9d4026c503a19420e6552a3f4fe Signed-off-by: Royce Lvlvroyce@linux.vnet.ibm.com --- M tests/functional/xmlrpcTests.py 1 file changed, 34 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/20/12820/1
diff --git a/tests/functional/xmlrpcTests.py b/tests/functional/xmlrpcTests.py index 3eb65e4..88dd2c5 100644 --- a/tests/functional/xmlrpcTests.py +++ b/tests/functional/xmlrpcTests.py @@ -19,6 +19,7 @@ #
import os +import time import tempfile import pwd import grp @@ -29,6 +30,7 @@ from testrunner import VdsmTestCase as TestCaseBase from testrunner import permutations, expandPermutations from nose.plugins.skip import SkipTest +from momTests import skipNoMOM try: import rtslib except ImportError: @@ -169,6 +171,38 @@ with RollbackContext() as rollback: self._runVMKernelBootTemplate(rollback, customization)
+ @skipNoKVM + @skipNoMOM + def testSmallVMBallooning(self): + policyStr = """ + (def set_guest (guest) + { + (guest.Control "balloon_target" 0) + }) + (with Guests guest (set_guest guest))""" + balloonSpec = {'device': 'memballoon', + 'type': 'balloon', + 'specParams': {'model': 'virtio'}} + customization = {'vmId': '77777777-ffff-3333-bbbb-555555555555', + 'vmName': 'vdsm_testBalloonVM', + 'devices': [balloonSpec]} + policy = {'balloon': policyStr} + + with RollbackContext() as rollback: + self._runVMKernelBootTemplate(rollback, customization) + self._enableBalloonPolicy(policy, rollback) + time.sleep(12) # MOM policy engine wake up evey 10s + balloonInf = self.s.getVmStats( + customization['vmId'])['statsList'][0]['balloonInfo'] + self.assertEqual(balloonInf['balloon_cur'], 0) + + def _enableBalloonPolicy(self, policy, rollback): + r = self.s.setMOMPolicy(policy) + self.assertVdsOK(r) + undo = lambda: \ + self.assertVdsOK(self.s.resetMOMPolicy()) + rollback.prependDefer(undo) + def _runVMKernelBootTemplate(self, rollback, vmDef={}, distro='fedora'): kernelArgsDistro = { # Fedora: The initramfs is generated by dracut. The following
-- To view, visit http://gerrit.ovirt.org/12820 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: Ie8140fe1c754d9d4026c503a19420e6552a3f4fe Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Royce Lv lvroyce@linux.vnet.ibm.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1506/ (1/2)
-- To view, visit http://gerrit.ovirt.org/12820 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ie8140fe1c754d9d4026c503a19420e6552a3f4fe Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1469/ (2/2)
-- To view, visit http://gerrit.ovirt.org/12820 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ie8140fe1c754d9d4026c503a19420e6552a3f4fe Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1506/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1469/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/12820 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ie8140fe1c754d9d4026c503a19420e6552a3f4fe Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Doron Fediuck has posted comments on this change.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
Patch Set 1:
Hi Royce, I have to related questions;
1. Test data such as: 'vmId': '77777777-ffff-3333-bbbb-555555555555' is set per test now. Can we have it defined globally for other tests?
2. On that issue, why not have policy files for tests?
-- To view, visit http://gerrit.ovirt.org/12820 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ie8140fe1c754d9d4026c503a19420e6552a3f4fe Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Royce Lv has posted comments on this change.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
Patch Set 1:
Hi, Doron, 1. we could use same vmId every tests, but I guess if under some corner case the vm started on last test is not correctly destroyed, it may result in next test fail because of re-use vmId, we use vmId per test to avoid this
2. As it's functional test so conducted in fully installed env, that is to say with policy file balloon+ksm. To make things easy and clean, I just use dynamic policy string set to fulfil this fundamental balloon test.
-- To view, visit http://gerrit.ovirt.org/12820 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ie8140fe1c754d9d4026c503a19420e6552a3f4fe Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1578/ (1/2)
-- To view, visit http://gerrit.ovirt.org/12820 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ie8140fe1c754d9d4026c503a19420e6552a3f4fe Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1541/ (2/2)
-- To view, visit http://gerrit.ovirt.org/12820 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ie8140fe1c754d9d4026c503a19420e6552a3f4fe Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1578/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1541/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/12820 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ie8140fe1c754d9d4026c503a19420e6552a3f4fe Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Doron Fediuck has posted comments on this change.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
Patch Set 2: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/12820 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Ie8140fe1c754d9d4026c503a19420e6552a3f4fe Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Doron Fediuck dfediuck@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Itamar Heim has posted comments on this change.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
Patch Set 2:
ping
Adam Litke has posted comments on this change.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
Patch Set 2: Code-Review+1
Doron Fediuck has posted comments on this change.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
Patch Set 2:
Royce can you please verify it?
Michal Skrivanek has posted comments on this change.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
Patch Set 2:
(1 comment)
.................................................... File tests/functional/xmlrpcTests.py Line 190: Line 191: with RollbackContext() as rollback: Line 192: self._runVMKernelBootTemplate(rollback, customization) Line 193: self._enableBalloonPolicy(policy, rollback) Line 194: time.sleep(12) # MOM policy engine wake up evey 10s *every
Also, can't we do without excessive sleeps in tests? This slows down the test significantly and increases the likelihood people will just skip them. There are already 2 long sleeps in momTests so it's already bad. Can't we change the interval when KSM/MOM kicks in for tests? Line 195: balloonInf = self.s.getVmStats( Line 196: customization['vmId'])['statsList'][0]['balloonInfo'] Line 197: self.assertEqual(balloonInf['balloon_cur'], 0) Line 198:
Michal Skrivanek has posted comments on this change.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
Patch Set 2: Code-Review-1
this needs to be changed to conform with the changes in functional unit tests. Namely the xmlrpcTests.py doesn't exist anymore. See Change-Id: I683c9e056137e7a189815bf6be2eb79ee80994cf
Doron Fediuck has posted comments on this change.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
Patch Set 2: -Code-Review
Martin, can you please asses needed changes?
Martin Sivák has posted comments on this change.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
Patch Set 2:
(1 comment)
.................................................... File tests/functional/xmlrpcTests.py Line 190: Line 191: with RollbackContext() as rollback: Line 192: self._runVMKernelBootTemplate(rollback, customization) Line 193: self._enableBalloonPolicy(policy, rollback) Line 194: time.sleep(12) # MOM policy engine wake up evey 10s and *wakes :)
The period is configured using the config file, so it might be possible to configure the test environment to use different config file with lower numbers.
Or we might replace time.sleep in MoM with threading.Event and add an explicit trigger() function that will reevaluate immediately. Line 195: balloonInf = self.s.getVmStats( Line 196: customization['vmId'])['statsList'][0]['balloonInfo'] Line 197: self.assertEqual(balloonInf['balloon_cur'], 0) Line 198:
Michal Skrivanek has posted comments on this change.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
Patch Set 2:
(1 comment)
.................................................... File tests/functional/xmlrpcTests.py Line 190: Line 191: with RollbackContext() as rollback: Line 192: self._runVMKernelBootTemplate(rollback, customization) Line 193: self._enableBalloonPolicy(policy, rollback) Line 194: time.sleep(12) # MOM policy engine wake up evey 10s to do both would be awesome. I hate wasting 12s of time doing nothing... Line 195: balloonInf = self.s.getVmStats( Line 196: customization['vmId'])['statsList'][0]['balloonInfo'] Line 197: self.assertEqual(balloonInf['balloon_cur'], 0) Line 198:
Itamar Heim has posted comments on this change.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
Patch Set 2:
ping?
Itamar Heim has posted comments on this change.
Change subject: [WIP]add simple balloon functional testcase ......................................................................
Patch Set 2:
ping
Francesco Romani has posted comments on this change.
Change subject: [WIP]tests: add simple balloon functional testcase ......................................................................
Patch Set 2:
Fixed typo to took ownership of the change.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP]tests: add simple balloon functional testcase ......................................................................
Patch Set 3: Code-Review-1 Verified-1
Build Failed
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7340/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6438/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7222/ : UNSTABLE
Dan Kenigsberg has posted comments on this change.
Change subject: [WIP]tests: add simple balloon functional testcase ......................................................................
Patch Set 3: Code-Review-1
(2 comments)
It would be nice to have such a test, interactive with mom and a running VM.
http://gerrit.ovirt.org/#/c/12820/3/tests/functional/virtTests.py File tests/functional/virtTests.py:
Line 337: 'devices': [balloonSpec]} Line 338: policy = {'balloon': policyStr} Line 339: Line 340: with RollbackContext() as rollback: Line 341: self._runVMKernelBootTemplate(rollback, customization) _runVMKernelBootTemplate ? Line 342: self._enableBalloonPolicy(policy, rollback) Line 343: time.sleep(12) # MOM policy engine wake up every 10s Line 344: balloonInf = self.s.getVmStats( Line 345: customization['vmId'])['statsList'][0]['balloonInfo']
Line 339: Line 340: with RollbackContext() as rollback: Line 341: self._runVMKernelBootTemplate(rollback, customization) Line 342: self._enableBalloonPolicy(policy, rollback) Line 343: time.sleep(12) # MOM policy engine wake up every 10s It's policy-engine-interval, for the record. Line 344: balloonInf = self.s.getVmStats( Line 345: customization['vmId'])['statsList'][0]['balloonInfo'] Line 346: self.assertEqual(balloonInf['balloon_cur'], 0) Line 347:
Itamar Heim has posted comments on this change.
Change subject: [WIP]tests: add simple balloon functional testcase ......................................................................
Patch Set 3:
ping
Francesco Romani has posted comments on this change.
Change subject: [WIP]tests: add simple balloon functional testcase ......................................................................
Patch Set 3:
(2 comments)
http://gerrit.ovirt.org/#/c/12820/3/tests/functional/virtTests.py File tests/functional/virtTests.py:
Line 337: 'devices': [balloonSpec]} Line 338: policy = {'balloon': policyStr} Line 339: Line 340: with RollbackContext() as rollback: Line 341: self._runVMKernelBootTemplate(rollback, customization)
_runVMKernelBootTemplate ?
Historical relic. Fixed doing some archeology. Line 342: self._enableBalloonPolicy(policy, rollback) Line 343: time.sleep(12) # MOM policy engine wake up every 10s Line 344: balloonInf = self.s.getVmStats( Line 345: customization['vmId'])['statsList'][0]['balloonInfo']
Line 339: Line 340: with RollbackContext() as rollback: Line 341: self._runVMKernelBootTemplate(rollback, customization) Line 342: self._enableBalloonPolicy(policy, rollback) Line 343: time.sleep(12) # MOM policy engine wake up every 10s
It's policy-engine-interval, for the record.
Sorry, I'm not following you here. Could you please expand the above sentence? Line 344: balloonInf = self.s.getVmStats( Line 345: customization['vmId'])['statsList'][0]['balloonInfo'] Line 346: self.assertEqual(balloonInf['balloon_cur'], 0) Line 347:
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP]tests: add simple balloon functional testcase ......................................................................
Patch Set 4:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/9652/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/8719/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_network_functional_tests_gerrit/143... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/9505/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_storage_functional_tests_localfs_ge... : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP]tests: add simple balloon functional testcase ......................................................................
Patch Set 5:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/9666/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/8733/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_network_functional_tests_gerrit/143... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/9519/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_storage_functional_tests_localfs_ge... : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 6: Code-Review-1 Verified-1
Build Unstable
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/9029/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_network_functional_tests_gerrit/147... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/9813/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/737/ : The patch does not pass the virt functional tests
http://jenkins.ovirt.org/job/vdsm_master_storage_functional_tests_localfs_ge... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit/9969/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 7:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/9748/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/10533/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/1071/ : There was an infra issue, please contact infra@ovirt.org
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/10690/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_network_functional_tests_gerrit/157... : There was an infra issue, please contact infra@ovirt.org
Dan Kenigsberg has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 7: Code-Review-1
(1 comment)
http://gerrit.ovirt.org/#/c/12820/7/tests/functional/virtTests.py File tests/functional/virtTests.py:
Line 440: vm)['statsList'][0]['balloonInfo'] Line 441: self.assertEqual(balloonInfo['balloon_cur'], 0) Line 442: Line 443: def _balloonPolicy(self, policy): Line 444: with RollbackContext() as rollback: Please consider replacing with a plain
self.assertVdsOK(self.vdsm.setMOMPolicy(policy) try: yeild finally: self.assertVdsOK(self.vdsm.resetMOMPolicy()) Line 445: r = self.vdsm.setMOMPolicy(policy) Line 446: self.assertVdsOK(r) Line 447: undo = lambda: \ Line 448: self.assertVdsOK(self.vdsm.resetMOMPolicy())
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 8:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/10065/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/10850/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/1190/ : There was an infra issue, please contact infra@ovirt.org
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/11007/ : SUCCESS
Dan Kenigsberg has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 8: Code-Review-1
(1 comment)
http://gerrit.ovirt.org/#/c/12820/8/tests/functional/storageTests.py File tests/functional/storageTests.py:
Line 80 Line 81 Line 82 Line 83 Line 84 Is this removal intentional? I understood the former move of this method up to TestCaseBase; but how can it work now that it has been moved to a parallel class?
Francesco Romani has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 9:
Further simplification and fixed the mess made in the last patchset. The only thing left is how to get rid of his awful time.sleep().
I'd like to go the same road took for vmRecoveryTests. Some tests are more potentially harmful for automation, like the said recovery, because they need to restart the VDSM and/or to change the configuration, like I want to do here for MOM.
So I'd like to separate them from the core set of virt functional test, which will stay in virtTests.py.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 9:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/10072/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/10857/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/1191/ : There was an infra issue, please contact infra@ovirt.org
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/11014/ : SUCCESS
Francesco Romani has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 11:
The test is now modernized and reached a form I'm happy with it. The test itself runs, but it fails because
2014-07-15 09:25:26,879 - mom - INFO - MOM starting 2014-07-15 09:25:26,952 - mom - INFO - hypervisor interface vdsm 2014-07-15 09:25:26,952 - mom.HostMonitor - INFO - Host Monitor starting 2014-07-15 09:25:26,958 - mom.GuestManager - INFO - Guest Manager starting 2014-07-15 09:25:26,972 - mom.Policy - INFO - Loaded policy '00-defines' 2014-07-15 09:25:26,995 - mom.HostMonitor - INFO - HostMonitor is ready 2014-07-15 09:25:27,010 - mom.Policy - INFO - Loaded policy '02-balloon' 2014-07-15 09:25:27,047 - mom.Policy - INFO - Loaded policy '03-ksm' 2014-07-15 09:25:27,114 - mom.Policy - INFO - Loaded policy '04-cputune' 2014-07-15 09:25:27,115 - mom.PolicyEngine - INFO - Policy Engine starting 2014-07-15 09:25:27,116 - mom.RPCServer - INFO - RPC Server is disabled 2014-07-15 09:25:37,181 - mom.Controllers.KSM - INFO - Updating KSM configuration: pages_to_scan:0 run:0 sleep_millisecs:0 2014-07-15 09:26:02,011 - mom.Monitor - INFO - GuestMonitor-vdsm_testBalloonVM starting 2014-07-15 09:26:02,012 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active 2014-07-15 09:26:02,013 - mom.Monitor - ERROR - GuestMonitor-vdsm_testBalloonVM crashed Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/mom/GuestMonitor.py", line 56, in run self.collect() File "/usr/lib/python2.6/site-packages/mom/Monitor.py", line 91, in collect collected = c.collect() File "/usr/lib/python2.6/site-packages/mom/Collectors/GuestCpuTune.py", line 44, in collect stat = self.hypervisor_iface.getVmCpuTuneInfo(self.uuid) File "/usr/lib/python2.6/site-packages/mom/HypervisorInterfaces/vdsmInterface.py", line 184, in getVmCpuTuneInfo vcpuCount = response['statsList'][0]['vcpuCount'] KeyError: 'vcpuCount' 2014-07-15 09:26:12,023 - mom.Monitor - INFO - GuestMonitor-vdsm_testBalloonVM starting 2014-07-15 09:26:12,023 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active 2014-07-15 09:26:12,024 - mom.Monitor - ERROR - GuestMonitor-vdsm_testBalloonVM crashed Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/mom/GuestMonitor.py", line 56, in run self.collect() File "/usr/lib/python2.6/site-packages/mom/Monitor.py", line 91, in collect collected = c.collect() File "/usr/lib/python2.6/site-packages/mom/Collectors/GuestCpuTune.py", line 44, in collect stat = self.hypervisor_iface.getVmCpuTuneInfo(self.uuid) File "/usr/lib/python2.6/site-packages/mom/HypervisorInterfaces/vdsmInterface.py", line 184, in getVmCpuTuneInfo vcpuCount = response['statsList'][0]['vcpuCount'] KeyError: 'vcpuCount' 2014-07-15 09:26:22,024 - mom.Monitor - INFO - GuestMonitor-vdsm_testBalloonVM starting 2014-07-15 09:26:22,025 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active 2014-07-15 09:26:30,924 - mom.RPCServer - INFO - setPolicy() 2014-07-15 09:26:32,032 - mom.vdsmInterface - ERROR - {'status': {'message': 'Virtual machine does not exist', 'code': 1}} 2014-07-15 09:26:32,033 - mom.vdsmInterface - ERROR - Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/mom/HypervisorInterfaces/vdsmInterface.py", line 146, in getVmBalloonInfo self._check_status(response) File "/usr/lib/python2.6/site-packages/mom/HypervisorInterfaces/vdsmInterface.py", line 46, in _check_status raise vdsmException(response, self.logger) vdsmException
2014-07-15 09:26:32,033 - mom.vdsmInterface - ERROR - {'status': {'message': 'Virtual machine does not exist', 'code': 1}} 2014-07-15 09:26:32,033 - mom.vdsmInterface - ERROR - Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/mom/HypervisorInterfaces/vdsmInterface.py", line 171, in getVmCpuTuneInfo self._check_status(response) File "/usr/lib/python2.6/site-packages/mom/HypervisorInterfaces/vdsmInterface.py", line 46, in _check_status raise vdsmException(response, self.logger) vdsmException
2014-07-15 09:26:37,039 - mom.Monitor - INFO - GuestMonitor-vdsm_testBalloonVM ending
Francesco Romani has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 11: Verified+1
Ticking 'Verified' because - the test itself runs and it is ready to be merged - the fact it fails shows the test itself has some worth - adding it will not hurt the core test suite (that's the reason why is on a different module)
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 10:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/10234/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/11019/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/1272/ : There was an infra issue, please contact infra@ovirt.org
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/11176/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 11:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/10236/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/11021/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/11178/ : SUCCESS
Francesco Romani has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 11: Code-Review-1
need to make sure mom works ok before to merge
Dan Kenigsberg has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 11: Code-Review-1
(1 comment)
Marking -1 until the mom issue is understood.
http://gerrit.ovirt.org/#/c/12820/11/tests/functional/vmQoSTests.py File tests/functional/vmQoSTests.py:
Line 27: from utils import VdsProxy, SUCCESS Line 28: Line 29: Line 30: def setUpModule(): Line 31: # to make pyflakes happy I find this comment confusing... this function is here for explicitness, not just to make pyflakes happy! Line 32: virtTests.setUpModule() Line 33: Line 34: Line 35: def tearDownModule():
Francesco Romani has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 11: -Code-Review
real bug found and reported: https://bugzilla.redhat.com/show_bug.cgi?id=1119775
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 12:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/10503/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/11288/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/11445/ : SUCCESS
Francesco Romani has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 13: Code-Review-1
must require a fixed MOM.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 13:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/10559/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/11501/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/11344/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 14:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/10909/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/241... : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/11851/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc19_created/275... : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/11694/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/256/ : FAILURE
Francesco Romani has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 14: Verified+1
Forgot to copy score.
MOM fix was merged post 0.4.1, so it is safe to assume that every version >= 0.4.2 is suitable.
Francesco Romani has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 15:
rebased to keep it current. Still waiting for MOM >= 0.4.2.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 15:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/331... : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/347/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/11439/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/12383/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/12228/ : SUCCESS
Adam Litke has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 15:
mom-0.4.2 is posted to fedora repos in updates-testing. I've created updates for f20, el6, and epel7. Once these get moved to stable then we can bump the mom version.
Adam Litke has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 15:
(1 comment)
http://gerrit.ovirt.org/#/c/12820/15/tests/functional/vmQoSTests.py File tests/functional/vmQoSTests.py:
Line 65: Line 66: with RunningVm(self.vdsm, customization) as vm: Line 67: self._waitForStartup(vm, VM_MINIMAL_UPTIME) Line 68: with self._balloonPolicy(policy): Line 69: time.sleep(12) # MOM policy engine wake up every 10s I wouldn't gate this patch, but we really need to expand the VirtTests framework so that we can restart mom with a shorter interval. 12s just to wait for mom to do nothing is a shame. Line 70: status, msg, stats = self.vdsm.getVmStats(vm) Line 71: self.assertEqual(status, SUCCESS, msg) Line 72: self.assertEqual(stats['balloonInfo']['balloon_cur'], 0) Line 73:
Francesco Romani has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 15:
(1 comment)
http://gerrit.ovirt.org/#/c/12820/15/tests/functional/vmQoSTests.py File tests/functional/vmQoSTests.py:
Line 65: Line 66: with RunningVm(self.vdsm, customization) as vm: Line 67: self._waitForStartup(vm, VM_MINIMAL_UPTIME) Line 68: with self._balloonPolicy(policy): Line 69: time.sleep(12) # MOM policy engine wake up every 10s
I wouldn't gate this patch, but we really need to expand the VirtTests fram
That's right. I'll work on a followup patch to address this. Line 70: status, msg, stats = self.vdsm.getVmStats(vm) Line 71: self.assertEqual(status, SUCCESS, msg) Line 72: self.assertEqual(stats['balloonInfo']['balloon_cur'], 0) Line 73:
Dan Kenigsberg has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 15: Code-Review+2
Dan Kenigsberg has submitted this change and it was merged.
Change subject: tests: add simple balloon functional testcase ......................................................................
tests: add simple balloon functional testcase
Change-Id: Ie8140fe1c754d9d4026c503a19420e6552a3f4fe Signed-off-by: Royce Lv lvroyce@linux.vnet.ibm.com Signed-off-by: Francesco Romani fromani@redhat.com Reviewed-on: http://gerrit.ovirt.org/12820 Reviewed-by: Dan Kenigsberg danken@redhat.com --- M tests/functional/Makefile.am A tests/functional/vmQoSTests.py M vdsm.spec.in 3 files changed, 82 insertions(+), 1 deletion(-)
Approvals: Dan Kenigsberg: Looks good to me, approved Francesco Romani: Verified
oVirt Jenkins CI Server has posted comments on this change.
Change subject: tests: add simple balloon functional testcase ......................................................................
Patch Set 16:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_create-rpms_merged/1841/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_create-rpms_merged_test_debug/182/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_verify-error-codes_merged/5815/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_merged/3974/ : SUCCESS
vdsm-patches@lists.fedorahosted.org