Project

General

Profile

Bug #22297

ceph-volume should handle inline comments in the ceph.conf file

Added by Brad Hubbard about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
Start date:
12/01/2017
Due date:
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

Having an inline comment in the ceph.conf file read by ceph-volume can result in cascading failures such as follows.

# ceph-volume lvm prepare --bluestore  --data /dev/sdv
Running command: sudo vgcreate --force --yes
ceph-b2f1b9b9-eecc-4c17-8b92-cfa60b31c121 # use uuidgen to create an ID,
use this for all ceph nodes in your cluster /dev/sdv
 stderr: Name contains invalid character, valid set includes:
[a-zA-Z0-9.-_+].
  New volume group name "ceph-b2f1b9b9-eecc-4c17-8b92-cfa60b31c121 # use
uuidgen to create an ID, use this for all ceph nodes in your cluster" is
invalid.
  Run `vgcreate --help' for more information.
-->  RuntimeError: command returned non-zero exit status: 3

Perhaps the use of SafeConfigParser requires a value for inline_comment_prefixes?

History

#1 Updated by Alfredo Deza about 1 year ago

  • Project changed from Ceph to ceph-volume
  • Category deleted (135)

We can parse the config file with inline comments, but that means the comment char will be used to be escaped and that will prevent users from
having that char in a value.

For example this (naive) example will never work:

[global]
    key = #

Will treat the value of key as ''

I think there is nothing in ceph that would define something like that, but this means any part in the line would be escaped.

Also, are we wanting to use '#' as comments or ';' as well like in traditional INI style?

Note that we currently do allow comments, just not on the same line as the key/value

#2 Updated by Alfredo Deza about 1 year ago

  • Status changed from New to Need Review

#3 Updated by Alfredo Deza about 1 year ago

  • Status changed from Need Review to Resolved

merged commit f3a59fb into master

#4 Updated by Alfredo Deza about 1 year ago

pushed to mimic-dev1

Also available in: Atom PDF