Skip to content

Commit

Permalink
Merge pull request #4389 from SrinivasaBharath/wip_preempt
Browse files Browse the repository at this point in the history
TFA fix- Preempt messages check fix
  • Loading branch information
mergify[bot] authored Jan 30, 2025
2 parents 5ac7f79 + 0f9f2ad commit 16fc6fe
Show file tree
Hide file tree
Showing 4 changed files with 211 additions and 174 deletions.
19 changes: 19 additions & 0 deletions ceph/rados/core_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ def bench_write(self, pool_name: str, **kwargs) -> bool:
- rados_write_duration -> duration of write operation (int)
- byte_size -> size of objects to be written (str)
eg : 10KB, default - 4096KB
- num_threads -> Number of threads to be used(int)
- max_objs -> max number of objects to be written (int)
- verify_stats -> arg to control whether obj stats need to
be verified after write (bool) | default: True
Expand All @@ -427,6 +428,7 @@ def bench_write(self, pool_name: str, **kwargs) -> bool:
"""
duration = kwargs.get("rados_write_duration", 200)
byte_size = kwargs.get("byte_size", 4096)
num_threads = kwargs.get("num_threads")
max_objs = kwargs.get("max_objs")
verify_stats = kwargs.get("verify_stats", True)
check_ec = kwargs.get("check_ec", True)
Expand All @@ -436,6 +438,8 @@ def bench_write(self, pool_name: str, **kwargs) -> bool:
if nocleanup:
cmd = f"{cmd} --no-cleanup"
org_objs = self.get_cephdf_stats(pool_name=pool_name)["stats"]["objects"]
if num_threads:
cmd = f"{cmd} -t {num_threads}"
if max_objs:
cmd = f"{cmd} --max-objects {max_objs}"
if kwargs.get("background"):
Expand Down Expand Up @@ -1176,6 +1180,21 @@ def enable_file_logging(self) -> bool:
return False
return True

def disable_file_logging(self) -> bool:
"""
Disable the cluster logging
Returns: True -> pass, False -> fail
"""
try:
cmd = "ceph config set global log_to_file false"
self.node.shell([cmd])
cmd = "ceph config set global mon_cluster_log_to_file false"
self.node.shell([cmd])
except Exception:
log.error("Error while disabling config to log into file")
return False
return True

def get_ec_profiles(self) -> list:
"""
Fetches all the EC profiles present on the cluster
Expand Down
9 changes: 2 additions & 7 deletions suites/reef/rados/tier-2_rados_test_omap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,19 +149,14 @@ tests:
obj_end: 50
num_keys_obj: 100
delete_pool: true

- test:
name: Preempt scrub messages checks
desc: Checking preempt messages in the OSDs
module: test_rados_preempt_scrub.py
polarion-id: CEPH-83572916
config:
verify_osd_preempt:
configurations:
pool-1:
pool_name: preempt_pool
pool_type: replicated
pg_num: 16
pool_name: preempt_pool
pg_num: 1
delete_pool: true

- test:
Expand Down
8 changes: 2 additions & 6 deletions suites/squid/rados/tier-2_rados_test_omap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,8 @@ tests:
module: test_rados_preempt_scrub.py
polarion-id: CEPH-83572916
config:
verify_osd_preempt:
configurations:
pool-1:
pool_name: preempt_pool
pool_type: replicated
pg_num: 16
pool_name: preempt_pool
pg_num: 1
delete_pool: true

- test:
Expand Down
Loading

0 comments on commit 16fc6fe

Please sign in to comment.