cluster: Addition of new Scrubbing test#246
Conversation
2071234 to
52e8dae
Compare
Add 2 new tests similar to the background Recovery test for running Scrub load with client IO and the other one for running Scrub, Recovery, and Client load. The Scrub and client IO test performs the following steps: - Create a pool and image to populate scrub objects (scrub pool) - Create scrub thread - Populate the scrub pool with objects using radosbench - Initiate deep-scrub on the scrub pool - Create a second pool and an image in it to run client IO - Initiate fio job on the second image at the same time the deep-scrub starts In the second test, we have an additional recovery pool that is populated after an OSD is marked down and out. Once the pool is populated we mark the OSD up and in which starts backfill. At the same time, we begin deep-scrub on the scrub pool and client IO. Signed-off-by: Aishwarya Mathuria <amathuri@redhat.com>
52e8dae to
9b2e21a
Compare
sseshasa
left a comment
There was a problem hiding this comment.
For the scrubbing test, the name of the states like 'osdout' and 'osdin' can confuse other readers. Can this be changed to more appropriate states like for e.g., 'fillscrubpool', 'initscrub' to make it more intuitive?
sseshasa
left a comment
There was a problem hiding this comment.
I forgot to add this. The scrub tests can be factored out into a separate file under the same directory to avoid ceph.py from bloating up.
Makes sense, I'll work on that and shift the scrub tests into a separate file. |
1a2c63c to
da9ec6d
Compare
|
|
||
| common.sync_files('%s/*' % self.run_dir, self.out_dir) | ||
|
|
||
| if 'scrubbing_test' in self.cluster.config: |
There was a problem hiding this comment.
Can this just be called 'scrub_test'. I think all instances of 'scrubbing' in function names and other places can be replaced with 'scrub'. This makes the code much neater and consistent to read. What do you think?
benchmark/librbdfio.py
Outdated
| def recovery_callback_background(self): | ||
| logger.info('Recovery thread completed!') | ||
|
|
||
| def scrubbing_callback(self): |
| rbd_name = '%s-%s' % (self.pool, self.get_rbd_name(node, ep_num)) | ||
| self.cluster.mkimage(rbd_name, self.endpoint_size, self.pool, self.data_pool, self.order) | ||
|
|
||
| def create_rbd_scrubbing(self): |
There was a problem hiding this comment.
'create_rbd_scrub_pool()' sounds better.
client_endpoints/client_endpoints.py
Outdated
| def create_recovery_image(self): | ||
| pass | ||
|
|
||
| def create_scrubbing_image(self): |
There was a problem hiding this comment.
'scrubbing' to 'scrub' here and in the other *_endpoint.py files.
cluster/ceph.py
Outdated
| import json | ||
|
|
||
| from .cluster import Cluster | ||
| from .scrub_tests import ScrubbingTestThreadBackground, ScrubRecoveryThreadBackground |
There was a problem hiding this comment.
Looks much better now. To be consistent you can consider changing class name from "ScrubbingTestThreadBackground" to "ScrubTestThreadBackground".
cluster/ceph.py
Outdated
|
|
||
| return ret | ||
|
|
||
| def log_scrubbing_stats(self, scrubstatsfile=None, pgid=None): |
cluster/ceph.py
Outdated
| self.rt = RecoveryTestThreadBackground(rt_config, self, callback, self.stoprequest, self.haltrequest, self.startiorequest) | ||
| self.rt.start() | ||
|
|
||
| def create_scrubbing_test(self, run_dir, callback): |
cluster/ceph.py
Outdated
| break | ||
| self.rt.join(1) | ||
|
|
||
| def maybe_populate_scrubbing_pool(self): |
cluster/ceph.py
Outdated
| common.pdsh(settings.getnodes('head'), 'sudo %s -p %s bench %s write -b %s --max-objects %s --no-cleanup' % (self.rados_cmd, self.scrub_pool_name, self.prefill_scrub_time, self.prefill_scrub_object_size, self.prefill_scrub_objects)).communicate() | ||
| #self.check_health() | ||
|
|
||
| def initiate_scrubbing(self): |
cluster/ceph.py
Outdated
| logger.info("Initiating scrub on pool %s" % self.scrub_pool_name) | ||
| common.pdsh(settings.getnodes('head'), '%s osd pool deep-scrub %s' % (self.ceph_cmd, self.scrub_pool_name)).communicate() | ||
|
|
||
| def wait_scrubbing_done(self): |
benchmark/fio.py
Outdated
| def recovery_callback_background(self): | ||
| logger.info('Recovery thread completed!') | ||
|
|
||
| def scrubbing_callback(self): |
Signed-off-by: Aishwarya Mathuria <amathuri@redhat.com>
da9ec6d to
fd4de2d
Compare
Signed-off-by: Aishwarya Mathuria <amathuri@redhat.com>
Signed-off-by: Aishwarya Mathuria amathuri@redhat.com