]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
erasure-code: preload the jerasure plugin 2286/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:37:23 +0000 (02:37 +0200)
commit164f1a1959a863848319585fa752250c7b261381
treea6973bfda2691eb47ac8bf087b781d7b85914ed9
parentae787cfa88dfd0f5add5932b297258c46af4e333
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>
(cherry picked from commit 9b802701f78288ba4f706c65b853415c69002d27)

Conflicts:
src/test/erasure-code/test-erasure-code.sh
src/common/config_opts.h
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