Project

General

Profile

Bug #2540

"ceph osd crush set" should treat "foo=" as if foo wasn't mentioned on the command line

Added by Anonymous over 11 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
-
Target version:
-
% Done:

0%

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

Description

The current behavior, using an empty string as the name, is quite confusing.

Instead of an error message, a better behavior would be to act as if the entry wasn't mentioned on the command line at all. That is, "foo=x bar=y foo=" would be the same as "bar=y".

Example: I want to feed "pool=default host=$(hostname -s)" as decent defaults to "ceph osd crush set". The above would let the admin remove those defaults.

Associated revisions

Revision 8eb5c9b8 (diff)
Added by Sage Weil over 11 years ago

mon: allow keys to be cleared in ceph osd crush set ... loc key/values

If we encounter a 'key=' with no value, clear any previous value for that
key, so that

'a=foo b=bar a='

is equivalent to

'b=bar'

Fixes: #2540
Signed-off-by: Sage Weil <>

History

#1 Updated by Sage Weil over 11 years ago

  • Status changed from New to In Progress
  • Assignee set to Sage Weil

#2 Updated by Sage Weil over 11 years ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF