Change in vdsm[master]: vdsm: move try except block inside main function
by Code Review
From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has posted comments on this change.
Change subject: vdsm: move try except block inside main function
......................................................................
Patch Set 3: Code-Review+1
(1 comment)
if you think its righter...
https://gerrit.ovirt.org/#/c/69183/3//COMMIT_MSG
Commit Message:
Line 3: AuthorDate: 2016-12-27 14:37:07 +0200
Line 4: Commit: Irit Goihman <igoihman(a)redhat.com>
Line 5: CommitDate: 2016-12-29 07:40:37 -0500
Line 6:
Line 7: vdsm: move try except block inside main function
why? :| just like that?
Line 8:
Line 9: Change-Id: Ib41ffa8d22a8b52e74fa46a24943fdfdce43fe87
--
To view, visit https://gerrit.ovirt.org/69183
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib41ffa8d22a8b52e74fa46a24943fdfdce43fe87
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes
7 years, 4 months
Change in vdsm[master]: pylint: panic.panic() accepts a single string arg
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: pylint: panic.panic() accepts a single string arg
......................................................................
pylint: panic.panic() accepts a single string arg
Change-Id: I8bd971966705e3281b79ceba6704af573ea45d6c
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/protocoldetector.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/40/69340/1
diff --git a/lib/vdsm/protocoldetector.py b/lib/vdsm/protocoldetector.py
index dfe5f57..5151d00 100644
--- a/lib/vdsm/protocoldetector.py
+++ b/lib/vdsm/protocoldetector.py
@@ -89,7 +89,7 @@
def handle_close(self, dispatcher):
# We cannot handle this, so the best way is to die loudly.
- panic.panic("Listen socket was closed: %s", dispatcher.socket)
+ panic.panic("Listen socket was closed: %s" % dispatcher.socket)
class _ProtocolDetector(object):
--
To view, visit https://gerrit.ovirt.org/69340
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8bd971966705e3281b79ceba6704af573ea45d6c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
7 years, 4 months
Change in vdsm[master]: pylint: vdsClientGluster: get dictionary element properly
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: pylint: vdsClientGluster: get dictionary element properly
......................................................................
pylint: vdsClientGluster: get dictionary element properly
Change-Id: I149824bca1de057c24a737a6bdc043e93a902aad
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M client/vdsClientGluster.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/39/69339/1
diff --git a/client/vdsClientGluster.py b/client/vdsClientGluster.py
index ff9b45a..b818f29 100644
--- a/client/vdsClientGluster.py
+++ b/client/vdsClientGluster.py
@@ -178,7 +178,7 @@
def do_glusterVolumeRemoveBrickStart(self, args):
params = self._eqSplit(args)
volumeName = params.get('volumeName', '')
- brickList = params('bricks', '').split(',')
+ brickList = params.get('bricks', '').split(',')
replicaCount = params.get('replica', '')
status = self.s.glusterVolumeRemoveBrickStart(volumeName,
--
To view, visit https://gerrit.ovirt.org/69339
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I149824bca1de057c24a737a6bdc043e93a902aad
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
7 years, 4 months
Change in vdsm[master]: tests: Add ProcessLeakPlugin
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: tests: Add ProcessLeakPlugin
......................................................................
tests: Add ProcessLeakPlugin
Add plugin for detecting leaked child processes.
Running with --with-process-leak-check will fail any test that leaked a
child process.
Example test that leak child processes:
def test_leak(self):
subprocess.Popen(["sleep", "60"])
Example run:
======================================================================
ERROR: test_leak (leak_test.TestLeak)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nose/case.py", line 133, in run
self.runTest(result)
File "/usr/lib/python2.7/site-packages/nose/case.py", line 151, in runTest
test(result)
AssertionError: Test leaked child processes:
[
{
"cmdline": [
"sleep",
"60"
],
"pid": 29386
}
]
To enable the plugin with make check:
make check NOSE_WITH_PROCESS_LEAK_CHECK=1
Change-Id: I451490d56f70ea8a6a685569d984495798e8b297
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/README
M tests/testValidation.py
M tests/testlib.py
3 files changed, 64 insertions(+), 2 deletions(-)
Approvals:
Nir Soffer: Verified
Jenkins CI: Passed CI tests
Dan Kenigsberg: Looks good to me, approved
--
To view, visit https://gerrit.ovirt.org/69324
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I451490d56f70ea8a6a685569d984495798e8b297
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
7 years, 4 months
Change in vdsm[master]: tests: Document usage of new thread leak checker
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: tests: Document usage of new thread leak checker
......................................................................
tests: Document usage of new thread leak checker
Change-Id: Ie681dfb13bb7124196800f7618072b754847bfc5
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/README
1 file changed, 11 insertions(+), 0 deletions(-)
Approvals:
Nir Soffer: Verified
Jenkins CI: Passed CI tests
Dan Kenigsberg: Looks good to me, approved
--
To view, visit https://gerrit.ovirt.org/69392
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie681dfb13bb7124196800f7618072b754847bfc5
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
7 years, 4 months
Change in vdsm[master]: tests: Add ProcessLeakPlugin
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: tests: Add ProcessLeakPlugin
......................................................................
Patch Set 5: Code-Review+2
--
To view, visit https://gerrit.ovirt.org/69324
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I451490d56f70ea8a6a685569d984495798e8b297
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
7 years, 4 months
Change in vdsm[master]: pylint: ResourceException requires an argument
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: pylint: ResourceException requires an argument
......................................................................
pylint: ResourceException requires an argument
Change-Id: I29a64c2b5d06c2e85ecb61aa86ba0374109e5205
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/storage/resourceManager.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/62/69362/1
diff --git a/vdsm/storage/resourceManager.py b/vdsm/storage/resourceManager.py
index 3d8abfd..0ddbe6d 100644
--- a/vdsm/storage/resourceManager.py
+++ b/vdsm/storage/resourceManager.py
@@ -850,7 +850,7 @@
self.log.warn("Unexpected exception caught while owner '%s' "
"tried to acquire '%s'", self, fullName,
exc_info=True)
- raise se.ResourceException()
+ raise se.ResourceException(fullName)
if hasattr(self.ownerobject, "resourceRegistered"):
self.ownerobject.resourceRegistered(namespace, name, locktype)
--
To view, visit https://gerrit.ovirt.org/69362
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I29a64c2b5d06c2e85ecb61aa86ba0374109e5205
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
7 years, 4 months
Change in vdsm[master]: tests: CountThreadsPlugin
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: tests: CountThreadsPlugin
......................................................................
tests: CountThreadsPlugin
Enable this test plugin (via --with-countthreads) to verify that neither
your test, nor the code it tests, leak threads. Unfortunately, this
plugin cannot be enabled by default, since we do have buggy test and
code that do leak.
Change-Id: I4347f5a6ccf02e80d86174c979eb85a0c5076e7a
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M tests/testValidation.py
M tests/testlib.py
2 files changed, 22 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/40/69040/1
diff --git a/tests/testValidation.py b/tests/testValidation.py
index c9b147d..a4b6789 100644
--- a/tests/testValidation.py
+++ b/tests/testValidation.py
@@ -23,6 +23,7 @@
from functools import wraps
from nose.plugins import Plugin
import subprocess
+import threading
class SlowTestsPlugin(Plugin):
@@ -88,6 +89,24 @@
StressTestsPlugin.enabled = True
+class CountThreadsPlugin(Plugin):
+ """
+ Check whether a test (or the code it triggers) leaks threads
+ """
+ name = 'countthreads'
+
+ def _thread_names(self):
+ return frozenset(t.name for t in threading.enumerate())
+
+ def startTest(self, test):
+ self._start_thread_names = self._thread_names()
+
+ def stopTest(self, test):
+ diff = self._thread_names() - self._start_thread_names
+ if diff:
+ raise Exception('thread leak: %s ' % diff)
+
+
def ValidateRunningAsRoot(f):
@wraps(f)
def wrapper(*args, **kwargs):
diff --git a/tests/testlib.py b/tests/testlib.py
index b67b377..8a55e6e 100644
--- a/tests/testlib.py
+++ b/tests/testlib.py
@@ -58,7 +58,8 @@
from virt import vmxml
from monkeypatch import Patch
-from testValidation import SlowTestsPlugin, StressTestsPlugin
+from testValidation import (
+ SlowTestsPlugin, StressTestsPlugin, CountThreadsPlugin)
# /tmp may use tempfs filesystem, not suitable for some of the test assuming a
# filesystem with direct io support.
@@ -433,6 +434,7 @@
plugins=core.DefaultPluginManager())
conf.plugins.addPlugin(SlowTestsPlugin())
conf.plugins.addPlugin(StressTestsPlugin())
+ conf.plugins.addPlugin(CountThreadsPlugin())
runner = VdsmTestRunner(stream=conf.stream,
verbosity=conf.verbosity,
--
To view, visit https://gerrit.ovirt.org/69040
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4347f5a6ccf02e80d86174c979eb85a0c5076e7a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
7 years, 4 months
Change in vdsm[master]: tests: Document usage of new thread leak checker
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: tests: Document usage of new thread leak checker
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.ovirt.org/69392
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie681dfb13bb7124196800f7618072b754847bfc5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
7 years, 4 months
Change in vdsm[master]: tests: Remove unused import
by Code Review
From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has posted comments on this change.
Change subject: tests: Remove unused import
......................................................................
Patch Set 3: Code-Review+1
--
To view, visit https://gerrit.ovirt.org/67343
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I230dc4ce4ad7d9893a0c6d4421790f171c95a736
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: No
7 years, 4 months