Project

General

Profile

Actions

Bug #23345

closed

`ceph osd erasure-code-profile set` crashes the monitors on vstart clusters

Added by Joao Eduardo Luis about 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Immediate
Category:
-
Target version:
-
% Done:

0%

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

Description

Coming into OSDMonitor::parse_erasure_code_profile() will trigger an assert that probably should be an error instead.

The assert is essentially checking whether "plugin" is defined on the map. Instead, this should return an error if `plugin` is not defined.

Nevertheless, the trigger lies with parsing the `osd_pool_default_erasure_code_profile` config option map.

In this case, the map is actually parsed, but given the default value is

'plugin=jerasure technique=reed_sol_van k=2 m=1 crush-failure-domain=osd'

as assimilated from ceph.conf, the map turns out to be

$6 = std::map with 5 elements = {
  ["'plugin"] = "jerasure",
  ["crush-failure-domain"] = "osd'",
  ["k"] = "2",
  ["m"] = "1",
  ["technique"] = "reed_sol_van" 
}

Note how we have an extra single quote on `plugin` and `osd`. The map should have been parsed so that neither would have that extra character. This may also indicate we either have a bug in `get_json_str_map` or we need to change how the value is provided to the config option.


Related issues 2 (0 open2 closed)

Related to RADOS - Feature #23493: config: strip/escape single-quotes in values when setting them via conf file/assimilate confResolved

Actions
Has duplicate RADOS - Bug #23360: call to 'ceph osd erasure-code-profile set' asserts the monitorsDuplicate03/14/2018

Actions
Actions #1

Updated by Joao Eduardo Luis about 6 years ago

Running either

ceph config set mon osd_pool_default_erasure_code_profile "plugin=jerasure technique=reed_sol_van k=2 m=1 crush-failure-domain=osd" 

or

ceph config set mon osd_pool_default_erasure_code_profile 'plugin=jerasure technique=reed_sol_van k=2 m=1 crush-failure-domain=osd'

keeps the config option properly set to its intended value, without single or double quotes. This feels like it may be a problem with assimilating ceph.conf, rather than a problem with the parsing function.

The fact that we are still asserting bad when we shouldn't isn't changed, and should be fixed. After all, a user may decide to change this value, not specify a 'plugin' value, and end up crashing and burning their cluster for no good reason.

Actions #2

Updated by Sage Weil about 6 years ago

  • Project changed from Ceph to RADOS
  • Category deleted (Monitor)
  • Status changed from New to 12
Actions #3

Updated by Joao Eduardo Luis about 6 years ago

  • Has duplicate Bug #23360: call to 'ceph osd erasure-code-profile set' asserts the monitors added
Actions #4

Updated by Joao Eduardo Luis about 6 years ago

  • Status changed from 12 to Resolved
Actions #5

Updated by Joao Eduardo Luis about 6 years ago

  • Related to Feature #23493: config: strip/escape single-quotes in values when setting them via conf file/assimilate conf added
Actions

Also available in: Atom PDF