Nir Soffer has uploaded a new change for review.
Change subject: build: Disable tests during build
......................................................................
build: Disable tests during build
Tests are needed for development, not for building a package. This
allows us to use latest and greatest development tools, which are not
available in brew or koji.
Since we install nose using pip, remove the build requires - we don't
need now nose to build rpms.
Change-Id: I9e3589c365166f934f117b53c65cea4b90db3516
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 0 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/66/63966/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index f234b09..c7f6dde 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -62,7 +62,6 @@
BuildRequires: python2-devel
BuildRequires: python-mock
BuildRequires: python-netaddr
-BuildRequires: python-nose
BuildRequires: python-six >= 1.9.0
BuildRequires: rpm-build
@@ -95,10 +94,8 @@
%if 0%{?with_python3}
%if 0%{?rhel}
-BuildRequires: python34-nose
BuildRequires: python34-six
%else # fedora
-BuildRequires: python3-nose
BuildRequires: python3-six
BuildRequires: python3-netaddr
BuildRequires: python3-yaml
@@ -781,9 +778,6 @@
# Install the libvirt hook for cleaning up the XML
install -Dm 0755 vdsm/virt/libvirt-hook.sh \
%{buildroot}%{_sysconfdir}/libvirt/hooks/qemu
-
-%check
-make tests
%pre
# Force standard locale behavior (English)
--
To view, visit https://gerrit.ovirt.org/63966
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e3589c365166f934f117b53c65cea4b90db3516
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Nir Soffer has uploaded a new change for review.
Change subject: utils: Wait for terminated process
......................................................................
utils: Wait for terminated process
utils.terminating was not waiting for a terminated process, passing the
process to zombiereaper. This behavior may be disastrous storage and
mostly unwanted for other code.
When we run a child process touching shared storage, we must wait for
the child process. If we kill the child process without waiting, engine
may start the same operation on another host, while the original child
process is still running, possibly in interruptible state, trying to
write to storage.
To avoid this issue, we always invoke wait() after killing the process.
Special code that do not want to wait for the child process should not
use this context manager.
Change-Id: Ida04e2c7ba092efdc2927ed9f460b0098ba2ad94
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M lib/vdsm/utils.py
M tests/utilsTests.py
2 files changed, 7 insertions(+), 34 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/24/65324/1
diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py
index a428c8e..e5c28b8 100644
--- a/lib/vdsm/utils.py
+++ b/lib/vdsm/utils.py
@@ -738,8 +738,7 @@
if proc.poll() is None:
logging.debug('Terminating process pid=%d' % proc.pid)
proc.kill()
- if proc.poll() is None:
- zombiereaper.autoReapPID(proc.pid)
+ proc.wait()
except Exception:
logging.exception('Failed to kill process %d' % proc.pid)
diff --git a/tests/utilsTests.py b/tests/utilsTests.py
index 388a65d..6ff85d4 100644
--- a/tests/utilsTests.py
+++ b/tests/utilsTests.py
@@ -42,9 +42,8 @@
from vdsm import cmdutils
from vdsm import commands
from vdsm import panic
-from vdsm.common import zombiereaper
-from monkeypatch import MonkeyPatch, MonkeyPatchScope
+from monkeypatch import MonkeyPatch
from vmTestsData import VM_STATUS_DUMP
from monkeypatch import Patch
from testlib import forked, online_cpus, namedTemporaryDir
@@ -83,22 +82,11 @@
self.patch.revert()
-def wait_for_removal(path, timeout, wait=0.1):
- deadline = utils.monotonic_time() + timeout
- while True:
- if not os.path.exists(path):
- return True
- if utils.monotonic_time() > deadline:
- return False
- time.sleep(wait)
-
-
class TerminatingTests(TestCaseBase):
def setUp(self):
self.proc = commands.execCmd([EXT_SLEEP, "2"], sync=False)
self.kill_proc = self.proc.kill
- self.reaped = set()
def tearDown(self):
if self.proc.poll() is None:
@@ -108,8 +96,7 @@
def test_terminating(self):
with utils.terminating(self.proc):
self.assertIsNone(self.proc.poll())
- proc_path = "/proc/%d" % self.proc.pid
- self.assertTrue(wait_for_removal(proc_path, timeout=1))
+ self.assertEqual(self.proc.returncode, -signal.SIGKILL)
def test_terminating_with_kill_exception(self):
class FakeKillError(Exception):
@@ -118,24 +105,11 @@
def fake_kill():
raise FakeKillError("fake kill exception")
- with MonkeyPatchScope([(zombiereaper,
- 'autoReapPID',
- self.reaped.add
- )]):
- self.proc.kill = fake_kill
- with utils.terminating(self.proc):
- self.assertIsNone(self.proc.poll())
- self.assertTrue(self.proc.pid not in self.reaped)
+ self.proc.kill = fake_kill
+ with utils.terminating(self.proc):
+ self.assertIsNone(self.proc.poll())
- def test_terminating_with_infected_kill(self):
- with MonkeyPatchScope([(zombiereaper,
- 'autoReapPID',
- self.reaped.add
- )]):
- self.proc.kill = lambda: None
- with utils.terminating(self.proc):
- self.assertIsNone(self.proc.poll())
- self.assertTrue(self.proc.pid in self.reaped)
+ self.assertIsNone(self.proc.returncode)
class RetryTests(TestCaseBase):
--
To view, visit https://gerrit.ovirt.org/65324
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida04e2c7ba092efdc2927ed9f460b0098ba2ad94
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Nir Soffer has uploaded a new change for review.
Change subject: readme: Fix build status url
......................................................................
readme: Fix build status url
Previously we pointed to Nir's private fork, now that oVirt's github is
triggering builds we should point to the correct builds.
Change-Id: If40bda074383ffa1c4626bb7e68a6035cf7039e3
Signed-off-by: Nir Soffer <nirsof(a)gmail.com>
---
M README.md
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/04/65904/1
diff --git a/README.md b/README.md
index e253d3a..d3ba4c8 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# Vdsm: Virtual Desktop Server Manager
-[![Build Status](https://travis-ci.org/nirs/vdsm.svg?branch=master)]
-(https://travis-ci.org/nirs/vdsm)
+[![Build Status](https://travis-ci.org/oVirt/vdsm.svg?branch=master)]
+(https://travis-ci.org/oVirt/vdsm)
The Vdsm service exposes an API for managing virtualization
hosts running the KVM hypervisor technology. Vdsm manages and monitors
--
To view, visit https://gerrit.ovirt.org/65904
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If40bda074383ffa1c4626bb7e68a6035cf7039e3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>