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

Function test_pg_export

qa/tasks/ceph_objectstore_tool.py:616–640  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

614
615 @SKIP_IF_CRIMSON("PG export not implemented")
616 def test_pg_export():
617 exp_errors = 0
618 log.info("Test pg export")
619 for remote in osds.remotes.keys():
620 for role in osds.remotes[remote]:
621 if not role.startswith("osd."):
622 continue
623 osdid = int(role.split('.')[1])
624 if osdid not in pgs:
625 continue
626
627 for pg in pgs[osdid]:
628 fpath = os.path.join(DATADIR, "osd{id}.{pg}".
629 format(id=osdid, pg=pg))
630
631 cmd = ((prefix + "--op export --pgid {pg} --file {file}").
632 format(id=osdid, pg=pg, file=fpath))
633 try:
634 remote.sh(cmd, wait=True)
635 except CommandFailedError as e:
636 log.error("Exporting failed for pg {pg} "
637 "on osd.{id} with {ret}".
638 format(pg=pg, id=osdid, ret=e.exitstatus))
639 exp_errors += 1
640 return exp_errors
641
642 EXP_ERRORS = test_pg_export()
643 ERRORS += EXP_ERRORS

Callers 1

test_objectstoreFunction · 0.85

Calls 6

infoMethod · 0.45
keysMethod · 0.45
splitMethod · 0.45
joinMethod · 0.45
formatMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected