Project

General

Profile

Feature #23493

config: strip/escape single-quotes in values when setting them via conf file/assimilate conf

Added by Joao Eduardo Luis almost 5 years ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Administration/Usability
Target version:
-
% Done:

0%

Source:
Tags:
low-hanging-fruit
Backport:
Reviewed:
Affected Versions:
Component(RADOS):
Monitor
Pull request ID:

Description

At the moment, the config parsing state machine does not account for single-quotes as potential value enclosures, as it does for double-quotes.

This can raise issues similar to what was observed in #23345.

Filing the ticket for future reference: we should strip all single-quotes from a value EXCEPT when they are escaped.

E.g.,

foo = 'bar' 'baz'

should result in

foo = bar baz

Whereas,

foo = 'bar\' \'baz'

should result in

foo = bar' 'baz

Also, the following would be considered a malformed value:

foo = 'bar\' \'baz\'

for lack of closing single-quote.


Related issues

Related to RADOS - Bug #23345: `ceph osd erasure-code-profile set` crashes the monitors on vstart clusters Resolved 03/13/2018

History

#1 Updated by Greg Farnum almost 5 years ago

  • Tracker changed from Bug to Feature
  • Category changed from Correctness/Safety to Administration/Usability
  • Component(RADOS) Monitor added

#2 Updated by Joao Eduardo Luis almost 5 years ago

  • Related to Bug #23345: `ceph osd erasure-code-profile set` crashes the monitors on vstart clusters added

#3 Updated by Brad Hubbard about 4 years ago

Joao,

Could you take a look at https://github.com/ceph/ceph/pull/20610 and see whether you consider it something that could be expanded to cover the more general case?

#4 Updated by Kefu Chai over 3 years ago

  • Pull request ID set to 28634

i think https://github.com/ceph/ceph/pull/28634 is a small step in the right direction.

foo = 'bar' 'baz'

is not supported yet though.

#5 Updated by Laura Flores 7 months ago

  • Tags set to low-hanging-fruit

#6 Updated by Laura Flores 6 months ago

  • Status changed from New to Resolved

Also available in: Atom PDF