From: Xiubo Li Date: Thu, 27 May 2021 02:57:24 +0000 (+0800) Subject: qa: do not multiple the full ratio twice X-Git-Tag: v17.1.0~1264^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ba3833a6221eca47bc6536cc9b2ac72b2c5fcf04;p=ceph.git qa: do not multiple the full ratio twice The cluster has already multiple the full ratio before returning the "max_avail". Fixes: https://tracker.ceph.com/issues/50984 Signed-off-by: Xiubo Li --- diff --git a/qa/tasks/cephfs/test_full.py b/qa/tasks/cephfs/test_full.py index 6d98c28361f1..e192656173a5 100644 --- a/qa/tasks/cephfs/test_full.py +++ b/qa/tasks/cephfs/test_full.py @@ -125,7 +125,7 @@ class FullnessTestCase(CephFSTestCase): # how soon the cluster recognises its own fullness self.mount_a.write_n_mb("large_file_a", self.fill_mb // 2) try: - self.mount_a.write_n_mb("large_file_b", self.fill_mb // 2) + self.mount_a.write_n_mb("large_file_b", (self.fill_mb * 1.1) // 2) except CommandFailedError: log.info("Writing file B failed (full status happened already)") assert self.is_full() @@ -395,9 +395,7 @@ class TestClusterFull(FullnessTestCase): super(TestClusterFull, self).setUp() if self.pool_capacity is None: - max_avail = self.fs.get_pool_df(self._data_pool_name())['max_avail'] - full_ratio = float(self.fs.get_config("mon_osd_full_ratio", service_type="mon")) - TestClusterFull.pool_capacity = int(max_avail * full_ratio) + TestClusterFull.pool_capacity = self.fs.get_pool_df(self._data_pool_name())['max_avail'] TestClusterFull.fill_mb = (self.pool_capacity // (1024 * 1024)) # Hide the parent class so that unittest.loader doesn't try to run it.