Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crush: detect and (usually) fix ruleset != rule id #13683

merged 14 commits into from Jun 21, 2017
Changes from 1 commit
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+17 −0
Diff settings


Just for now

mon/OSDMonitor: automatically convert crushmap if ruleset != rule id

Signed-off-by: Sage Weil <>
  • Loading branch information...
liewegas committed Feb 28, 2017
commit 4f24d63f58a74376725ec12de429cbd3ceab7b8a
@@ -544,6 +544,23 @@ void OSDMonitor::on_active()
void OSDMonitor::on_restart()

if (mon->is_leader()) {
// fix ruleset != ruleid
if (osdmap.crush->has_legacy_rulesets() &&
!osdmap.crush->has_multirule_rulesets()) {
CrushWrapper newcrush;
int r = newcrush.renumber_rules_by_ruleset();
if (r >= 0) {
dout(1) << __func__ << " crush map has ruleset != rule id; fixing" << dendl;
newcrush.encode(pending_inc.crush, mon->get_quorum_con_features());
} else {
dout(10) << __func__ << " unable to renumber rules by ruleset" << dendl;

void OSDMonitor::on_shutdown()
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.