From: Jos Collin Date: Fri, 6 May 2022 10:58:23 +0000 (+0530) Subject: qa: drop get_blocklisted_instances in TestMirroring X-Git-Tag: v16.2.11~543^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F46470%2Fhead;p=ceph.git 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) --- diff --git a/qa/tasks/cephfs/test_mirroring.py b/qa/tasks/cephfs/test_mirroring.py index 91f07fdf4011..a5f8cdac75c3 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"