Project

General

Profile

Actions

Bug #36267

open

mgr/balancer: upmap mode not respecting crush rule

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

Status:
New
Priority:
Normal
Assignee:
-
Category:
balancer module
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

With this crush tree and rule, the upmap balancer breaks the layout:

# ceph osd tree | grep -v osd  | grep -v host
ID   CLASS WEIGHT     TYPE NAME                            STATUS REWEIGHT PRI-AFF
 -92                0 root drain
  -1       5589.18994 root default
  -2       4428.02979     room 0513-R-0050
 -72        911.81897         rack RA01
  -4        917.27899         rack RA05
  -6        917.25500         rack RA09
  -9        786.23901         rack RA13
 -14        895.43903         rack RA17
 -65       1161.16003     room 0513-R-0060
 -71        578.76001         ipservice S513-A-IP38
 -70        287.56000             rack BA09
 -80        291.20001             rack BA10
 -76        582.40002         ipservice S513-A-IP63
 -75        291.20001             rack BA11
 -78        291.20001             rack BA12

        type replicated
        min_size 1
        max_size 10
        step take 0513-R-0060
        step chooseleaf firstn 2 type ipservice
        step emit
        step take 0513-R-0050
        step chooseleaf firstn -2 type rack
        step emit

`ceph balancer optimize myplan` gives an upmap-items like this:

# ceph osd pg-upmap-items 75.6 730 957 370 0
set 75.6 pg_upmap_items mapping to [730->957,370->0]

but the new up set doesn't respect the crush rule:

# ceph pg 75.6 query | head
{
    "state": "active+remapped+backfilling",
    "snap_trimq": "[]",
    "snap_trimq_len": 0,
    "epoch": 1463953,
    "up": [
        957,
        0,
        395
    ],
# ceph osd find 957
{
    "osd": 957,
    "ip": "137.138.25.13:6810/3990567",
    "crush_location": {
        "host": "p05798818b40951",
        "ipservice": "S513-A-IP63",
        "rack": "BA12",
        "room": "0513-R-0060",
        "root": "default" 
    }
}
# ceph osd find 0
{
    "osd": 0,
    "crush_location": {
        "host": "p06253939q56782",
        "rack": "RA05",
        "room": "0513-R-0050",
        "root": "default" 
    }
}
# ceph osd find 395
{
    "osd": 395,
    "crush_location": {
        "host": "p06253939s90298",
        "rack": "RA09",
        "room": "0513-R-0050",
        "root": "default" 
    }
}
Actions #1

Updated by John Spray over 5 years ago

  • Project changed from Ceph to mgr
  • Category set to balancer module
Actions #2

Updated by Nathan Cutler over 5 years ago

  • Backport changed from luminous to mimic,luminous
Actions #3

Updated by Konstantin Shalygin almost 3 years ago

  • Backport deleted (mimic,luminous)
Actions

Also available in: Atom PDF