2013-07-12 17:36:38 +00:00
|
|
|
|
|
|
|
Corpus structure
|
|
|
|
================
|
|
|
|
|
|
|
|
ceph.git/ceph-object-corpus is a submodule.::
|
|
|
|
|
|
|
|
bin/ # misc scripts
|
|
|
|
archive/$version/objects/$type/$hash # a sample of encoded objects from a specific version
|
|
|
|
|
2014-12-15 14:57:14 +00:00
|
|
|
You can also mark known or deliberate incompatibilities between versions with::
|
2013-07-12 17:36:38 +00:00
|
|
|
|
|
|
|
archive/$version/forward_incompat/$type
|
|
|
|
|
2014-03-08 22:22:38 +00:00
|
|
|
The presence of a file indicates that new versions of code cannot
|
2013-07-12 17:36:38 +00:00
|
|
|
decode old objects across that $version (this is normally the case).
|
|
|
|
|
|
|
|
|
|
|
|
How to generate an object corpus
|
2015-03-13 12:49:23 +00:00
|
|
|
--------------------------------
|
2013-07-12 17:36:38 +00:00
|
|
|
|
|
|
|
We can generate an object corpus for a particular version of ceph like so.
|
|
|
|
|
|
|
|
#. Checkout a clean repo (best not to do this where you normally work)::
|
|
|
|
|
2013-09-09 22:22:59 +00:00
|
|
|
git clone ceph.git
|
|
|
|
cd ceph
|
2015-03-02 15:54:40 +00:00
|
|
|
git submodule update --init --recursive
|
2013-07-12 17:36:38 +00:00
|
|
|
|
|
|
|
#. Build with flag to dump objects to /tmp/foo::
|
|
|
|
|
2013-09-09 22:22:59 +00:00
|
|
|
rm -rf /tmp/foo ; mkdir /tmp/foo
|
|
|
|
./do_autogen.sh -e /tmp/foo
|
|
|
|
make
|
2013-07-12 17:36:38 +00:00
|
|
|
|
|
|
|
#. Start via vstart::
|
|
|
|
|
2013-09-09 22:22:59 +00:00
|
|
|
cd src
|
|
|
|
MON=3 OSD=3 MDS=3 RGW=1 ./vstart.sh -n -x
|
2013-07-12 17:36:38 +00:00
|
|
|
|
2014-12-15 14:57:14 +00:00
|
|
|
#. Use as much functionality of the cluster as you can, to exercise as many object encoder methods as possible::
|
2013-07-12 17:36:38 +00:00
|
|
|
|
2013-09-09 22:22:59 +00:00
|
|
|
./rados -p rbd bench 10 write -b 123
|
|
|
|
./ceph osd out 0
|
|
|
|
./init-ceph stop osd.1
|
|
|
|
for f in ../qa/workunits/cls/*.sh ; do PATH=".:$PATH" $f ; done
|
|
|
|
../qa/workunits/rados/test.sh
|
|
|
|
./ceph_test_librbd
|
|
|
|
./ceph_test_libcephfs
|
|
|
|
./init-ceph restart mds.a
|
2013-07-12 17:36:38 +00:00
|
|
|
|
|
|
|
Do some more stuff with rgw if you know how.
|
|
|
|
|
|
|
|
#. Stop::
|
|
|
|
|
2013-09-09 22:22:59 +00:00
|
|
|
./stop.sh
|
2013-07-12 17:36:38 +00:00
|
|
|
|
|
|
|
#. Import the corpus (this will take a few minutes)::
|
|
|
|
|
2013-09-09 22:22:59 +00:00
|
|
|
test/encoding/import.sh /tmp/foo `./ceph-dencoder version` ../ceph-object-corpus/archive
|
|
|
|
test/encoding/import-generated.sh ../ceph-object-corpus/archive
|
2013-07-12 17:36:38 +00:00
|
|
|
|
|
|
|
#. Prune it! There will be a bazillion copies of various objects, and we only want a representative sample.::
|
|
|
|
|
2013-09-09 22:22:59 +00:00
|
|
|
pushd ../ceph-object-corpus
|
|
|
|
bin/prune-archive.sh
|
|
|
|
popd
|
2013-07-12 17:36:38 +00:00
|
|
|
|
|
|
|
#. Verify the tests pass::
|
|
|
|
|
2013-09-09 22:22:59 +00:00
|
|
|
make check-local
|
2013-07-12 17:36:38 +00:00
|
|
|
|
|
|
|
#. Commit it to the corpus repo and push::
|
|
|
|
|
2013-09-09 22:22:59 +00:00
|
|
|
pushd ../ceph-object-corpus
|
|
|
|
git checkout -b wip-new
|
|
|
|
git add archive/`../src/ceph-dencoder version`
|
|
|
|
git commit -m `../src/ceph-dencoder version`
|
|
|
|
git remote add cc ceph.com:/git/ceph-object-corpus.git
|
|
|
|
git push cc wip-new
|
|
|
|
popd
|
2013-07-12 17:36:38 +00:00
|
|
|
|
|
|
|
#. Go test it out::
|
|
|
|
|
2013-09-09 22:22:59 +00:00
|
|
|
cd my/regular/tree
|
|
|
|
cd ceph-object-corpus
|
|
|
|
git fetch origin
|
|
|
|
git checkout wip-new
|
|
|
|
cd ../src
|
|
|
|
make check-local
|
2013-07-12 17:36:38 +00:00
|
|
|
|
|
|
|
#. If everything looks good, update the submodule master branch, and commit the submodule in ceph.git.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|