Project

General

Profile

Actions

Feature #55169

open
DV SS

crush: should validate rule outputs osds

Feature #55169: crush: should validate rule outputs osds

Added by Dan van der Ster over 4 years ago. Updated almost 4 years ago.

Status:
In Progress
Priority:
Normal
Category:
-
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
Reviewed:
Affected Versions:
Component(RADOS):
CRUSH
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

Description

In this thread https://lists.ceph.io/hyperkitty/list/[email protected]/thread/2ZUJN75RLL4YYD4EHAUS5I4IL37A7UUL/ a user suffered a multi day outage, with down PGs and OSDs crashing due to "start interval does not contain the required bound".

After a long story, the root cause was found to be that the user had injected a crush rule that had "choose" instead of "chooseleaf".

rule csd-data-pool {
         id 5
         type erasure
         min_size 3
         max_size 5
         step set_chooseleaf_tries 5
         step set_choose_tries 100
         step take default class big
         step choose indep 0 type host    <--- HERE!
         step emit
}

Can we add better validation to prevent such mistakes?

RZ Updated by Radoslaw Zarzynski over 4 years ago Actions #1

  • Tracker changed from Bug to Feature

Adding the extra check makes sense, I think. Implementing the patch would be a low-hanging-fruit but reviewing will not.

LF Updated by Laura Flores over 4 years ago Actions #2

  • Tags set to low-hanging-fruit

SS Updated by Shreyansh Sancheti almost 4 years ago Actions #3

  • Status changed from New to Need More Info
  • Assignee set to Shreyansh Sancheti

Need more info on this!

DV Updated by Dan van der Ster almost 4 years ago Actions #4

Shreyansh Sancheti wrote:

Need more info on this!

Sure, what do you need to know?

SS Updated by Shreyansh Sancheti almost 4 years ago Actions #5

Dan van der Ster wrote:

Shreyansh Sancheti wrote:

Need more info on this!

Sure, what do you need to know?

So, if I am getting this correct "start interval does not contain the required bound" it doesn't have range ? Also do you have that thread handy? It is not accessible anymore at least for me.

DV Updated by Dan van der Ster almost 4 years ago Actions #6

Shreyansh Sancheti wrote:

Dan van der Ster wrote:

Shreyansh Sancheti wrote:

Need more info on this!

Sure, what do you need to know?

So, if I am getting this correct "start interval does not contain the required bound" it doesn't have range ? Also do you have that thread handy? It is not accessible anymore at least for me.

The original thread is here: https://www.mail-archive.com/[email protected]/msg15021.html
The root cause was found to be using "choose" in the crush rule, which is wrong -- it should be "chooseleaf".

So the proposed fix would be to validate crush rules (e.g. during ceph osd setcrushmap). There is already quite a lot of validation done -- parsing check, smoke test. So IMHO the work here would be to debug why the existing smoke test (mon_osd_crush_smoke_test) doesn't catch this issue.

SS Updated by Shreyansh Sancheti almost 4 years ago Actions #7

  • Status changed from Need More Info to In Progress
Actions

Also available in: PDF Atom