MCPcopy Create free account
hub / github.com/ceph/ceph / task

Function task

qa/tasks/scrub_test.py:322–413  ·  view source on GitHub ↗

Test [deep] scrub tasks: - chef: - install: - ceph: log-ignorelist: - '!= data_digest' - '!= omap_digest' - '!= size' - deep-scrub 0 missing, 1 inconsistent objects - deep-scrub [0-9]+ errors - repair 0 missing, 1 inconsis

(ctx, config)

Source from the content-addressed store, hash-verified

320
321
322def task(ctx, config):
323 """
324 Test [deep] scrub
325
326 tasks:
327 - chef:
328 - install:
329 - ceph:
330 log-ignorelist:
331 - '!= data_digest'
332 - '!= omap_digest'
333 - '!= size'
334 - deep-scrub 0 missing, 1 inconsistent objects
335 - deep-scrub [0-9]+ errors
336 - repair 0 missing, 1 inconsistent objects
337 - repair [0-9]+ errors, [0-9]+ fixed
338 - shard [0-9]+ .* : missing
339 - deep-scrub 1 missing, 1 inconsistent objects
340 - does not match object info size
341 - attr name mistmatch
342 - deep-scrub 1 missing, 0 inconsistent objects
343 - failed to pick suitable auth object
344 - candidate size [0-9]+ info size [0-9]+ mismatch
345 conf:
346 osd:
347 osd deep scrub update digest min age: 0
348 - scrub_test:
349 """
350 if config is None:
351 config = {}
352 assert isinstance(config, dict), \
353 'scrub_test task only accepts a dict for configuration'
354 first_mon = teuthology.get_first_mon(ctx, config)
355 (mon,) = ctx.cluster.only(first_mon).remotes.keys()
356
357 num_osds = teuthology.num_instances_of_type(ctx.cluster, 'osd')
358 log.info('num_osds is %s' % num_osds)
359
360 manager = ceph_manager.CephManager(
361 mon,
362 ctx=ctx,
363 logger=log.getChild('ceph_manager'),
364 )
365
366 while len(manager.get_osd_status()['up']) < num_osds:
367 time.sleep(10)
368
369 for i in range(num_osds):
370 manager.raw_cluster_cmd('tell', 'osd.%d' % i, 'injectargs',
371 '--', '--osd-objectstore-fuse')
372 manager.flush_pg_stats(range(num_osds))
373 manager.wait_for_clean()
374
375 osd_dump = manager.get_osd_dump_json()
376 poolid = -1
377 for p in osd_dump['pools']:
378 if p['pool_name'] == 'rbd':
379 poolid = p['pool']

Callers

nothing calls this directly

Calls 15

get_osd_statusMethod · 0.95
raw_cluster_cmdMethod · 0.95
flush_pg_statsMethod · 0.95
wait_for_cleanMethod · 0.95
get_osd_dump_jsonMethod · 0.95
do_radosMethod · 0.95
do_pg_scrubMethod · 0.95
wait_for_victim_pgFunction · 0.85
find_victim_objectFunction · 0.85
get_pgnumFunction · 0.85
test_repair_bad_omapFunction · 0.85

Tested by

no test coverage detected