From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: sslutils: add info to SSLHandshake errors
......................................................................
sslutils: add info to SSLHandshake errors
Include name of peer and its full certificate if they do not match,
in order to understand which non-legitimate client attempts to connect.
Change-Id: I0cb2d7e0c6c86ca12a34be13b07bc960e3ad313e
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/sslutils.py
1 file changed, 6 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/21/76221/1
diff --git a/lib/vdsm/sslutils.py b/lib/vdsm/sslutils.py
index 10fc172..8c349ca 100644
--- a/lib/vdsm/sslutils.py
+++ b/lib/vdsm/sslutils.py
@@ -219,9 +219,12 @@
if self._is_handshaking:
self._handshake(dispatcher)
else:
- if not self._verify_host(dispatcher.socket.getpeercert(),
- dispatcher.socket.getpeername()[0]):
- self.log.error("peer certificate does not match host name")
+ peercert = dispatcher.socket.getpeercert()
+ peername = dispatcher.socket.getpeername()[0]
+ if not self._verify_host(peercert, peername):
+ self.log.error(
+ "peer certificate '%s' does not match host name '%s'",
+ peercert, peername)
dispatcher.socket.close()
return
--
To view, visit https://gerrit.ovirt.org/76221
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cb2d7e0c6c86ca12a34be13b07bc960e3ad313e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged. ( https://gerrit.ovirt.org/78592 )
Change subject: tests: Remove global panic mocking
......................................................................
tests: Remove global panic mocking
Global mocking of the panic function requires using our non-standard
test runner. We want to be able to run any test using existing tests
runners like py.test. Tests that needs to mock panic.panic() should
monkey-patch it during the test.
The old panic tests was testing the panic mock; replace the test with a
test testing the real code.
Change-Id: I8ceebdc2ae2d457e9be1b8121327f50a7fa4bfd0
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/Makefile.am
A tests/panic_helper.py
M tests/testrunner.py
M tests/utils_test.py
4 files changed, 14 insertions(+), 12 deletions(-)
Approvals:
Nir Soffer: Verified
Jenkins CI: Passed CI tests
Irit Goihman: Looks good to me, but someone else must approve
Dan Kenigsberg: Looks good to me, approved
--
To view, visit https://gerrit.ovirt.org/78592
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8ceebdc2ae2d457e9be1b8121327f50a7fa4bfd0
Gerrit-PatchSet: 4
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>
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged. ( https://gerrit.ovirt.org/78806 )
Change subject: move vdsm-gencerts.sh to static
......................................................................
move vdsm-gencerts.sh to static
Change-Id: I6e7b573a2eff367f6314935216d1753b4cc1a2e7
Signed-off-by: Irit Goihman <igoihman(a)redhat.com>
---
M .gitignore
M static/Makefile.am
R static/libexec/vdsm/vdsm-gencerts.sh.in
M vdsm/Makefile.am
4 files changed, 4 insertions(+), 7 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Irit Goihman: Verified
Dan Kenigsberg: Looks good to me, approved
--
To view, visit https://gerrit.ovirt.org/78806
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6e7b573a2eff367f6314935216d1753b4cc1a2e7
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Irit Goihman <igoihman(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>
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: python3: Fix UUID packing/unpacking on python 3
......................................................................
Patch Set 9:
(1 comment)
https://gerrit.ovirt.org/#/c/78632/9/tests/storage/misc_test.py
File tests/storage/misc_test.py:
Line 459: Test that the uuid that was packed can be unpacked without being
Line 460: changed
Line 461: """
Line 462: for i in range(1000):
Line 463: origUuid = str(uuid.uuid4())
> We test here 1000 random uuids, better than small list of random uuids. And
I have nothing against testing 1000 numbers. What I don't like is surprises in tests.
Assume your test fails on a single random uuid on a single CI run by a single developer. Nobody would notice. All they'd see is a fluke -1, and they'd re-trigger the job.
A safe approach is to have a predictable list of number. If we introduce a bug that makes the test fail on one of them, it would keep on failing.
r = random.Random(42)
for _ in range(1000):
origUiid = str(uuid.UUID(int=r.randint(0, 2**128-1)))
...
it's not terribly important for this simple test, but I think that uncontrolled randomness is a bad practice for testing, and it should be avoided.
Line 464: packedUuid = misc.packUuid(origUuid)
Line 465: self.assertEqual(misc.unpackUuid(packedUuid), origUuid)
Line 466:
Line 467:
--
To view, visit https://gerrit.ovirt.org/78632
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I41cfa5e54e76dfcad267792daebc54e80bf2a022
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Ala Hino <ahino(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland(a)redhat.com>
Gerrit-Reviewer: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged. ( https://gerrit.ovirt.org/78633 )
Change subject: tests: Mark slow and stress tests using pytest.mark
......................................................................
tests: Mark slow and stress tests using pytest.mark
Replace @slowtest and @stresstest with pytest.marks.
When running from tox, slow and stress tests do not run but are not
skipped; instead these they are reported as "deselected":
314 passed, 40 skipped, 91 deselected, 29 warnings in 22.40 seconds
When running directly, for example when running a single module tests,
all tests run by default:
$ pytest storage/asyncevent_test.py
====================================================================================
test session starts
=====================================================================================
platform linux -- Python 3.5.3, pytest-3.1.0, py-1.4.33, pluggy-0.4.0
rootdir: /home/nsoffer/src/vdsm/tests, inifile:
collected 67 items
storage/asyncevent_test.py ...................................................................
=================================================================================
67 passed in 8.38 seconds
==================================================================================
To run only fast tests, disable slow or stress tests:
$ pytest -m "not (slow or stress)" storage/asyncevent_test.py
====================================================================================
test session starts
=====================================================================================
platform linux -- Python 3.5.3, pytest-3.1.0, py-1.4.33, pluggy-0.4.0
rootdir: /home/nsoffer/src/vdsm/tests, inifile:
collected 67 items
storage/asyncevent_test.py ................................
====================================================================================
35 tests deselected
=====================================================================================
==========================================================================
32 passed, 35 deselected in 0.92 seconds
==========================================================================
Change-Id: I57eac4ad7eeadc4f95000d8bedc1651ecb8bcf60
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/storage/asyncevent_test.py
M tests/storage/asyncutils_test.py
M tests/storage/blockvolume_test.py
M tests/storage/check_test.py
M tests/storage/mount_test.py
M tests/storage/qcow2_test.py
M tests/storage/resourcemanager_test.py
M tests/storage/rwlock_test.py
M tests/storage/xlease_test.py
M tox.ini
10 files changed, 57 insertions(+), 48 deletions(-)
Approvals:
Adam Litke: Looks good to me, approved
Nir Soffer: Verified
Jenkins CI: Passed CI tests
Irit Goihman: Looks good to me, but someone else must approve
--
To view, visit https://gerrit.ovirt.org/78633
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I57eac4ad7eeadc4f95000d8bedc1651ecb8bcf60
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Ala Hino <ahino(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland(a)redhat.com>
Gerrit-Reviewer: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged. ( https://gerrit.ovirt.org/78799 )
Change subject: mailbox: Make run() private
......................................................................
mailbox: Make run() private
The run() method of the mailbox threads is not part of the interface; it
is used as the thread target function, and it should not be invoked by
any other code. Rename the methods to make this clear.
Change-Id: Ie954296eb54341c9277d05819660ccf86d89828d
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M lib/vdsm/storage/mailbox.py
1 file changed, 4 insertions(+), 4 deletions(-)
Approvals:
Adam Litke: Looks good to me, approved
Nir Soffer: Verified
Jenkins CI: Passed CI tests
Freddy Rolland: Looks good to me, but someone else must approve
--
To view, visit https://gerrit.ovirt.org/78799
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie954296eb54341c9277d05819660ccf86d89828d
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Ala Hino <ahino(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged. ( https://gerrit.ovirt.org/78634 )
Change subject: tests: Skip root only tests using pytest
......................................................................
tests: Skip root only tests using pytest
Replace @ValidateRunningAsRoot and @ValidateNotRunningAsRoot with
pytest.mask.skipif.
Change-Id: I0d9fea0f94a767071848ba31a5fc30d8a6a8e01f
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/storage/blockdev_test.py
M tests/storage/fileutil_test.py
M tests/storage/mount_test.py
3 files changed, 10 insertions(+), 9 deletions(-)
Approvals:
Adam Litke: Looks good to me, but someone else must approve
Nir Soffer: Verified; Looks good to me, approved
Jenkins CI: Passed CI tests
Irit Goihman: Looks good to me, but someone else must approve
Freddy Rolland: Looks good to me, but someone else must approve
--
To view, visit https://gerrit.ovirt.org/78634
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0d9fea0f94a767071848ba31a5fc30d8a6a8e01f
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Ala Hino <ahino(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland(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: gerrit-hooks <automation(a)ovirt.org>