ceph-volume should handle inline comments in the ceph.conf file
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?
#1 Updated by Alfredo Deza about 1 year ago
- Project changed from Ceph to ceph-volume
- Category deleted (
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