]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: Fix default replicated pool ruleset choice
authorJohn Spray <john.spray@inktank.com>
Tue, 20 May 2014 15:25:19 +0000 (16:25 +0100)
committerJohn Spray <john.spray@inktank.com>
Tue, 20 May 2014 22:16:54 +0000 (23:16 +0100)
commit1d9e4ac2e2bedfd40ee2d91a4a6098150af9b5df
tree96134117a37b7437a286c92597ab488534a1e8d1
parent1383b649d7ae97c99e9840c42bef0c0db5a0f65e
mon: Fix default replicated pool ruleset choice

Specifically, in the case where the configured
default ruleset is CEPH_DEFAULT_CRUSH_REPLICATED_RULESET,
instead of assuming ruleset 0 exists, choose the lowest
numbered ruleset.

In the case where an explicit ruleset is passed to
OSDMonitor::prepare_pool_crush_ruleset, verify
that it really exists.

The idea is to eliminate cases where a pool could
exist with its crush ruleset set to something
other than a value ruleset ID.

Fixes: #8373
Signed-off-by: John Spray <john.spray@inktank.com>
src/crush/CrushWrapper.cc
src/crush/CrushWrapper.h
src/mon/OSDMonitor.cc
src/osd/OSDMap.cc
src/test/cli/osdmaptool/create-print.t
src/test/cli/osdmaptool/create-racks.t