Mark Wu has posted comments on this change.
Change subject: mom: add mom balloon functional tests for running vms
......................................................................
Patch Set 2: I would prefer that you didn't submit this
(5 inline comments)
....................................................
File tests/functional/momTests.py
Line 65: self.assertEqual(pages_to_scan, hostStats['ksmPages'])
Line 66:
Line 67: def _filterVmsStats(self, vmsStats, filteredStats):
Line 68: # Filter all vms' statistics to get balloon operation candidates.
Line 69: for Stats in vmsStats:
states is better than States
Line 70: try:
Line 71: if Stats['status'] == 'Running' and Stats['balloonInfo'] \
Line 72: and Stats['memoryStats']:
Line 73: filteredStats.append(Stats)
Line 69: for Stats in vmsStats:
Line 70: try:
Line 71: if Stats['status'] == 'Running' and Stats['balloonInfo'] \
Line 72: and Stats['memoryStats']:
Line 73: filteredStats.append(Stats)
filteredStats is a little bit confusing.
Any reason using a pass in argument instead of return value?
Line 74: except KeyError:
Line 75: pass
Line 76: return
Line 77:
Line 134: Host.mem_available))
Line 135: (if (<= host_free_percent pressure_threshold)
Line 136: (with Guests guest (shrink_guest guest))
Line 137: 0)"""
Line 138:
You could save the policy string in a separate file
Line 139: r = self.s.setMOMPolicy(testPolicyStr)
Line 140: self.assertOK(r)
Line 141:
Line 142: # Wait for the policy taking effect
Line 214: (defvar host_free_percent (/ (Host.StatAvg "mem_free")
Line 215: Host.mem_available))
Line 216: (if (> host_free_percent pressure_threshold)
Line 217: (with Guests guest (grow_guest guest)) 0)"""
Line 218:
the same here as line 138
Line 219: r = self.s.setMOMPolicy(testPolicyStr)
Line 220: self.assertOK(r)
Line 221:
Line 222: # Wait for the policy taking effect
Line 236: self.assertTrue(vmNewStats['balloonInfo']['balloon_cur']
Line 237: <= ceil(balloonMax))
Line 238: self.assertTrue(vmNewStats['balloonInfo']['balloon_cur']
Line 239: >= floor(0.99225 * balloonMax))
Line 240: break
I believe there's a lot of code could be shared between testBalloonGrow and testBalloonShrink. So it's better to exact some functions to reduce the duplicated code.
--
To view, visit http://gerrit.ovirt.org/13156
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I922568233dc769d83e2fdffe1c24439d13d03d7e
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mei Liu <liumbj(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Mark Wu <wudxw(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Mei Liu <liumbj(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Saggi Mizrahi has uploaded a new change for review.
Change subject: testrunner: Add NOSE_COLOR env var
......................................................................
testrunner: Add NOSE_COLOR env var
Allows forcing output of color to non terminal.
Useful for case where the errors are longer then the scrollback:
NOSE_COLOR=1 ./run_tests_local.sh jsonRpcTests | less -R
Change-Id: I4eb684c73f6254a35707fcd7f3f6b30eaaae9f2f
Signed-off-by: Saggi Mizrahi <smizrahi(a)redhat.com>
---
M tests/testrunner.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/02/12302/1
diff --git a/tests/testrunner.py b/tests/testrunner.py
index 2c55a51..1880736 100644
--- a/tests/testrunner.py
+++ b/tests/testrunner.py
@@ -115,7 +115,7 @@
def colorWrite(stream, text, color):
- if os.isatty(stream.fileno()):
+ if os.isatty(stream.fileno()) or os.environ.get("NOSE_COLOR", False):
stream.write('\x1b[%s;1m%s\x1b[0m' % (color, text))
else:
stream.write(text)
--
To view, visit http://gerrit.ovirt.org/12302
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4eb684c73f6254a35707fcd7f3f6b30eaaae9f2f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi(a)redhat.com>
Antoni Segura Puimedon has uploaded a new change for review.
Change subject: Bump up libvirt version to fix network linking.
......................................................................
Bump up libvirt version to fix network linking.
The libvirt feature leveraged for the Network linking feature had
a bug that made it fail when the vnic had a bootorder set. This was
solved and has been marked for backport (which did not yet happen)
for the version this patch sets).
Change-Id: Ib9e96eb0192fbea35d2723cafbec145b629371fa
Bug-Url: https://bugzilla.redhat.com/906446
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/00/11600/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 00c1259..a99f543 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -119,7 +119,7 @@
Requires: python >= 2.7.3
Requires: qemu-kvm >= 2:0.15.0-4
Requires: qemu-img >= 2:0.15.0-4
-Requires: libvirt >= 0.10.1-1
+Requires: libvirt >= 0.10.2-4
Requires: iscsi-initiator-utils >= 6.2.0.872-14
Requires: device-mapper-multipath >= 0.4.9-18
Requires: e2fsprogs >= 1.41.14
--
To view, visit http://gerrit.ovirt.org/11600
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9e96eb0192fbea35d2723cafbec145b629371fa
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.2
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
Hello Yaniv Bronhaim,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/13303
to review the following change.
Change subject: fix storage.fuser
......................................................................
fix storage.fuser
Bug-Url: https://bugzilla.redhat.com/922515
Change-Id: Iabd58847db7090f83106d30a763d09c0a7b78741
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/13302
Reviewed-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
Tested-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M tests/Makefile.am
A tests/fuserTests.py
M vdsm/storage/fuser.py
3 files changed, 33 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/03/13303/1
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8ad34e2..9aec750 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -27,6 +27,7 @@
capsTests.py \
configNetworkTests.py \
fileUtilTests.py \
+ fuserTests.py \
getAllVolumesTests.py \
glusterTestData.py \
gluster_cli_tests.py \
diff --git a/tests/fuserTests.py b/tests/fuserTests.py
new file mode 100644
index 0000000..7473dde
--- /dev/null
+++ b/tests/fuserTests.py
@@ -0,0 +1,31 @@
+#
+# Copyright 2013 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Refer to the README and COPYING files for full details of the license
+#
+
+import os
+from storage import fuser
+
+from testrunner import VdsmTestCase
+
+
+class TestFuser(VdsmTestCase):
+
+ def testSelfExe(self):
+ pid = os.getpid()
+ self.assertTrue(pid in fuser.fuser('/proc/%s/exe' % pid))
diff --git a/vdsm/storage/fuser.py b/vdsm/storage/fuser.py
index d9becbc..135dad6 100644
--- a/vdsm/storage/fuser.py
+++ b/vdsm/storage/fuser.py
@@ -27,7 +27,7 @@
cmd.append("-m")
cmd.append(path)
- (rc, out, err) = misc.execCmd(cmd, sudo=True)
+ (rc, out, err) = misc.execCmd(cmd, raw=True, sudo=True)
if rc != 0:
return []
--
To view, visit http://gerrit.ovirt.org/13303
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iabd58847db7090f83106d30a763d09c0a7b78741
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.2
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Antoni Segura Puimedon has uploaded a new change for review.
Change subject: Bump up libvirt version to fix network linking.
......................................................................
Bump up libvirt version to fix network linking.
The libvirt feature leveraged for the Network linking feature had
a bug that made it fail when the vnic had a bootorder set. This was
solved and has been marked for backport (which did not yet happen)
for the version this patch sets).
Change-Id: Ib9e96eb0192fbea35d2723cafbec145b629371fa
Bug-Url: https://bugzilla.redhat.com/906446
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/99/11599/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index b5be43e..fd1b2df 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -119,7 +119,7 @@
Requires: python >= 2.7.3
Requires: qemu-kvm >= 2:0.15.0-4
Requires: qemu-img >= 2:0.15.0-4
-Requires: libvirt >= 0.10.1-1
+Requires: libvirt >= 0.10.2-4
Requires: iscsi-initiator-utils >= 6.2.0.872-14
Requires: device-mapper-multipath >= 0.4.9-18
Requires: e2fsprogs >= 1.41.14
--
To view, visit http://gerrit.ovirt.org/11599
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9e96eb0192fbea35d2723cafbec145b629371fa
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
Federico Simoncelli has uploaded a new change for review.
Change subject: blocksd: skip broken images in getAllVolumes
......................................................................
blocksd: skip broken images in getAllVolumes
When one of the images in the storage pool was damaged some operations
were failing for other images too (e.g. deletion).
This lead, for example, to the impossibility of removing VMs (and their
disks) on storage domains containing damaged images.
Change-Id: Ib9bbf7eecdb11873dd5fe9bef2afaa680aecbc32
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M vdsm/storage/blockSD.py
1 file changed, 11 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/59/11859/1
diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py
index cc25417..404c3ef 100644
--- a/vdsm/storage/blockSD.py
+++ b/vdsm/storage/blockSD.py
@@ -164,18 +164,25 @@
"""
vols = _getVolsTree(sdUUID)
res = {}
+
for volName in vols.iterkeys():
res[volName] = {'imgs': [], 'parent': None}
for volName, vImg, parentVol in vols.itervalues():
res[volName]['parent'] = parentVol
+
if vImg not in res[volName]['imgs']:
res[volName]['imgs'].insert(0, vImg)
+
if (parentVol != sd.BLANK_UUID and
- not volName.startswith(
- sd.REMOVED_IMAGE_PREFIX) and
- vImg not in res[parentVol]['imgs']):
- res[parentVol]['imgs'].append(vImg)
+ not volName.startswith(sd.REMOVED_IMAGE_PREFIX)):
+ try:
+ if vImg not in res[parentVol]['imgs']:
+ res[parentVol]['imgs'].append(vImg)
+ except KeyError:
+ log.warning("Unable to find volume %s on domain %s, image "
+ "%s could be damaged, skipping", parentVol, vImg,
+ sdUUID, exc_info=True)
return dict((k, sd.ImgsPar(tuple(v['imgs']), v['parent']))
for k, v in res.iteritems())
--
To view, visit http://gerrit.ovirt.org/11859
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9bbf7eecdb11873dd5fe9bef2afaa680aecbc32
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>