ceph/ceph — pull request #3177 by davidzhang84 (2014-12-15 08:42:51+00:00)
Title: Add EIO injection on EC pool for mdata and data error only for now

For EC pool, ceph hasn't supported to inject EIO yet like replicated pool.

Since we are trying to fix the issue - https://github.com/ceph/ceph/pull/2952 for both client read and recovery read. At the mean time, we are trying to easily simulate EIO error on EC pool, verify our fixings and add test cases, so we provide this pull request.

There will be an optional 3rd parameter called "shardid" to simulate EIO on corresponding OSD. The default value is 0 which meas primary OSD.

We have run few tests under this change and we can test EIO on primary OSD or peer OSDs for client read or recovery read on object level now. Next step is that we will add some test cases towards our fixings.

Here is an example to inject EIO for reading data error on 1st peer OSD:

sudo ceph --admin-daemon /home/y/var/run/ceph/ceph-osd.39.asok config set filestore_debug_inject_read_err true
sudo ceph --admin-daemon /home/y/var/run/ceph/ceph-osd.39.asok injectdataerr ec_pool testfile1 1

Signed-off-by: Zhi (David) Zhang zhangz@yahoo-inc.com