Project

General

Profile

Subtask #5878

Updated by Loïc Dachary over 10 years ago

"work in progress":https://github.com/dachary/ceph/tree/wip-5878 

 The "abstract API":https://github.com/dachary/ceph/blob/wip-4929/doc/dev/osd_internals/erasure-code.rst#erasure-code-library-abstract-api is provided by dynamically loaded plugins. 
 * core change  
 ** add *ceph osd pool create [name] [key=value] where *key* and *value* are arbitrary strings.  
 *** Update ceph osd pool create around "MonCommands.h":https://github.com/ceph/ceph/blob/master/src/mon/MonCommands.h#L494 
 *** Add a map<string,string> erasure_code parameter list to "pg_pool_t":https://github.com/ceph/ceph/blob/df17d021a6b517588d04cda7430ac11b2a83ef9a/src/osd/osd_types.h 
 * configuration example ( osd pool create keys interpreted by the plugin ) 
 ** ceph osd pool create poolname erasure-code-dir=/var/lib/ceph/erasure-code-plugins (mandatory) 
 erasure-code-plugin=jerasure (mandatory) erasure-code-m=10 (optional) erasure-code-k=3 (optional) erasure-code-algorithm=Reed-Solomon (optional) 
 ** ... there can be more, depending on the plugin / algorithm 
 ** we can probably generalize the mon command interface to have a key/value list type that will make this easy to plumb from the CLI (and trivial via ceph-rest-api). 
 * "src/osd/ErasureCodePluginInterface.h":https://github.com/dachary/ceph/blob/wip-4929/doc/dev/osd_internals/erasure-code.rst#erasure-code-library-abstract-api 
 * plugin loader and examples 
 ** "draft implementation":https://github.com/ceph/ceph/commit/5a2b1d66ae17b78addc14fee68c73985412f3c8c 
 * unit tests 
 ** in the test file ceph osd pool set-erasure-code <pool> plugin-dir src/test/osd/erasure-code-plugin 
 ** simple minded xor based erasure code plugin that only supports M=2,K=1 
 ** the plugin can be directed to trigger errors for tests purposes 
 ** implement the test plugin to be the basis of a documented example to follow when implementing a new plugin 

Back