Skip to content

Commit 2071234

Browse files
committed
cluster: Addition of new tests to run Scrub and Recovery
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>
1 parent eeb7820 commit 2071234

File tree

6 files changed

+197
-31
lines changed

6 files changed

+197
-31
lines changed

benchmark/fio.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ def initialize_endpoints(self):
6868
self.client_endpoints_object.create_recovery_image()
6969
if 'scrubbing_test' in self.cluster.config:
7070
self.client_endpoints_object.create_scrubbing_image()
71+
if 'scrub_recov_test' in self.cluster.config:
72+
self.client_endpoints_object.create_recovery_image()
73+
self.client_endpoints_object.create_scrubbing_image()
7174
self.create_endpoints()
7275

7376
def create_endpoints(self):
@@ -221,6 +224,12 @@ def run(self):
221224
self.cluster.create_scrubbing_test(self.run_dir, scrubbing_callback)
222225
self.cluster.wait_start_io()
223226

227+
if 'scrub_recov_test' in self.cluster.config:
228+
logger.info('Scrub+Recov')
229+
scrub_recov_callback = self.scrub_recov_callback
230+
self.cluster.create_scrub_recovery_test(self.run_dir, scrub_recov_callback)
231+
self.cluster.wait_start_io()
232+
224233
monitoring.start(self.run_dir)
225234

226235
logger.info('Running fio %s test.', self.mode)
@@ -237,6 +246,10 @@ def run(self):
237246
if 'scrubbing_test' in self.cluster.config:
238247
self.cluster.wait_scrubbing_done()
239248

249+
if 'scrub_recov_test' in self.cluster.config:
250+
self.cluster.wait_scrub_recovery_done()
251+
252+
240253
monitoring.stop(self.run_dir)
241254

242255
# Finally, get the historic ops
@@ -253,6 +266,9 @@ def recovery_callback_background(self):
253266
def scrubbing_callback(self):
254267
logger.info('Scrubbing thread completed')
255268

269+
def scrub_recov_callback(self):
270+
logger.info('Scrub+Recovery thread completed')
271+
256272
def analyze(self, out_dir):
257273
logger.info('Convert results to json format.')
258274
for client in settings.getnodes('clients').split(','):

benchmark/librbdfio.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ def initialize(self):
8888
# Create the recovery image based on test type requested
8989
if 'recovery_test' in self.cluster.config and self.recov_test_type == 'background':
9090
self.mkrecovimage()
91+
92+
if 'scrub_recov_test' in self.cluster.config:
93+
self.mkrecovimage()
94+
self.mkscrubimage()
95+
9196
self.mkimages()
9297
# populate the fio files
9398
ps = []
@@ -135,9 +140,15 @@ def run(self):
135140

136141
if 'scrubbing_test' in self.cluster.config:
137142
scrubbing_callback = self.scrubbing_callback
138-
self.cluster.create_scrub_test(self.run_dir, scrubbing_callback)
143+
self.cluster.create_scrubbing_test(self.run_dir, scrubbing_callback)
139144
self.cluster.wait_start_io()
140145

146+
if 'scrub_recov_test' in self.cluster.config:
147+
scrub_recov_callback = self.scrub_recov_callback
148+
self.cluster.create_scrub_recovery_test(self.run_dir, scrub_recov_callback)
149+
self.cluster.wait_start_io()
150+
151+
141152
monitoring.start(self.run_dir)
142153

143154
logger.info('Running rbd fio %s test.', self.mode)
@@ -152,6 +163,9 @@ def run(self):
152163
if 'recovery_test' in self.cluster.config:
153164
self.cluster.wait_recovery_done()
154165

166+
if 'scrub_recov_test' in self.cluster.config:
167+
self.cluster.wait_scrub_recovery_done()
168+
155169
monitoring.stop(self.run_dir)
156170

157171
# Finally, get the historic ops

client_endpoints/ceph_client_endpoints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def create_rbd_scrubbing(self):
123123
for node in common.get_fqdn_list('clients'):
124124
for ep_num in range(0, self.endpoints_per_client):
125125
rbd_name = '%s-%s' % (self.pool, self.get_rbd_name(node, ep_num))
126-
self.cluster.mkimage(rbd_name, self.get_endpoint_size, self.pool, self.data_pool, self.order)
126+
self.cluster.mkimage(rbd_name, self.endpoint_size, self.pool, self.data_pool, self.order)
127127

128128
def mount_rbd(self):
129129
for ep_num in range(0, self.endpoints_per_client):

client_endpoints/cephfsfuse_client_endpoints.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,3 @@ def mount_fs_helper(self, node, dir_name):
1515

1616
def create_recovery_image(self):
1717
self.create_rbd_recovery()
18-
19-
def create_scrubbing_image(self):
20-
self.create_rbd_scrubbing()

client_endpoints/cephfskernel_client_endpoints.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,3 @@ def mount_fs_helper(self, node, dir_name):
1515

1616
def create_recovery_image(self):
1717
self.create_rbd_recovery()
18-
19-
def create_scrubbing_image(self):
20-
self.create_rbd_scrubbing()

0 commit comments

Comments
 (0)