5 ceph.git/ceph-object-corpus is a submodule.::
8 archive/$version/objects/$type/$hash # a sample of encoded objects from a specific version
10 You can also mark known or deliberate incompatibilities between versions with::
12 archive/$version/forward_incompat/$type
14 The presence of a file indicates that new versions of code cannot
15 decode old objects across that ``$version`` (this is normally the case).
18 How to generate an object corpus
19 --------------------------------
23 We can generate an object corpus for a particular version of ceph using the
24 script of ``script/gen-corpus.sh``, or by following the instructions below:
26 #. Checkout a clean repo (best not to do this where you normally work)::
30 git submodule update --init --recursive
32 #. Build with flag to dump objects to ``/tmp/foo``::
34 rm -rf /tmp/foo ; mkdir /tmp/foo
35 do_cmake.sh -DCMAKE_CXX_FLAGS="-DENCODE_DUMP_PATH=/tmp/foo"
42 MON=3 MGR=2 OSD=3 MDS=3 RGW=1 ../src/vstart.sh -n -x
44 #. Use as much functionality of the cluster as you can, to exercise as many object encoder methods as possible::
46 bin/ceph osd pool create mypool
47 bin/rados -p mypool bench 10 write -b 123
50 bin/init-ceph restart osd.1
51 for f in ../qa/workunits/cls/*.sh ; do PATH="bin:$PATH" $f ; done
52 PATH="bin:$PATH" ../qa/workunits/rados/test.sh
54 bin/ceph_test_libcephfs
55 bin/init-ceph restart mds.a
56 ../qa/workunits/rgw/run-s3tests.sh
62 #. Import the corpus (this will take a few minutes)::
64 ../src/test/encoding/import.sh /tmp/foo `bin/ceph-dencoder version` ../ceph-object-corpus/archive
65 ../src/test/encoding/import-generated.sh ../ceph-object-corpus/archive
67 #. Prune it! There will be a bazillion copies of various objects, and we only want a representative sample.::
69 pushd ../ceph-object-corpus
73 #. Verify the tests pass::
77 #. Commit it to the corpus repo and push::
79 pushd ../ceph-object-corpus
80 git checkout -b wip-new
81 git add archive/`../build/bin/ceph-dencoder version`
82 git commit -m `../build/bin/ceph-dencoder version`
83 git remote add cc git@github.com:ceph/ceph-object-corpus.git
96 #. If everything looks good, update the submodule master branch, and commit the submodule in ceph.git.