msg/async: allow connection reaping to be tuned; fix cephfs test#41422
Merged
batrick merged 2 commits intoceph:masterfrom Jun 14, 2021
Merged
msg/async: allow connection reaping to be tuned; fix cephfs test#41422batrick merged 2 commits intoceph:masterfrom
batrick merged 2 commits intoceph:masterfrom
Conversation
It is helpful to set this to 1 for tests. Signed-off-by: Sage Weil <sage@newdream.net>
batrick
requested changes
May 20, 2021
batrick
approved these changes
May 20, 2021
Member
|
Thanks for fixing this @liewegas ! |
batrick
requested changes
Jun 3, 2021
Member
batrick
left a comment
There was a problem hiding this comment.
test_tell_conn_close needs updated too.
See: /ceph/teuthology-archive/pdonnell-2021-06-03_03:40:33-fs-wip-pdonnell-testing-20210603.020013-distro-basic-smithi/6148218/teuthology.log
Also, I found that reaping does not happen immediately. I had to make a change suggested below to get it right.
diff --git a/qa/tasks/cephfs/test_sessionmap.py b/qa/tasks/cephfs/test_sessionmap.py
index c600811bccc..ad6fd1d609c 100644
--- a/qa/tasks/cephfs/test_sessionmap.py
+++ b/qa/tasks/cephfs/test_sessionmap.py
@@ -41,15 +41,18 @@ class TestSessionMap(CephFSTestCase):
the conn count goes back to where it started (i.e. we aren't
leaving connections open)
"""
+ self.config_set('mds', 'ms_async_reap_threshold', '1')
+
self.mount_a.umount_wait()
self.mount_b.umount_wait()
status = self.fs.status()
s = self._get_connection_count(status=status)
self.fs.rank_tell(["session", "ls"], status=status)
- e = self._get_connection_count(status=status)
-
- self.assertEqual(s, e)
+ self.wait_until_true(
+ lambda: self._get_connection_count(status=status) == s,
+ timeout=30
+ )
def test_mount_conn_close(self):
"""
@@ -66,9 +69,10 @@ class TestSessionMap(CephFSTestCase):
self.mount_a.mount_wait()
self.assertGreater(self._get_connection_count(status=status), s)
self.mount_a.umount_wait()
- e = self._get_connection_count(status=status)
-
- self.assertEqual(s, e)
+ self.wait_until_true(
+ lambda: self._get_connection_count(status=status) == s,
+ timeout=30
+ )
def test_version_splitting(self):
"""
We have to reap connections promptly for this test to work. This test was broken indirectly by d51d80b, which moved the counter decrement to reap time instead of mark_down/stop time. The reaping is asynchronous, so allow for a delay in the count change. Fixes: https://tracker.ceph.com/issues/50622 Signed-off-by: Sage Weil <sage@newdream.net>
Member
Author
|
Thanks, updated! |
batrick
approved these changes
Jun 10, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: https://tracker.ceph.com/issues/50622
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox