From 7d584781a5640c67b06ad083db4d8e271fd22314 Mon Sep 17 00:00:00 2001 From: Jos Collin Date: Fri, 6 May 2022 16:28:23 +0530 Subject: [PATCH] qa: drop get_blocklisted_instances in TestMirroring drop get_blocklisted_instances in TestMirroring and use is_addr_blocklisted instead. Signed-off-by: Jos Collin (cherry picked from commit 0e66107c89a127bec4f1a3c83894ff858919c8f3) --- qa/tasks/cephfs/test_mirroring.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/qa/tasks/cephfs/test_mirroring.py b/qa/tasks/cephfs/test_mirroring.py index 91f07fdf40112..a5f8cdac75c3d 100644 --- a/qa/tasks/cephfs/test_mirroring.py +++ b/qa/tasks/cephfs/test_mirroring.py @@ -217,10 +217,6 @@ class TestMirroring(CephFSTestCase): 'fs', 'mirror', 'status', f'{fs_name}@{fs_id}') return res['rados_inst'] - def get_blocklisted_instances(self): - return json.loads(self.mds_cluster.mon_manager.raw_cluster_cmd( - "osd", "dump", "--format=json-pretty"))['blocklist'] - def mirror_daemon_command(self, cmd_label, *args): asok_path = self.get_daemon_admin_socket() try: @@ -451,8 +447,7 @@ class TestMirroring(CephFSTestCase): self.mount_a.run_shell(['kill', '-SIGCONT', pid]) # check if the rados addr is blocklisted - blocklist = self.get_blocklisted_instances() - self.assertTrue(rados_inst in blocklist) + self.assertTrue(self.mds_cluster.is_addr_blocklisted(rados_inst)) # wait enough so that the mirror daemon restarts blocklisted instances time.sleep(40) @@ -619,8 +614,7 @@ class TestMirroring(CephFSTestCase): self.mount_a.run_shell(['kill', '-SIGCONT', pid]) # check if the rados addr is blocklisted - blocklist = self.get_blocklisted_instances() - self.assertTrue(rados_inst in blocklist) + self.assertTrue(self.mds_cluster.is_addr_blocklisted(rados_inst)) time.sleep(500) self.check_peer_status(self.primary_fs_name, self.primary_fs_id, @@ -893,8 +887,7 @@ class TestMirroring(CephFSTestCase): time.sleep(40) # make sure the rados addr is blocklisted - blocklist = self.get_blocklisted_instances() - self.assertTrue(rados_inst in blocklist) + self.assertTrue(self.mds_cluster.is_addr_blocklisted(rados_inst)) # now we are sure that there are no "active" mirror daemons -- add a directory path. dir_path_p = "/d0/d1" -- 2.39.5