mirror of
https://github.com/ceph/ceph
synced 2025-02-23 19:17:37 +00:00
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 <xiubli@redhat.com>
This commit is contained in:
parent
a96ee41908
commit
ba3833a622
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user