registry team mailing list archive
-
registry team
-
Mailing list archive
-
Message #28904
[Bug 680618] [NEW] log-stats-collector logs as "swift"
Public bug reported:
swift-log-stats-collector calls readconf with section_name = None and
log_name='log-stats-collector'
the return value is a dictionary of option, value dictionaries for each
section keyed on section name - PLUS a 'log_name' key.
{
'section1': {'option': 'value'},
'section2': {'option': 'value'},
'log_name': 'log-stats-collector',
}
This configuration dictionary is passed to LogProcessorDaemon
LogProcessorDaemon requires that the conf object have a 'log-processor'
section (if it doesn't you get a AttributeError trying to c.get on
None). It's the log-processor section sub-dictionary which is passed to
get_logger.
get_logger(conf.get('log-processor')) #paraphrased
The resulting logger is also used to init the LogProcessor.
If the 'log-processor' section doesn't define a 'log_name' (neither the
sample config in /etc nor the saio example define a 'log_name') the
get_logger call will default to swift.
This could be fixed a number of ways:
1) define a log_name in the default or log-processor section of your /etc/swift/log-processing.conf (probably also update the examples)
2) update get_logger to attach the log_name to every section that doesn't already have one
3) update LogProcessorDaemon.__init__ to use the top level conf objects log_name if available
get_logger(conf.get('log-processor'), conf.get('log_name'))
Possibly other solutions...
** Affects: swift
Importance: Low
Status: New
** Tags: low-hanging-fruit stats
--
log-stats-collector logs as "swift"
https://bugs.launchpad.net/bugs/680618
You received this bug notification because you are a member of Registry
Administrators, which is subscribed to OpenStack Object Storage (swift).
Follow ups
References