Bug #22297
closedceph-volume should handle inline comments in the ceph.conf file
0%
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?
Updated by Alfredo Deza over 6 years 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
Updated by Alfredo Deza over 6 years ago
- Status changed from New to Fix Under Review
PR open at https://github.com/ceph/ceph/pull/19319
Updated by Alfredo Deza over 6 years ago
- Status changed from Fix Under Review to Resolved
merged commit f3a59fb into master
Updated by Alfredo Deza over 6 years ago
Luminous backport https://github.com/ceph/ceph/pull/19532