This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master
in repository sanlock.
The following commit(s) were added to refs/heads/master by this push:
new 7e7e18d Add failing test for read_resource_owners
7e7e18d is described below
commit 7e7e18d860a837351a3b2ad50e5477cf637a5742
Author: Nir Soffer <nsoffer(a)redhat.com>
AuthorDate: Thu Mar 21 03:37:26 2019 +0200
Add failing test for read_resource_owners
Without specifying block size or alignment (default behaviour in vdsm),
sanlock try to perform read based on 4k/8M in case a disk is 4k disk,
and fail in internal validation:
SanlockException: (90, 'Unable to read resource owners', 'Message too long')
Here is a failure log:
2019-03-21 03:22:03 623007 [22553]: cmd_write_resource 2,14 ls_name:res_name:/var/tmp/sanlock/test_read_resource_owners0/resources:0 0x110
2019-03-21 03:22:03 623007 [22554]: cmd_read_resource_owners 2,14 /var/tmp/sanlock/test_read_resource_owners0/resources:0
2019-03-21 03:22:03 623007 [22554]: worker1 aio collect RD 0x7f4b14000b20:0x7f4b14000b30:0x7f4b137ff000 result 1052672:0 match len 8388608
2019-03-21 03:22:03 623007 [22554]: read_resource_owners read_buf rv -90
2019-03-21 03:22:03 623007 [22554]: cmd_read_resource_owners 2,14 count 0 done -90
2019-03-21 03:22:03 623007 [22550]: ci 2 fd 14 pid -1 recv errno 104
The same issue can be seen with 3.7.0 with current oVirt release.
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
tests/python_test.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/tests/python_test.py b/tests/python_test.py
index ea12b85..e01e550 100644
--- a/tests/python_test.py
+++ b/tests/python_test.py
@@ -5,6 +5,8 @@ Test sanlock python binding with sanlock daemon.
import io
import struct
+import pytest
+
import sanlock
from . import constants
@@ -41,3 +43,15 @@ def test_init_resource(tmpdir, sanlock_daemon):
# TODO: check more stuff here...
util.check_guard(str(path), size)
+
+
+(a)pytest.mark.xfail(reason="broken without specifying block size / alignment")
+def test_read_resource_owners(tmpdir, sanlock_daemon):
+ path = tmpdir.join("resources")
+ size = 1024**2
+ util.create_file(str(path), size)
+ disks = [(str(path), 0)]
+ sanlock.write_resource("ls_name", "res_name", disks)
+
+ res = sanlock.read_resource_owners("ls_name", "res_name", disks)
+ assert res == []
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.