Project

General

Profile

Actions

Bug #64817

open

Stretch mode does not work for pools that use CRUSH rule with device classes

Added by Stefan Kooman about 2 months ago. Updated about 2 months ago.

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

0%

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

Description

I have converted a (test) 3 node replicated cluster (2 storage nodes, 1 node with monitor only, min_size=2, size=4) setup to a "stretch mode" setup [1]. That works as expected.

CRUSH rule (adjusted to work with 1 host and 2 OSDs per device class per data center only)

rule stretch_rule {
id 5
type replicated
step take dc1
step choose firstn 0 type host
step chooseleaf firstn 2 type osd
step emit
step take dc2
step choose firstn 0 type host
step chooseleaf firstn 2 type osd
step emit
}

When stretch rules with device classes are used things don't work as expected anymore. Example crush rule:

rule stretch_rule_ssd {
id 4
type replicated
step take dc1 class ssd
step choose firstn 0 type host
step chooseleaf firstn 2 type osd
step emit
step take dc2 class ssd
step choose firstn 0 type host
step chooseleaf firstn 2 type osd
step emit
}

A similar crush rule for hdd exists. When I change the crush_rule for one of the pools to use stretch_rule_ssd the PGs on OSDs with device class ssd become inactive as soon as one of the data centers goes offline (and "degraded stretched mode" has been activated, and only 1 bucket, data center, is needed for peering). I don't understand why. Another issue with this is that as soon as the datacenter is online again, the recovery will never finish by itself and a "ceph osd force_healthy_stretch_mode --yes-i-really-mean-it" is needed to get HEALTH_OK. The force_healthy_stretch_mode command is not needed when no crush rule that uses device classes is used.

[1]: https://docs.ceph.com/en/latest/rados/operations/stretch-mode/

I brought this up in this Ceph user ML thread: https://lists.ceph.io/hyperkitty/list/ceph-users@ceph.io/thread/PVYFRJMNS4HOAM5LWHBQDARSXTKS42ZG/

I have repeated the steps I did before to confirm it was not a glitch of some kind, but it is not. Stretch mode does not work for pools that use a CRUSH rule that uses device classes.

Actions #1

Updated by Stefan Kooman about 2 months ago

Note: I have made cluster state files (ceph-collect: https://github.com/42on/ceph-collect) during the conversion process and also during working degraded stretch mode case and the non-working case. That contains the following data:

ceph.conf, config, config.json, features, features.json, fsid, health_detail, health_detail.json, health_df, health_df.json, health_report, health_report.json, health_stat, health_stat.json, lsb_release, mds_dump, mds_dump.json, mds_metadata, mds_metadata.json, mds_status, mds_status.json, mon_dump, mon_dump.json, mon_map, mon_map.json, mon_metadata, mon_metadata.json, mon_stat, mon_stat.json, osd_crushmap, osd_crushmap.json, osd_df, osd_df.json, osd_dump, osd_dump.json, osd_map, osd_map.json, osd_metadata, osd_metadata.json, osd_perf, osd_perf.json, osd_stat, osd_stat.json, osd_tree, osd_tree.json, pg_dump, pg_dump_stuck, pg_stat, pg_stat.json, status, status.json, uname, version, versions, versions.json

Let me know if that would be of any use.

Actions

Also available in: Atom PDF