Skip to content

Commit

Permalink
Merge pull request ceph#19588 from batrick/i22475
Browse files Browse the repository at this point in the history
qa: check pool full flags

Reviewed-by: Sage Weil <[email protected]>
  • Loading branch information
liewegas authored Dec 21, 2017
2 parents c461d59 + 6e046df commit 1a549a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
6 changes: 0 additions & 6 deletions qa/tasks/cephfs/cephfs_test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,6 @@ def setUp(self):
self.fs = None # is now invalid!
self.recovery_fs = None

# In case the previous filesystem had filled up the RADOS cluster, wait for that
# flag to pass.
osd_mon_report_interval_max = int(self.mds_cluster.get_config("osd_mon_report_interval_max", service_type='osd'))
self.wait_until_true(lambda: not self.mds_cluster.is_full(),
timeout=osd_mon_report_interval_max * 5)

# In case anything is in the OSD blacklist list, clear it out. This is to avoid
# the OSD map changing in the background (due to blacklist expiry) while tests run.
try:
Expand Down
7 changes: 3 additions & 4 deletions qa/tasks/cephfs/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,6 @@ def clear_firewall(self):
def get_mds_info(self, mds_id):
return FSStatus(self.mon_manager).get_mds(mds_id)

def is_full(self):
flags = json.loads(self.mon_manager.raw_cluster_cmd("osd", "dump", "--format=json-pretty"))['flags']
return 'full' in flags

def is_pool_full(self, pool_name):
pools = json.loads(self.mon_manager.raw_cluster_cmd("osd", "dump", "--format=json-pretty"))['pools']
for pool in pools:
Expand Down Expand Up @@ -1217,3 +1213,6 @@ def data_scan(self, args, quiet=False, worker_count=1):
return workers[0].value
else:
return None

def is_full(self):
return self.is_pool_full(self.get_data_pool_name())
4 changes: 2 additions & 2 deletions qa/tasks/cephfs/test_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,12 @@ def setUp(self):
"max_bytes", "{0}".format(self.pool_capacity))

def is_full(self):
return self.fs.is_pool_full(self.fs.get_data_pool_name())
return self.fs.is_full()


class TestClusterFull(FullnessTestCase):
"""
Test cluster-wide fullness, which indicates that an OSD has become too full
Test data pool fullness, which indicates that an OSD has become too full
"""
pool_capacity = None
REQUIRE_MEMSTORE = True
Expand Down

0 comments on commit 1a549a0

Please sign in to comment.