Project

General

Profile

Actions

Bug #6461

closed

ceph-deploy should at least issue a warning if there are parser errors reading ceph.conf

Added by Anonymous over 10 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

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

Description

during ceph-deploy [--overwrite-conf] config push, if there are parser errors, no warning or error is logged.

A user reported that he had a file with duplicate rados gw config the latter declration was stripped with no error reporting.

Actions #1

Updated by Anonymous over 10 years ago

[root@node-1 ~]# vi ceph.conf

[global]
filestore_xattr_use_omap = true
mon_host = 192.168.0.2
fsid = d4991d2b-0e9d-4912-8329-56362395c4cd
mon_initial_members = node-1
auth_supported = cephx
osd_journal_size = 1024
osd pool default size = 2
osd pool default pgp num = 100
public network = 192.168.0.0/24
osd journal size = 2048
cluster network = 192.168.1.0/24
auth supported = cephx
osd pool default min size = 1
osd pool default pg num = 100
osd mkfs type = xfs

[client.radosgw.gateway]
rgw dns name = *.mirantis.com
keyring = /etc/ceph/keyring.radosgw.gateway
rgw data = /var/lib/ceph/rados
rgw print continue = False
rgw socket path = /tmp/radosgw.sock
rgw keystone url = 10.108.5.2:5000
log file = /var/log/ceph/radosgw.log
user = www-data

[client.radosgw.gateway]
rgw dns name = node-1.mirantis.com
keyring = /etc/ceph/keyring.radosgw.gateway
rgw data = /var/lib/ceph/rados
rgw print continue = False
rgw socket path = /tmp/radosgw.sock
rgw keystone url = 10.108.4.2:5000
log file = /var/log/ceph/radosgw.log
user = bob
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"ceph.conf" 37L, 998C written

[root@node-1 ~]# ceph-deploy --overwrite-conf config push node-2
[ceph_deploy.config][DEBUG ] Pushing config to node-2
[ceph_deploy.sudo_pushy][DEBUG ] will use a remote connection without sudo
[root@node-1 ~]# ssh node-2 cat /etc/ceph/ceph.conf
Warning: Permanently added 'node-2,192.168.0.3' (RSA) to the list of known hosts.
[global]
osd_pool_default_pgp_num = 100
osd_pool_default_size = 2
filestore_xattr_use_omap = true
osd_pool_default_min_size = 1
osd_pool_default_pg_num = 100
mon_host = 192.168.0.2
osd_journal_size = 2048
public_network = 192.168.0.0/24
mon_initial_members = node-1
cluster_network = 192.168.1.0/24
auth_supported = cephx
osd_mkfs_type = xfs
fsid = d4991d2b-0e9d-4912-8329-56362395c4cd

[client.radosgw.gateway]
rgw_keystone_url = 10.108.4.2:5000
rgw_data = /var/lib/ceph/rados
keyring = /etc/ceph/keyring.radosgw.gateway
rgw_dns_name = node-1.mirantis.com
rgw_print_continue = False
user = bob
log_file = /var/log/ceph/radosgw.log
rgw_socket_path = /tmp/radosgw.sock

Actions #2

Updated by Anonymous over 10 years ago

[root@node-1 ~]# python -i
Python 2.6.6 (r266:84292, Jul 10 2013, 22:48:45)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

from ceph_deploy.conf import parse
fi = file("./ceph.conf")
cfg = parse(fi)
cfg.get('client.radosgw.gateway', 'user')

'bob'

Actions #3

Updated by Ian Colle over 10 years ago

  • Project changed from Ceph to devops
Actions #4

Updated by Alfredo Deza over 9 years ago

  • Status changed from New to Rejected

`ConfigParser` will not have errors reading a config file that has duplicate sections.

In Python2.X a duplicate section error will only be raised if `add_section()` is called (see https://docs.python.org/2/library/configparser.html#ConfigParser.DuplicateSectionError)

Only in Python3 we can implement a strict version of the parser and raise potential issues like having duplicates.

If there are any other parser errors that would cause an exception those should be handled by ceph-deploy and that would be
reported back on the terminal/log.

Actions

Also available in: Atom PDF