Bug 973333
Summary: | various services doesn't output error to log when fails on parsing conf | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Jaroslav Henner <jhenner> | ||||
Component: | distribution | Assignee: | Alan Pevec <apevec> | ||||
Status: | CLOSED WONTFIX | QA Contact: | Jaroslav Henner <jhenner> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 3.0 | CC: | adahms, apevec, chrisw, jhenner, markmc, sgordon, srevivo | ||||
Target Milestone: | --- | Keywords: | Automation, ZStream | ||||
Target Release: | 5.0 (RHEL 7) | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Known Issue | |||||
Doc Text: |
If a configuration file contains invalid or otherwise unparseable data OpenStack services that attempt to read values from it will fail to start. While this is expected behaviour in this situation the service initialization scripts do not currently display any output indicating that there was a failure.
To work around this issue when changing configuration files restart the service as normal and then manually confirm that the service is running. For example:
# service openstack-keystone restart
Stopping keystone: [ OK ]
Starting keystone: [ OK ]
# service openstack-keystone status
keystone (pid 12632) is running...
|
Story Points: | --- | ||||
Clone Of: | 972359 | Environment: | |||||
Last Closed: | 2015-12-15 20:48:40 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | 972359 | ||||||
Bug Blocks: | 973328 | ||||||
Attachments: |
|
Description
Jaroslav Henner
2013-06-11 17:16:50 UTC
*** Bug 973328 has been marked as a duplicate of this bug. *** *** Bug 972359 has been marked as a duplicate of this bug. *** Note it is possible to debug the invalid conf if one knows does the init spawn the service process: [root@folsom-rhel6 ~]# echo 'Evil line' >> /etc/keystone/keystone.conf [root@folsom-rhel6 ~]# /usr/bin/python /usr/bin/keystone-all --config-file /usr/share/keystone/keystone-dist.conf --config-file /etc/keystone/keystone.conf Traceback (most recent call last): File "/usr/bin/keystone-all", line 82, in <module> default_config_files=config_files) File "/usr/lib/python2.6/site-packages/oslo/config/cfg.py", line 1182, in __call__ self._parse_config_files() File "/usr/lib/python2.6/site-packages/oslo/config/cfg.py", line 1653, in _parse_config_files raise ConfigFileParseError(pe.filename, str(pe)) oslo.config.cfg.ConfigFileParseError: Failed to parse /etc/keystone/keystone.conf: at /etc/keystone/keystone.conf:227, No ':' or '=' found in assignment: 'Evil line' This bug appears also when there are problems with permission when reading the config files. Rising severity because this is really nasty. I had to debug with strace -f to see why my quantum-linuxbridge-agent doesn't start Created attachment 879008 [details] openstack-nova-api.patch This is not a issue on upstream: https://bugs.launchpad.net/oslo/+bug/1190001 It is either, depending on point of view: * a bug in the init scripts, or it is * the config parsing is not reporting to the log because the logging is initialized after the config parsing (which makes sense because you can configure logging there). Check how the init script behaves when it is not dumping the outputs to a sewage (apply the attached patch). [root@jhenner-node-permanent-1 ~]# /etc/init.d/openstack-nova-api restart Stopping openstack-nova-api: [FAILED] Starting openstack-nova-api: [ OK ] [root@jhenner-node-permanent-1 ~]# /etc/init.d/openstack-nova-api.modified restart Stopping openstack-nova-api: [FAILED] Starting openstack-nova-api: Traceback (most recent call last): File "/usr/bin/nova-api", line 10, in <module> sys.exit(main()) File "/usr/lib/python2.6/site-packages/nova/cmd/api.py", line 40, in main config.parse_args(sys.argv) File "/usr/lib/python2.6/site-packages/nova/config.py", line 37, in parse_args default_config_files=default_config_files) File "/usr/lib/python2.6/site-packages/oslo/config/cfg.py", line 1636, in __call__ else sys.argv[1:]) File "/usr/lib/python2.6/site-packages/oslo/config/cfg.py", line 2137, in _parse_cli_opts return self._parse_config_files() File "/usr/lib/python2.6/site-packages/oslo/config/cfg.py", line 2151, in _parse_config_files ConfigParser._parse_file(config_file, namespace) File "/usr/lib/python2.6/site-packages/oslo/config/cfg.py", line 1256, in _parse_file raise ConfigFileParseError(pe.filename, str(pe)) oslo.config.cfg.ConfigFileParseError: Failed to parse /etc/nova/nova.conf: at /etc/nova/nova.conf:3494, No ':' or '=' found in assignment: 'I am evil as hell.' > * a bug in the init scripts, or it is This should be fixed as a part of bug 1036515 where startup messages are redirected to the separate startuplog /var/log/$prog/$prog-startup.log comment 11 applies for el6 For el7 systemd services output is collected by the systemd journal. |