]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
erasure-code: preload the jerasure plugin 2282/head
authorLoic Dachary <loic-201408@dachary.org>
Mon, 18 Aug 2014 23:30:15 +0000 (01:30 +0200)
committerLoic Dachary <loic-201408@dachary.org>
Wed, 20 Aug 2014 00:31:32 +0000 (02:31 +0200)
commit9b802701f78288ba4f706c65b853415c69002d27
treee7a9ac189c5bba1cf3d5a84fb3cfd71263dfa93a
parentfc41273495bf2c0290d5ec0e9032e3ef39f26e77
erasure-code: preload the jerasure plugin

Load the jerasure plugin when ceph-osd starts to avoid the following
scenario:

* ceph-osd-v1 is running but did not load jerasure

* ceph-osd-v2 is installed being installed but takes time : the files
  are installed before ceph-osd is restarted

* ceph-osd-v1 is required to handle an erasure coded placement group and
  loads jerasure (the v2 version which is not API compatible)

* ceph-osd-v1 calls the v2 jerasure plugin and does not reference the
  expected part of the code and crashes

Although this problem shows in the context of teuthology, it is unlikely
to happen on a real cluster because it involves upgrading immediately
after installing and running an OSD. Once it is backported to firefly,
it will not even happen in teuthology tests because the upgrade from
firefly to master will use the firefly version including this fix.

While it would be possible to walk the plugin directory and preload
whatever it contains, that would not work for plugins such as jerasure
that load other plugins depending on the CPU features, or even plugins
such as isa which only work on specific CPU.

http://tracker.ceph.com/issues/9153 Fixes: #9153

Backport: firefly
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
src/ceph_osd.cc
src/common/config_opts.h
src/erasure-code/ErasureCodePlugin.cc
src/erasure-code/ErasureCodePlugin.h
src/test/ceph-disk.sh
src/test/erasure-code/test-erasure-code.sh
src/test/osd/osd-test-helpers.sh