ceph/ceph — pull request #2284 by xiaoxichen (2014-08-19 04:16:14+00:00)
Title: [Mon]  enforce that ruleset == rule id

These patches trying to enforce ruleset == rule id in crush map.

The first patch provide a convert function in OSDMonitor, which can convert current crush map to a new map holding the constraint (one rule per ruleset and rule id == ruleset id)

The second patch make sure when we creating a new ruleset, it still holding the constraint

After these two are done, I will make the mon refuse to accept an injected CRUSH map that
doesn't satisfy this constraint, and the new crushtool will refuse to compile one. Because currently I depend on the injected crush map to write my test case, if I make the mon refuse to accept a map doesn't satisfy the constraint, I have no way to test the code in these two patches.