Project

General

Profile

Subtask #5878

Updated by Loïc Dachary over 10 years ago

"work in progress":https://github.com/ceph/ceph/pull/518 

 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). 
 * "Abstract Interface":https://github.com/dachary/ceph/blob/wip-5878/src/osd/ErasureCodeInterface.h 
 * "Plugin loader":https://github.com/dachary/ceph/blob/wip-5878/src/osd/ErasureCodePlugin.cc 
 * unit tests 
 ** in the test file load the plugin from source 
 ** 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 

 h3. Discussions 

 * "Review request : Erasure Code plugin loader implementation":http://news.gmane.org/find-root.php?group=gmane.comp.file-systems.ceph.devel&article=16588

Back