]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon: test the crush ruleset when creating a pool
authorLoic Dachary <ldachary@redhat.com>
Thu, 16 Jul 2015 16:02:02 +0000 (18:02 +0200)
committerKen Dreyer <kdreyer@redhat.com>
Wed, 4 Nov 2015 21:42:39 +0000 (14:42 -0700)
commitad5aa13c2b0c3124cace770140040ac558e8b53c
tree271a98f79ed089ad3f6a46b5802c7d3a343131bd
parent8a3bec77d0788f8ef9db4b440202cb1a23f34389
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

(cherry picked from commit f47ba4b1a1029a55f8bc4ab393a7fa3712cd4e00)
src/mon/OSDMonitor.cc
src/test/mon/osd-crush.sh