]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: test the crush ruleset when creating a pool 5276/head
authorLoic Dachary <ldachary@redhat.com>
Thu, 16 Jul 2015 16:02:02 +0000 (18:02 +0200)
committerLoic Dachary <ldachary@redhat.com>
Mon, 31 Aug 2015 13:58:33 +0000 (15:58 +0200)
commitf47ba4b1a1029a55f8bc4ab393a7fa3712cd4e00
treef2dac7c4a0aca66927bc6fd1626734c5a24293fd
parentb58cbbab4f74e352c3d4a61190cea2731057b3c9
mon: test the crush ruleset when creating a pool

We want to fix the following scenario:

 * an erasure code plugin (or another part of the code) creates a
   ruleset
 * the ruleset crashes during mapping (for whatever reason)
 * ceph osd pool create uses the bugous ruleset
 * the monitors try to do mapping a crash

Having a bugous ruleset in the crush map is very difficult prevent. The
catastrophic event of using it with a newly created pool can however be
prevented by calling the CrushTester just before creating the pool and
after all implicit or explicit crush ruleset creation happened.

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
(cherry picked from commit f1e86be589803596e86acc964ac5c5c03b4038d8)

Conflicts:
src/test/mon/osd-crush.sh
          removed the run_mon because in hammer it is shared
          between all tests
        src/mon/OSDMonitor.cc
          prepare_new_pool changed stringstream to *ostream
src/mon/OSDMonitor.cc
src/test/mon/osd-crush.sh